summaryrefslogtreecommitdiff
path: root/ale_linters
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2017-10-12 22:06:48 +0100
committerGitHub <noreply@github.com>2017-10-12 22:06:48 +0100
commitdded246aba9c054e4b91748cd4269c6cda2a03df (patch)
treecea5d05b9b8e95de51c1e0e7efdf4809e09f1f30 /ale_linters
parent3ddbe48d843b4082b5079925c063d75fa3d18d88 (diff)
parent221cb0f8cfbb27c9e2ecb58d01e059fdcfab7f34 (diff)
downloadale-dded246aba9c054e4b91748cd4269c6cda2a03df.zip
Merge pull request #968 from adriaanzon/luacheck-whitespace
Luacheck: Respect warn_about_trailing_whitespace option
Diffstat (limited to 'ale_linters')
-rw-r--r--ale_linters/lua/luacheck.vim6
1 files changed, 6 insertions, 0 deletions
diff --git a/ale_linters/lua/luacheck.vim b/ale_linters/lua/luacheck.vim
index e15b7301..9f9ca4c4 100644
--- a/ale_linters/lua/luacheck.vim
+++ b/ale_linters/lua/luacheck.vim
@@ -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,