-
Notifications
You must be signed in to change notification settings - Fork 7
PHP_CodeSniffer Configuration
Wiki ▸ Tools ▸ PHP_CodeSniffer ▸ Configuration
To configure PHP CodeSniffer follow these steps:
1. From the menu bar select Window -> Preferences
2. From the tree view of Preferences page select PHP Tools -> PHP CodeSniffer. On this page you can configure PHP CodeSniffer.
3. First select a PHP Executable for running PHP CodeSniffer.
4. You can choose to use your own PEAR library or the internal. Note that the internal library is always within the include path so missing packages are used from there.
5. If you wish to print PHP output to console for debugging activate the checkbox.
6. Select one or more included CodeSniffer Standard as Default or add an own. To add a custom standard push New… and provide a Name and a Path to it.
7. Select your Tab width.
8. To ignore directories and files you can specifies patterns. Multiple patters are separated by a comma. For example to exclude all lib folders you can use “/lib/”. Note that you can always use a slash “/” as directory separator.
9. Last you can specify sniffs which will be ignored. As name use the source attribute from debug output (for example Generic.Files.LineLengthSniff).