asm89/twig-lint

Custom operator flagged as invalid

Opened this issue · 2 comments

I wrote a custom Twig operator in Symfony using a Twig Extension. Symfony recognizes it just fine -- my pages render and app/console twig:lint reports the file is ok. However, Syntastic flags the line as invalid since it triggers twig-lint outside of Symfony and does not know about my extension. Is there an easy way to teach twig-lint about my Symfony extensions?

Currently there is no easy way. Maybe we can extend the linter to have some configuration to:

  • pickup an autoloader (composer)
  • define classes of extensions

What do you think?

asm89 commented

The linter was extended to not complain about undefined functions and tests. I wonder if this is still an issue?