syntastic icon indicating copy to clipboard operation
syntastic copied to clipboard

Question about `syntastic_python_pylint_post_args`

Open merryChris opened this issue 9 years ago • 4 comments

I just want to set g:syntastic_python_pylint_post_args specifically after reading pylint output doc. But after setting it like '--msg-template="[{msg_id}]:{line:3d},{column:2d}: {symbol}: {msg}"', I find it doesn't work with syntastic, however it works fine with shell.

Here is what the syntastic doc says,

Please note that the new format must start with "{path}:{line}:{column}:{C}: ", otherwise syntastic will not recognise any messages.

Could anyone explain the reason? Thanks so much.

merryChris avatar Apr 21 '17 17:04 merryChris

The reason --msg-template="[{msg_id}]:{line:3d},{column:2d}: {symbol}: {msg}" doesn't work? Because the new format doesn't start with {path}:{line}:{column}:{C}: .

The reason the new format has to start with {path}:{line}:{column}:{C}: ? Because syntastic relies on parsing error messages with errorformat, and syntastic's errorformat has to agree with the format of messages produced by pylint. You're free to change everything after {path}:{line}:{column}:{C}: (that's the only part you'll get to see in a syntastic error window anyway).

lcd047 avatar Apr 21 '17 17:04 lcd047

It seems that {path}:{line}:{column}:{C}: is shown like xxx.py|123 col 4 warning| in my vim loc list. Can this part be configured by syntastic?

merryChris avatar Apr 23 '17 06:04 merryChris

Can this part be configured by syntastic?

No. The error window is managed by Vim (see :h quickfix.txt), and its format is not configurable.

lcd047 avatar Apr 23 '17 15:04 lcd047

OK, thanks. ;)

merryChris avatar Apr 27 '17 13:04 merryChris