├── DrupalCodingStandard.sublime-build └── README.md /DrupalCodingStandard.sublime-build: -------------------------------------------------------------------------------- 1 | { 2 | "cmd": ["phpcs", "--report=emacs", "--standard=Drupal", "--extensions=php,module,inc,install,test,profile,theme", "$file"], 3 | "file_regex": "^(.*):(.*):(.*):(.*)$" 4 | } 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Sublime Build System for running Drupal Code Sniffer on your Drupal files. 2 | 3 | 1. Follow the directions for the [Drupal Code Sniffer][1] project (see also: [Installing Drupal Code Sniffer on Sublime Text][2]). 4 | 2. Place the DrupalCodingStandard.sublime-build file into your Packages/User directory. 5 | (On OS X this is ~/Library/Application Support/Sublime Text 2/Packages/User) 6 | 3. Open up Sublime Text 2 and select Tools > Build System > DrupalCodingStandard 7 | 4. Open any Drupal file and hit Cmd+B 8 | 5. You can make reporting more compress with "--report=full". In this case sniffer will show only line number(without full path to file) 9 | 10 | [1]: https://www.drupal.org/project/coder 11 | [2]: https://www.drupal.org/node/1419996 12 | --------------------------------------------------------------------------------