summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-09-12 09:36:16 +0100
committerw0rp <devw0rp@gmail.com>2017-09-12 09:36:16 +0100
commite2271b769c6fbf8bc09c6ab729175edf8d77c452 (patch)
tree02950a047bc79782c8c0d517a38c863c8e67a18c /test
parent7f42aedaec4642aa81802a4a03ea1d0a01bb0c4e (diff)
downloadale-e2271b769c6fbf8bc09c6ab729175edf8d77c452.zip
Ban getcwd() from the codebase, as it causes problems
Diffstat (limited to 'test')
-rwxr-xr-xtest/script/custom-checks1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/script/custom-checks b/test/script/custom-checks
index 3624ffd7..a1a734d8 100755
--- a/test/script/custom-checks
+++ b/test/script/custom-checks
@@ -85,6 +85,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 'getcwd()' "Do not use getcwd(), as it could run from the wrong buffer. Use expand('#' . a:buffer . ':p:h') instead."
check_errors '==#' "Use 'is#' instead of '==#'. 0 ==# 'foobar' is true"
check_errors '==?' "Use 'is?' instead of '==?'. 0 ==? 'foobar' is true"
check_errors '!=#' "Use 'isnot#' instead of '!=#'. 0 !=# 'foobar' is false"