Skip to content
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

verify that path used in twig actually exist #425

Open
landsman opened this issue Jan 20, 2025 · 2 comments
Open

verify that path used in twig actually exist #425

landsman opened this issue Jan 20, 2025 · 2 comments

Comments

@landsman
Copy link

landsman commented Jan 20, 2025

When this extension learn to operate with twig it would be nice to add rule where we can check generated routes agains paths in twig.

<a href="{{ path('some_missing_page') }}">

That would help me a lot on some old projects with checking PRs.

@ruudk
Copy link
Contributor

ruudk commented Jan 20, 2025

This can be done by creating a custom Node rule for Twig CS Fixer, see: https://github.com/VincentLanglet/Twig-CS-Fixer/blob/main/docs/custom.md#node-based-rules

@stof
Copy link
Contributor

stof commented Mar 19, 2025

This would actually be a good rule for https://github.com/twigstan/twigstan once #428 is implemented in this extension

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants