ale/test/linter/test_govet.vader

29 lines
752 B
Plaintext
Raw Normal View History

Before:
Save g:ale_go_go_executable
Save g:ale_go_govet_options
2019-08-02 08:09:10 +00:00
Save g:ale_go_go111module
call ale#assert#SetUpLinterTest('go', 'govet')
After:
Restore
2019-08-02 08:09:10 +00:00
unlet! b:ale_go_go111module
call ale#assert#TearDownLinterTest()
Execute(The default go vet command should be correct):
AssertLinter 'go', ale#Escape('go') . ' vet .'
AssertLinterCwd '%s:h'
Execute(The go vet command and options should be configurable):
let g:ale_go_go_executable = 'foobar'
let g:ale_go_govet_options = '--foo-bar'
2019-08-02 08:09:10 +00:00
AssertLinter 'foobar', ale#Escape('foobar') . ' vet --foo-bar .'
Execute(Go environment variables should be supported):
let b:ale_go_go111module = 'on'
2019-08-02 08:09:10 +00:00
AssertLinter 'go', ale#Env('GO111MODULE', 'on') . ale#Escape('go') . ' vet .'