Skip to content

Instantly share code, notes, and snippets.

@alexbilbie
Created May 21, 2012 18:37
Show Gist options
  • Save alexbilbie/2763832 to your computer and use it in GitHub Desktop.
Save alexbilbie/2763832 to your computer and use it in GitHub Desktop.
Sublime 2 CodeSniffer plugin
{
// Plugin settings
// Turn the debug output on/off
"show_debug": false,
// Which file types (file extensions), do you want the plugin to
// execute for
"extensions_to_execute": ["php"],
// Execute the sniffer on file save
"phpcs_execute_on_save": true,
// Show the error list after save.
"phpcs_show_errors_on_save": false,
// Show the errors in the gutter
"phpcs_show_gutter_marks": true,
// Show the errors in the status bar
"phpcs_show_errors_in_status": true,
// Show the errors in the quick panel so you can then goto line
"phpcs_show_quick_panel": true,
// PHP_CodeSniffer settings
// Do you want to run the phpcs checker?
"phpcs_sniffer_run": true,
// It seems python/sublime cannot always find the phpcs application
// If empty, then use PATH version of phpcs, else use the set value
"phpcs_executable_path": "/Applications/MAMP/bin/php5.3/bin/phpcs",
// Additional arguments you can specify into the application
//
// Example:
// {
// "--standard": "PEAR",
// "-n"
// }
"phpcs_additional_args": {
"--standard": "CodeIgniter",
"-n": ""
},
// PHP Linter settings
// Are we going to run php -l over the file?
"phpcs_linter_run": true,
// It seems python/sublime cannot always find the php application
// If empty, then use PATH version of php, else use the set value
"phpcs_php_path": "/Applications/MAMP/bin/php5.3/bin/php",
// What is the regex for the linter? Has to provide a named match for 'message' and 'line'
"phpcs_linter_regex": "(?P<message>.*) on line (?P<line>\\d+)",
// PHP Mess Detector settings
// Execute phpmd
"phpmd_run": false,
// It seems python/sublime cannot always find the phpmd application
// If empty, then use PATH version of phpmd, else use the set value
"phpmd_executable_path": "",
// Additional arguments you can specify into the application
//
// Example:
// {
// "codesize,unusedcode"
// }
"phpmd_additional_args": {
"codesize,unusedcode,naming": ""
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment