You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feature #50864 [TwigBridge] Allow twig:lint to excludes dirs (94noni)
This PR was merged into the 7.1 branch.
Discussion
----------
[TwigBridge] Allow `twig:lint` to excludes dirs
| Q | A
| ------------- | ---
| Branch? | 6.4
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | Read PR desc
| License | MIT
| Doc PR |
>**Note** if it is already possible somehow and I did not found, please feel free to answer and close PR
I added a twig file related to [data_collector](https://symfony.com/doc/current/profiler.html#creating-a-data-collector) and used a profiler_dump inside it (in dev env this function exists) ([PR doc pending](symfony/symfony-docs#18470))
I do have a CI checks running this `twig:lint` on my `templates`, and since I’ve added the twig file inside it for a dev profiler data collector, it crashs with `>> Unknown "profiler_dump" function.`
(FYI i do have severals directories in this `templates/` I do not want to list them all)
This PR (opened just to see how it goes) adds an optional option as array to excludes dirs like `--excludes=data_collector`
before:
`APP_DEBUG=0 APP_ENV=preprod symfony console lint:twig templates` 🔴
after:
`APP_DEBUG=0 APP_ENV=preprod symfony console lint:twig templates --excludes=data_collector` 🟢
Commits
-------
85e0c42 [TwigBridge] Allow `twig:lint` to excludes dirs
0 commit comments