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

xonsh compatability issue #2366

Closed innateessence closed 3 years ago

innateessence commented 3 years ago

This might be a bit out of scope, but figured I'd bring it up anyway since I believe this is the only plugin that I have that suffers from this issue. Or in case anyone has the same issue.

Expected Behavior

Launching vim with Syntastic should perform syntax checking

Current Behavior

Syntastic errors with: syntastic: error: checker ${checker} returned abnormal status 1

Steps to Reproduce

Steps to Fix

innateessence commented 3 years ago

Mirror Issue: https://github.com/xonsh/xonsh/issues/4312

innateessence commented 3 years ago

Possibly relevant: https://github.com/vim-syntastic/syntastic/issues/1131

lcd047 commented 3 years ago

Syntastic relies on Vim's system(), and on Bourne-like file redirections. If your shell breaks either of those, either by using a non-Bourne redirect syntax (say like fish), or by not setting appropriately all the Vim options relevant to system() (namely shellcmdflag, shellpipe, shellquote, shellredir, shellxquote, shellxescape, and maybe others I don't remember now), syntastic won't work. The work-around is to set syntastic_shell to a Bourne-compatible and less unusual shell, such as /bin/sh (cf. :h 'syntastic_shell'). That's all there is to it: your linters don't have to run under a shell mainly intended to be used interactively.

Now, I haven't looked at xonsh to see what exactly fails and why, and I don't plan to do that either, sorry. Syntastic is essentially dead, its main use these days is for running on legacy systems (Vim 7). You're encouraged to run ALE instead, which is actively maintained, or use the work-around I mentioned above. Alternatively, if you post a working patch I'll look at it.