Skip to content

Can't find Code Sniffer ruleset, it's a bit too strict #39

Answered by ixkaito
Hnnx asked this question in Q&A
Discussion options

You must be logged in to vote

@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 the vendor folder.

To customize the rules, create a phpcs.xml file and add some codes like the following:

<?xml version="1.0"?>
<ruleset name="My WordPress">
    <rule ref="WordPress">
        <exclude name="Universal.Operators.DisallowShortTernary"/>
    </rule>
</ruleset>

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by ixkaito
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants