|
Hey, Example: Background:
For the live of me I can neither get nested standards per multiple phpcs.xml files (one per subfolder) to work, nor have I found a way to configure something like this in the main phpcs.xml Any guidance would be much appreciated. |
Answered by
jrfnl
Jul 31, 2023
Replies: 1 comment 1 reply
|
I'm thinking you may be able to achieve this using well-configured Something along the lines of: <file>.</file>
<rule ref="Custom">
<include-pattern>./[^/]+\.php</include-pattern><!-- Files in the project root. -->
<include-pattern>./subfolder-2/</include-pattern>
</rule>
<rule ref="PSR12">
<include-pattern>./subfolder-[13]{1}/</include-pattern>
</rule>Note: you won't be able to set different property settings for the same sniff for different folders, so your mileage may vary. (tracked in #2258) Hope this helps. |
1 reply
Answer selected by
mafeka
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm thinking you may be able to achieve this using well-configured
<include-pattern>s, but I haven't tested it.Something along the lines of:
Note: you won't be able to set different property settings for the same sniff for different folders, so your mileage may vary. (tracked in #2258)
Hope this helps.