summaryrefslogtreecommitdiff
path: root/ale_linters/thrift
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2018-09-04 16:51:18 +0100
committerw0rp <devw0rp@gmail.com>2018-09-04 16:51:18 +0100
commitd476578a402763f2c6e4e0ada2eb345d0ac938d7 (patch)
tree77f5a61c6eada15821391ecb4f78b87fa8e406db /ale_linters/thrift
parent8f2e1c393f74326979e1c74af8dc9b6ca8004778 (diff)
downloadale-d476578a402763f2c6e4e0ada2eb345d0ac938d7.zip
Improve ALE project style checking
* The project style linter now runs while you type. * Now the scripts for checking the project require blank lines. * Many style issues have been found and fixed.
Diffstat (limited to 'ale_linters/thrift')
-rw-r--r--ale_linters/thrift/thrift.vim3
1 files changed, 3 insertions, 0 deletions
diff --git a/ale_linters/thrift/thrift.vim b/ale_linters/thrift/thrift.vim
index ac1f69fc..396a2355 100644
--- a/ale_linters/thrift/thrift.vim
+++ b/ale_linters/thrift/thrift.vim
@@ -42,12 +42,14 @@ function! ale_linters#thrift#thrift#Handle(buffer, lines) abort
let l:line = a:lines[l:index]
let l:match = matchlist(l:line, l:pattern)
+
if empty(l:match)
let l:index += 1
continue
endif
let l:severity = l:match[1]
+
if l:severity is# 'WARNING'
let l:type = 'W'
else
@@ -57,6 +59,7 @@ function! ale_linters#thrift#thrift#Handle(buffer, lines) abort
" If our text looks like "(last token was ';')", the *next* line
" should contain a more descriptive error message.
let l:text = l:match[4]
+
if l:text =~# '\(last token was .*\)'
let l:index += 1
let l:text = get(a:lines, l:index, 'Unknown error ' . l:text)