Ban use of ==# or ==? in the codebase, and prefer is# or is? instead
This commit is contained in:
parent
5010ddc28f
commit
a535d07f28
61 changed files with 158 additions and 154 deletions
|
@ -46,7 +46,7 @@ function! s:GetJSONLines(lines) abort
|
|||
let l:start_index = 0
|
||||
|
||||
for l:line in a:lines
|
||||
if l:line[:0] ==# '{'
|
||||
if l:line[:0] is# '{'
|
||||
break
|
||||
endif
|
||||
|
||||
|
@ -77,13 +77,13 @@ function! ale_linters#javascript#flow#Handle(buffer, lines) abort
|
|||
" In certain cases, `l:message.loc.source` points to a different path
|
||||
" than the buffer one, thus we skip this loc information too.
|
||||
if has_key(l:message, 'loc')
|
||||
\&& l:line ==# 0
|
||||
\&& l:line is# 0
|
||||
\&& ale#path#IsBufferPath(a:buffer, l:message.loc.source)
|
||||
let l:line = l:message.loc.start.line + 0
|
||||
let l:col = l:message.loc.start.column + 0
|
||||
endif
|
||||
|
||||
if l:text ==# ''
|
||||
if l:text is# ''
|
||||
let l:text = l:message.descr . ':'
|
||||
else
|
||||
let l:text = l:text . ' ' . l:message.descr
|
||||
|
@ -98,7 +98,7 @@ function! ale_linters#javascript#flow#Handle(buffer, lines) abort
|
|||
\ 'lnum': l:line,
|
||||
\ 'col': l:col,
|
||||
\ 'text': l:text,
|
||||
\ 'type': l:error.level ==# 'error' ? 'E' : 'W',
|
||||
\ 'type': l:error.level is# 'error' ? 'E' : 'W',
|
||||
\})
|
||||
endfor
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue