diff options
author | w0rp <devw0rp@gmail.com> | 2019-02-06 18:05:13 +0000 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2019-02-06 18:05:13 +0000 |
commit | 3e11cbd18da3852fab5dee3f743bc60dc87f0775 (patch) | |
tree | 0ca2b5c0e3a8a60b48ffbe569a12f6ac9687cd65 /ale_linters/bib | |
parent | 4d426bf2873c6e1cd2c71e478c756903307628d3 (diff) | |
download | ale-3e11cbd18da3852fab5dee3f743bc60dc87f0775.zip |
Update syntax checking
* Line continuation characters should be on the same lines.
* .vim file line indentation should be a multiple of 4.
Diffstat (limited to 'ale_linters/bib')
-rw-r--r-- | ale_linters/bib/bibclean.vim | 49 |
1 files changed, 25 insertions, 24 deletions
diff --git a/ale_linters/bib/bibclean.vim b/ale_linters/bib/bibclean.vim index 6750f22f..1c6b55d0 100644 --- a/ale_linters/bib/bibclean.vim +++ b/ale_linters/bib/bibclean.vim @@ -11,9 +11,9 @@ endfunction function! ale_linters#bib#bibclean#get_type(str) abort if a:str is# '??' - return 'E' + return 'E' else - return 'W' + return 'W' endif endfunction @@ -36,30 +36,31 @@ function! ale_linters#bib#bibclean#Handle(buffer, lines) abort let l:msg = '' for l:line in a:lines - if empty(l:msg) - let l:mlist = ale_linters#bib#bibclean#match_msg(l:line) + if empty(l:msg) + let l:mlist = ale_linters#bib#bibclean#match_msg(l:line) - if !empty(l:mlist) - let l:msg = l:mlist[3] - let l:type = ale_linters#bib#bibclean#get_type(l:mlist[1]) - endif - else - if l:type is# 'E' - let l:mlist = ale_linters#bib#bibclean#match_entry(l:line) - else - let l:mlist = ale_linters#bib#bibclean#match_value(l:line) - endif + if !empty(l:mlist) + let l:msg = l:mlist[3] + let l:type = ale_linters#bib#bibclean#get_type(l:mlist[1]) + endif + else + if l:type is# 'E' + let l:mlist = ale_linters#bib#bibclean#match_entry(l:line) + else + let l:mlist = ale_linters#bib#bibclean#match_value(l:line) + endif - if !empty(l:mlist) - call add(l:output, { - \ 'lnum': l:mlist[1], - \ 'col': l:mlist[2], - \ 'text': l:msg, - \ 'type': l:type - \}) - let l:msg = '' - endif - endif + if !empty(l:mlist) + call add(l:output, { + \ 'lnum': l:mlist[1], + \ 'col': l:mlist[2], + \ 'text': l:msg, + \ 'type': l:type + \}) + + let l:msg = '' + endif + endif endfor return l:output |