diff options
author | w0rp <devw0rp@gmail.com> | 2017-06-06 10:22:52 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-06-06 10:22:52 +0100 |
commit | a0e0408ecc39d0fc7b8b66ac39c2dc5e7805e787 (patch) | |
tree | aafb0fc1d8809c25972a1003743cd48e2c9e613d /custom-checks | |
parent | d41f15bcbcc53d9a71eaa23dddcd6eb94328f7b7 (diff) | |
download | ale-a0e0408ecc39d0fc7b8b66ac39c2dc5e7805e787.zip |
Complain about incorrect uses of expand('%...')
Diffstat (limited to 'custom-checks')
-rwxr-xr-x | custom-checks | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/custom-checks b/custom-checks index c4b329ca..6145478b 100755 --- a/custom-checks +++ b/custom-checks @@ -55,6 +55,7 @@ check_errors() { RETURN_CODE=1 echo "$match $message" done < <(grep -n "$regex" "$directory"/**/*.vim \ + | grep -v 'no-custom-checks' \ | grep -o '^[^:]\+:[0-9]\+' \ | sed 's:^\./::') done @@ -77,5 +78,6 @@ check_errors $'\t' 'Use four spaces, not tabs' # This check should prevent people from using a particular inconsistent name. check_errors 'let g:ale_\w\+_\w\+_args =' 'Name your option g:ale_<filetype>_<lintername>_options instead' check_errors 'shellescape(' 'Use ale#Escape instead of shellescape' +check_errors "expand(['\"]%" "Use expand('#' . a:buffer . '...') instead. You might get a filename for the wrong buffer." exit $RETURN_CODE |