Ban use of ==# or ==? in the codebase, and prefer is# or is? instead

This commit is contained in:
w0rp
2017-08-08 08:39:13 +01:00
parent 5010ddc28f
commit a535d07f28
61 changed files with 158 additions and 154 deletions

View File

@@ -4,7 +4,7 @@
" Return a formatted message according to g:ale_echo_msg_format variable
function! s:GetMessage(linter, type, text) abort
let l:msg = g:ale_echo_msg_format
let l:type = a:type ==# 'E'
let l:type = a:type is# 'E'
\ ? g:ale_echo_msg_error_str
\ : g:ale_echo_msg_warning_str
@@ -22,12 +22,12 @@ function! s:EchoWithShortMess(setting, message) abort
try
" Turn shortmess on or off.
if a:setting ==# 'on'
if a:setting is# 'on'
setlocal shortmess+=T
" echomsg is needed for the message to get truncated and appear in
" the message history.
exec "norm! :echomsg a:message\n"
elseif a:setting ==# 'off'
elseif a:setting is# 'off'
setlocal shortmess-=T
" Regular echo is needed for printing newline characters.
echo a:message