Closed nateroling closed 9 years ago
Going further, is there any good way to specify a project-specific ruleset file, or have Vim find it automatically?
The latest change to the syntax checker allows you to do it.
let g:syntastic_wordpress_checkers = ['phpcs']
let g:syntastic_wordpress_phpcs_standard = "WordPress-Core" "Default standard
"Standard file name. This should be at the root of the project.
"If not found then the default standard is used
let g:syntastic_wordpress_phpcs_standard_file = "phpcs.xml"
Great, thanks! Worked perfectly once I remembered to make sure php/phpcs
wasn't enabled. My ftplugin/wordpress.vim
ended up like so:
let g:syntastic_php_checkers = ["php", "phpmd"]
let g:syntastic_wordpress_phpcs_standard_file = "phpcs.xml"
Is there a better way to tell phpcs to use the WordPress standard? I ended up disabling the built-in
phpcs
checker and setting the optiong:syntastic_wordpress_phpcs_args
This is in my ftplugin/wordpress.vim: