Correct all Vint warnings
This commit is contained in:
parent
16a150b277
commit
1ea0eda36c
@ -22,14 +22,14 @@ function! ale_linters#haskell#ghc#Handle(buffer, lines)
|
|||||||
for line in a:lines
|
for line in a:lines
|
||||||
if len(matchlist(line, pattern)) > 0
|
if len(matchlist(line, pattern)) > 0
|
||||||
call add(corrected_lines, line)
|
call add(corrected_lines, line)
|
||||||
if line !~ ': error:$'
|
if line !~# ': error:$'
|
||||||
call add(corrected_lines, '')
|
call add(corrected_lines, '')
|
||||||
endif
|
endif
|
||||||
elseif line == ''
|
elseif line ==# ''
|
||||||
call add(corrected_lines, line)
|
call add(corrected_lines, line)
|
||||||
else
|
else
|
||||||
if len(corrected_lines) > 0
|
if len(corrected_lines) > 0
|
||||||
if corrected_lines[-1] =~ ': error:$'
|
if corrected_lines[-1] =~# ': error:$'
|
||||||
let line = substitute(line, '\v^\s+', ' ', '')
|
let line = substitute(line, '\v^\s+', ' ', '')
|
||||||
endif
|
endif
|
||||||
let corrected_lines[-1] .= line
|
let corrected_lines[-1] .= line
|
||||||
|
@ -25,7 +25,7 @@ function! ale_linters#scala#scalac#Handle(buffer, lines)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
let text = l:match[3]
|
let text = l:match[3]
|
||||||
let type = l:match[2] == 'error' ? 'E' : 'W'
|
let type = l:match[2] ==# 'error' ? 'E' : 'W'
|
||||||
let col = 0
|
let col = 0
|
||||||
if ln + 1 < len(a:lines)
|
if ln + 1 < len(a:lines)
|
||||||
let col = stridx(a:lines[ln + 1], '^')
|
let col = stridx(a:lines[ln + 1], '^')
|
||||||
|
@ -16,7 +16,7 @@ if !exists('g:ale_linters_sh_shellcheck_exclusions')
|
|||||||
let g:ale_linters_sh_shellcheck_exclusions = ''
|
let g:ale_linters_sh_shellcheck_exclusions = ''
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if g:ale_linters_sh_shellcheck_exclusions != ''
|
if g:ale_linters_sh_shellcheck_exclusions !=# ''
|
||||||
let s:exclude_option = '-e ' . g:ale_linters_sh_shellcheck_exclusions
|
let s:exclude_option = '-e ' . g:ale_linters_sh_shellcheck_exclusions
|
||||||
else
|
else
|
||||||
let s:exclude_option = ''
|
let s:exclude_option = ''
|
||||||
|
@ -107,7 +107,7 @@ function! s:FixLoclist(buffer, loclist)
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:HandleExit(job)
|
function! s:HandleExit(job)
|
||||||
if a:job == 'no process'
|
if a:job ==# 'no process'
|
||||||
" Stop right away when the job is not valid in Vim 8.
|
" Stop right away when the job is not valid in Vim 8.
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
@ -249,7 +249,7 @@ function! s:ApplyLinter(buffer, linter)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
" Only proceed if the job is being run.
|
" Only proceed if the job is being run.
|
||||||
if has('nvim') || (job != 'no process' && job_status(job) == 'run')
|
if has('nvim') || (job !=# 'no process' && job_status(job) ==# 'run')
|
||||||
let a:linter.job = job
|
let a:linter.job = job
|
||||||
|
|
||||||
" Store the ID for the job in the map to read back again.
|
" Store the ID for the job in the map to read back again.
|
||||||
@ -271,7 +271,7 @@ function! s:ApplyLinter(buffer, linter)
|
|||||||
let input = join(getbufline(a:buffer, 1, '$'), "\n") . "\n"
|
let input = join(getbufline(a:buffer, 1, '$'), "\n") . "\n"
|
||||||
let channel = job_getchannel(job)
|
let channel = job_getchannel(job)
|
||||||
|
|
||||||
if ch_status(channel) == 'open'
|
if ch_status(channel) ==# 'open'
|
||||||
call ch_sendraw(channel, input)
|
call ch_sendraw(channel, input)
|
||||||
call ch_close_in(channel)
|
call ch_close_in(channel)
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user