phpphpcodesnifferphpcs

Is it possible to have different phpcs configuration values for different files?


I'm using PHP_CodeSniffer with PHPCompatibility and I'd like to have different configuration values for different files.

For some files I want the following configuration:

<config name="testVersion" value="5.5-"/>

And for other files:

<config name="testVersion" value="5.2-"/>

I'd like to do this from my phpcs.xml file. Is this possible?


Solution

  • This is apparently not possible. The best you can do is run phpcs twice with different rulesets or with different command-line arguments.