mirror of
https://github.com/dense-analysis/ale.git
synced 2026-05-17 05:49:47 +08:00
Complain about binary operators on the ends of lines
This commit is contained in:
@@ -101,8 +101,8 @@ function! ale_linters#perl6#perl6#Handle(buffer, lines) abort
|
||||
|
||||
if type(l:json) is v:t_dict
|
||||
for l:key in keys(l:json)
|
||||
if has_key(l:json[l:key], 'sorrows') &&
|
||||
\ has_key(l:json[l:key], 'worries')
|
||||
if has_key(l:json[l:key], 'sorrows')
|
||||
\&& has_key(l:json[l:key], 'worries')
|
||||
if !empty(l:json[l:key]['sorrows'])
|
||||
for l:dictionary in get(l:json[l:key], 'sorrows')
|
||||
for l:item in keys(l:dictionary)
|
||||
|
||||
@@ -87,8 +87,8 @@ endfunction
|
||||
" Skip sandbox error which is caused by directives
|
||||
" because what we want is syntactic or semantic check.
|
||||
function! s:Ignore(item) abort
|
||||
return a:item.type is# 'E' &&
|
||||
\ a:item.text =~# '\vNo permission to (call|directive|assert) sandboxed'
|
||||
return a:item.type is# 'E'
|
||||
\ && a:item.text =~# '\vNo permission to (call|directive|assert) sandboxed'
|
||||
endfunction
|
||||
|
||||
call ale#linter#Define('prolog', {
|
||||
|
||||
@@ -7,9 +7,10 @@ call ale#Set('python_bandit_use_global', get(g:, 'ale_use_global_executables', 0
|
||||
call ale#Set('python_bandit_auto_pipenv', 0)
|
||||
|
||||
function! ale_linters#python#bandit#GetExecutable(buffer) abort
|
||||
if (ale#Var(a:buffer, 'python_auto_pipenv') ||
|
||||
\ ale#Var(a:buffer, 'python_bandit_auto_pipenv'))
|
||||
\ && ale#python#PipenvPresent(a:buffer)
|
||||
if (
|
||||
\ ale#Var(a:buffer, 'python_auto_pipenv')
|
||||
\ || ale#Var(a:buffer, 'python_bandit_auto_pipenv')
|
||||
\) && ale#python#PipenvPresent(a:buffer)
|
||||
return 'pipenv'
|
||||
endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user