Closed gsherwood closed 10 years ago
It also includes a lot of conflicting sniffs.
Lucky me, I never witnessed any conflict so far.
I suggest changing the ruleset.xml file to only include the sniffs from the Generic standard that you want.
Agreed. Will look into it.
Keep an eye on the PHPCS release notes and you'll see when new sniffs are added to standards.
And where I can see these release notes? Right now I occasionally see some posts on Twitter to know that PHPCS new version was released.
I post all releases to the PEAR site, Github and on my Twitter account. Here are the links:
PEAR: http://pear.php.net/package/PHP_CodeSniffer/download/All Github: https://github.com/squizlabs/PHP_CodeSniffer/releases Twitter: https://twitter.com/gregsherwood
I post major version information, like BC breaks, on the Squiz Labs blog as well: https://www.squizlabs.com/php-codesniffer
Closed via 96c6979a36eb66da6af1360f4e7281ee45fdc09f
The ruleset.xml currently includes the entire Generic standard and then selectively excludes some sniffs. But the Generic standard is not actually a standard, but a dumping ground for all generic sniffs. It also includes a lot of conflicting sniffs.
Including the whole standard in 2.x will now include the new DocComment generic sniff, which will cause problems with trying to make a backwards compatible FunctionComment sniff because you can't reference Generic.Commenting.DocComment in the ruleset.xml (to exclude the error message you don't want) because it doesn't exist in PHPCS 1.x.
I suggest changing the ruleset.xml file to only include the sniffs from the Generic standard that you want.
Keep an eye on the PHPCS release notes and you'll see when new sniffs are added to standards. If you like them, add them to your ruleset.xml over time as well.