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

[bug, feature] sh checker for ksh93 does not consider warning messages #2369

Closed XSven closed 3 years ago

XSven commented 3 years ago

Recently (https://github.com/vim-syntastic/syntastic/issues/2358) the sh errorformat was updated to match ksh93 messages. Unfortunately only messages refering to syntax errors are considered. ksh93 -n reports syntax errors AND warnings. This

broken.sh: warning: line 3: -eq within [[...]] obsolete, use ((...))

is one such warning. This nuance is not considered. At the moment

%f: line %l: %m

matches the above warning but broken.sh: warning is then interpreted as the filename (%f) which is wrong and makes the location list unusable. I think we need another errorformat element

%f: warning: line %l: %m

at the beginning of the list of errorformat elements

lcd047 commented 3 years ago

Please see c89741ef.

XSven commented 3 years ago

it works, perfect thanks!