Disable PHPCS rule of long condition

I don’t want to comment long code statements end, but PHP CodeSniffer with WordPress Coding Standards does complain with the following error:

End comment for long condition not found; expected “//end if”

So I added the following to the projects phpcs.xml

<rule ref="Squiz">
<exclude name="Squiz.Commenting.LongConditionClosingCommentSniff"/>
</rule>

Sniff source code PHP_CodeSniffer/src/Standards/Squiz/Sniffs/Commenting/LongConditionClosingCommentSniff.php
For more help with PHPCS rules check out Listing phpcs rules and excluding commenting sniff

Lint all PHP files in CLI

#!/bin/bash
find . -name '*.php' | xargs -i php -l {} | grep -v 'No syntax errors'

view raw
php7-lint.sh
hosted with ❤ by GitHub

Works on Linux. For OSX see https://unix.stackexchange.com/a/285170/39470