-
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. |
Beta Was this translation helpful? Give feedback.
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. |
Beta Was this translation helpful? Give feedback.
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.