-
Notifications
You must be signed in to change notification settings - Fork 396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Twig syntax check to Git pre-commit hook #44
Comments
Yay! I've been wanting to add this but I didn't know what tool would provide the linting. |
@TravisCarden I don't appear to have a |
|
Hm. Having trouble getting that binary to show up in the bin directory. Tried requiring both symfony/templating and symfony/console. I wonder if we need to create a custom app and register those commands. It seems like that shouldn't be necessary. |
Looks like this is part of Maybe we should look at a lighter-weight solution like https://github.com/asm89/twig-lint. |
So, lots of Symfony learning. Firstly, Symfony has a nightly build process that creates separate packagist projects for each component via git subtree. The lint command is part of symfony/twig-bridge. The lint command can be registered with our own blt-console bin in one of two ways:
|
Command was added but is not yet being executed in pre-commit hook. |
Command currently exists in blt, |
Symfony2 provides a console command for syntax checking Twig templates:
We should consider adding this check to the Git pre-commit hook (and anywhere else we do linting).
The text was updated successfully, but these errors were encountered: