Merge pull request #968 from adriaanzon/luacheck-whitespace

Luacheck: Respect warn_about_trailing_whitespace option
This commit is contained in:
w0rp
2017-10-12 22:06:48 +01:00
committed by GitHub
2 changed files with 32 additions and 0 deletions

View File

@@ -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,