This repository has been archived by the owner on Mar 5, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 394
Twig Lint is not maintained and fails valid twig code #1543
Comments
@sarahjean Do you have another linter you'd suggest? |
@grasmash Not currently, doing some research |
grasmash
added a commit
to grasmash/bolt
that referenced
this issue
Sep 7, 2017
grasmash
added a commit
to grasmash/bolt
that referenced
this issue
Sep 7, 2017
grasmash
added a commit
to grasmash/bolt
that referenced
this issue
Sep 22, 2017
…d twig code. (acquia#1975)" This reverts commit ce65adc.
grasmash
added a commit
that referenced
this issue
Sep 22, 2017
Would love for someone to close the loop on this, initial work was piloted here: grasmash@20560e8 but reverted due to failed tests. Needs testing and re-factoring. |
Spent some time on this one. The Symfony linter kept failing on Drupal's link() Twig function, but there's not a good way I've found to get the linter to be aware of those filters and functions without bootstrapping Drupal. Never mind any custom functions or filters that might be created. I just added the current Drupal filters and functions manually to the linter's Twig environment so that they'd be ignored, and created config that can be updated for any custom filters and functions. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
My system information:
When I run this command:
I get the following output:
(Removed some project specific paths and file names)
And I expected this to happen:
divisible by(4)
is valid twig syntax and should not fail https://twig.sensiolabs.org/doc/1.x/tests/divisibleby.htmlThere's an issue on the twig lint project and a couple of PRs that haven't been updated since 2015 for this problem
asm89/twig-lint#25
asm89/twig-lint#33
PR that would address:
asm89/twig-lint#23
Filing this as it looks like we should probably patch this somehow, or find another linter that is being more actively maintained.
The text was updated successfully, but these errors were encountered: