Omar Abid
Omar Abid

Reputation: 15976

Syntastic check not working when using arguments

I setup Syntastic to validate my PHP code. I'm using PHP, and PHPCS as checkers.

let g:syntastic_php_checkers = ['php', 'phpcs']

This works perfectly. However, I want to use the WordPress coding standards, so I added this line

let g:syntastic_php_phpcs_args = "--standard=WordPress"

It should pass the standard argument. It's worth noting, that this argument work in the command-line. However, when I run "SyntasticCheck" on Vim, I get no response. Not even an error notice.

Something is going on?

Upvotes: 3

Views: 1317

Answers (1)

shadowhand
shadowhand

Reputation: 3201

You need to pass in the default arguments for g:syntastic_php_phpcs_args as well as your additional configuration options. The default options are --report=CSV, so your vim command should be:

let g:syntastic_php_phpcs_args="--report=csv --standard=WordPress"

FWIW, I found this looking at the phpcs.vim file in Syntastic.

Upvotes: 4

Related Questions