I'm using codesniffer in a pre-commit git hook like this
phpcs --standard=PSR2,PSR1 src/
However, I don't like the intend policy with tabs. My problem is I don't find the xml that defines the ruleset. When I try to find the available standards with
phpcs -i
I get The installed coding standards are MySource, PEAR, PSR1, PSR12, PSR2, Squiz and Zend
. So, I think there must be somewhere on my disc a folder with xml files defining those standards? Also, MySource seems like a template which I could start with, however, I find none of these files. Codesniffer seems to be installed here: c:\Users\*****\AppData\Roaming\Composer\vendor\squizlabs\php_codesniffer\
.
Also, I'm using PhpStorm and configured the path to Code Sniffer. Now the IDE is full of warnings, but neither here I understand where it takes its rules from. The configuration is set to "Local" which I don't know where the actual config can be found. Coming from VSCode with prettier + eslint I expect somewhere a config where both the IDE and the automated codesniffing pre-commit follow the same ruleset.
I hope you can help me to warp my head around it. Thanks in advance.