-
Hi, I would like to omit some code sniffer rules but can't figure out how to do it. I've seen some tutorials where you can create ruleset.xml and than add/remove specific parts but I'm not sure if it's running on server or if one of the VSC extensions is highlighting errors. Any help is greatly appreciated |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
@Hnnx Thank you for your report! Seems I forgot to update some documentation. I'll inform you again. |
Beta Was this translation helpful? Give feedback.
-
@Hnnx I updated the documentation. (Quick Start No.5) If you want to use PHP CodeSniffer, you have to To customize the rules, create a <?xml version="1.0"?>
<ruleset name="My WordPress">
<rule ref="WordPress">
<exclude name="Universal.Operators.DisallowShortTernary"/>
</rule>
</ruleset>
|
Beta Was this translation helpful? Give feedback.
@Hnnx I updated the documentation. (Quick Start No.5)
If you want to use PHP CodeSniffer, you have to
composer install
first. Then the rule set will be installed to thevendor
folder.To customize the rules, create a
phpcs.xml
file and add some codes like the following: