From b749ec702af29fb4d8a550c585704b3b351134d9 Mon Sep 17 00:00:00 2001 From: Yuxuan 'fishy' Wang Date: Sat, 3 Jul 2021 02:40:01 -0700 Subject: Change default of go_staticcheck_lint_package to 1 (#3799) Fixes https://github.com/dense-analysis/ale/issues/3798. --- test/linter/test_staticcheck.vader | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'test/linter/test_staticcheck.vader') 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' -- cgit v1.2.3