Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Coder covers PHP, JS and CSS.
Are there plans to add the new Twig coding standards review as part of Coder?
Comments
Comment #2
markdorisonIs this on anyone's radar these days? What are people doing to check even simple rules like tabs/spaces in twig templates?
Comment #3
adamzimmermann CreditAttribution: adamzimmermann at Chromatic commentedIt seems that we might not want to duplicate existing open-source work in this area.
I have found several tools.
friendsoftwig/twigcs
VincentLanglet/Twig-CS-Fixer
trivago/prettier-plugin-twig-melody
FWIW the Symfony Twig coding standards are identical from 2.x to 3.x:
The Twig coding standards page on Drupal.org references the broken Sensio Labs website standard.
I have chosen to use VincentLanglet/Twig-CS-Fixer for the time being, as it offered automated code style fixes.
I'm interested to see what others think and how we might move this forward. The answer might be that this is not a coder issue and should be moved to a core issue for further discussion.
Comment #4
Chi CreditAttribution: Chi commentedComment #5
quietone CreditAttribution: quietone at PreviousNext commented