summaryrefslogtreecommitdiff
path: root/test/linter/test_staticcheck.vader
diff options
context:
space:
mode:
authorYuxuan 'fishy' Wang <fishywang@gmail.com>2021-07-03 02:40:01 -0700
committerGitHub <noreply@github.com>2021-07-03 18:40:01 +0900
commitb749ec702af29fb4d8a550c585704b3b351134d9 (patch)
tree2b0b35065b7c696d8364224bd6b67afd0862e9ef /test/linter/test_staticcheck.vader
parent49bdbc3ba5c157c0bef9ee8553f232f073479bb8 (diff)
downloadale-b749ec702af29fb4d8a550c585704b3b351134d9.zip
Change default of go_staticcheck_lint_package to 1 (#3799)
Fixes https://github.com/dense-analysis/ale/issues/3798.
Diffstat (limited to 'test/linter/test_staticcheck.vader')
-rw-r--r--test/linter/test_staticcheck.vader18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/linter/test_staticcheck.vader b/test/linter/test_staticcheck.vader
index d690ebd0..94f24a54 100644
--- a/test/linter/test_staticcheck.vader
+++ b/test/linter/test_staticcheck.vader
@@ -14,7 +14,7 @@ After:
Execute(The staticcheck callback should return the right defaults):
AssertLinterCwd '%s:h'
- AssertLinter 'staticcheck', ale#Escape('staticcheck') . ' %s:t'
+ AssertLinter 'staticcheck', ale#Escape('staticcheck') . ' .'
Execute(staticcheck should be found in GOPATH):
" This is a directory with a fake executable
@@ -23,27 +23,27 @@ Execute(staticcheck should be found in GOPATH):
AssertLinter
\ ale#test#GetFilename('../test-files/go/gopath/bin/staticcheck'),
\ ale#Escape(ale#test#GetFilename('../test-files/go/gopath/bin/staticcheck'))
- \ . ' %s:t'
+ \ . ' .'
Execute(The staticcheck callback should use configured options):
let b:ale_go_staticcheck_options = '-test'
- AssertLinter 'staticcheck', ale#Escape('staticcheck') . ' -test %s:t'
+ AssertLinter 'staticcheck', ale#Escape('staticcheck') . ' -test .'
-Execute(The staticcheck `lint_package` option should use the correct command):
- let b:ale_go_staticcheck_lint_package = 1
+Execute(Unset the staticcheck `lint_package` option should use the correct command):
+ let b:ale_go_staticcheck_lint_package = 0
AssertLinterCwd '%s:h'
- AssertLinter 'staticcheck', ale#Escape('staticcheck') . ' .'
+ AssertLinter 'staticcheck', ale#Escape('staticcheck') . ' %s:t'
Execute(The staticcheck callback should use the `GO111MODULE` option if set):
let b:ale_go_go111module = 'off'
AssertLinter 'staticcheck',
- \ ale#Env('GO111MODULE', 'off') . ale#Escape('staticcheck') . ' %s:t'
+ \ ale#Env('GO111MODULE', 'off') . ale#Escape('staticcheck') . ' .'
" Test with lint_package option set
- let b:ale_go_staticcheck_lint_package = 1
+ let b:ale_go_staticcheck_lint_package = 0
AssertLinter 'staticcheck',
- \ ale#Env('GO111MODULE', 'off') . ale#Escape('staticcheck') . ' .'
+ \ ale#Env('GO111MODULE', 'off') . ale#Escape('staticcheck') . ' %s:t'