HowTo ignore one or more sniffs

If you want to ignore one or more sniffs and don't want to create file error markers follow these steps:

1. To ignore a sniff you need that source id which is defined at source attribute in the debug output.

Example PHP_CodeSniffer output

2. From the menu bar select Window -> Preferences

3. From the tree view of Preferences page select PHP Tools -> PHP CodeSniffer.

4. Enter the source id(s) in the Ignore Sniffs Field. Several sniffs are separated by a comma.

PHP_CodeSniffer configuration to ignore sniffs

5. If you are ask do not rebuild your project.

phpcs-output.gif - Example PHP_CodeSniffer output (24.9 KB) Sven Kiera, 11/24/2010 09:11 am

phpcs-config-ignore-sniffs.jpg - PHP_CodeSniffer configuration to ignore sniffs (38.6 KB) Sven Kiera, 11/24/2010 09:28 am