vim-syntastic / syntastic

Syntax checking hacks for vim
Do What The F*ck You Want To Public License
11.3k stars 1.14k forks source link

Syntastic fails to detect doc8 ReST checker #2319

Closed lukelbd closed 4 years ago

lukelbd commented 4 years ago

Would you consider adding support for the doc8 ReST checker (or help me figure out what I'm doing wrong)? I added the following line to my .vimrc:

let g:syntastic_rst_checkers = ['doc8']  " https://pypi.org/project/doc8/

but :SyntasticInfo executed within an .rst file gives me this:

Syntastic version: 3.10.0-8 (Vim 802, Darwin)
Info for filetype: rst
Global mode: passive
Filetype rst is passive
The current file will not be checked automatically
Available checkers: rst2pseudoxml sphinx
Currently enabled checkers: -

There is a dash after "enabled checkers" where doc8 should show up. Running :!which doc8 and :echo system('which doc8') shows that doc8 is indeed installed.

Restarting vim and updating syntastic did not help.

lcd047 commented 4 years ago

Would you consider adding support for the doc8 ReST checker

Sorry, but no. doc8 expects to be passed the root directory of your docs, while syntastic expects to check single files. There are workarounds (see f.i. the sphinx checker), but those would be particularly complicated here. Also syntastic is dead, please check out ALE instead.

let g:syntastic_rst_checkers = ['doc8'] " https://pypi.org/project/doc8/

Why did you expect this to work? Linters don't just work with syntastic by magic, somebody has to write support for them first. You can see the list of supported rst linters in the manual (:h syntastic-checkers-rst).

Unrelated: never put comments at end of line in Vim scripts. Because of the quirks in the command parser, and because " is both a string delimiter and a comment starter, this can lead to problems that are very hard to debug.

lukelbd commented 4 years ago

doc8 expects to be passed the root directory of your docs

Didn't know that, thanks

Also syntastic is dead, please check out ALE instead.

I'm aware of that, but I often work on remote servers and supercomputers with older versions of vim that I cannot update.

Linters don't just work with syntastic by magic, somebody has to write support for them first.

... was not sure how to check the available language-specific linters, thanks for pointing me to that help page.

never put comments at end of line in Vim scripts

I'm pretty careful about where I do this, but you're right.

Thanks for the help and for your impressive work on this project but the snotty tone was not remotely necessary.