mirror of
https://github.com/dense-analysis/ale.git
synced 2026-05-19 23:09:58 +08:00
Ban use of ==# or ==? in the codebase, and prefer is# or is? instead
This commit is contained in:
@@ -65,6 +65,8 @@ if (( FIX_ERRORS )); then
|
||||
for directory in "${directories[@]}"; do
|
||||
sed -i "s/^\(function.*)\) *$/\1 abort/" "$directory"/**/*.vim
|
||||
sed -i "s/shellescape(/ale#Escape(/" "$directory"/**/*.vim
|
||||
sed -i 's/==#/is#/g' "$directory"/**/*.vim
|
||||
sed -i 's/==?/is?/g' "$directory"/**/*.vim
|
||||
done
|
||||
fi
|
||||
|
||||
@@ -80,5 +82,7 @@ check_errors 'let g:ale_\w\+_\w\+_args =' 'Name your option g:ale_<filetype>_<li
|
||||
check_errors 'shellescape(' 'Use ale#Escape instead of shellescape'
|
||||
check_errors 'simplify(' 'Use ale#path#Simplify instead of simplify'
|
||||
check_errors "expand(['\"]%" "Use expand('#' . a:buffer . '...') instead. You might get a filename for the wrong buffer."
|
||||
check_errors '==#' "Use 'is#' instead of '==#'. 0 ==# 'foobar' is true"
|
||||
check_errors '==?' "Use 'is?' instead of '==?'. 0 ==? 'foobar' is true"
|
||||
|
||||
exit $RETURN_CODE
|
||||
|
||||
Reference in New Issue
Block a user