Luacheck: Respect warn_about_trailing_whitespace option
See http://luacheck.readthedocs.io/en/stable/warnings.html, warnings 611 to 614.
This commit is contained in:
parent
c989ef0fc6
commit
1d1b5155e6
@ -26,6 +26,12 @@ function! ale_linters#lua#luacheck#Handle(buffer, lines) abort
|
||||
let l:output = []
|
||||
|
||||
for l:match in ale#util#GetMatches(a:lines, l:pattern)
|
||||
if !ale#Var(a:buffer, 'warn_about_trailing_whitespace')
|
||||
\ && l:match[3] is# 'W'
|
||||
\ && index(range(611, 614), str2nr(l:match[4])) >= 0
|
||||
continue
|
||||
endif
|
||||
|
||||
call add(l:output, {
|
||||
\ 'lnum': l:match[1] + 0,
|
||||
\ 'col': l:match[2] + 0,
|
||||
|
Loading…
Reference in New Issue
Block a user