From 1d1b5155e63df93d2dc700989faec1c40d490d90 Mon Sep 17 00:00:00 2001 From: Adriaan Zonnenberg Date: Sat, 30 Sep 2017 16:38:10 +0200 Subject: Luacheck: Respect warn_about_trailing_whitespace option See http://luacheck.readthedocs.io/en/stable/warnings.html, warnings 611 to 614. --- ale_linters/lua/luacheck.vim | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ale_linters') 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, -- cgit v1.2.3