2018-02-15 11:23:36 +00:00
|
|
|
Before:
|
2018-07-15 17:24:53 +00:00
|
|
|
call ale#assert#SetUpLinterTest('go', 'staticcheck')
|
2018-02-15 11:23:36 +00:00
|
|
|
call ale#test#SetFilename('test.go')
|
|
|
|
|
|
|
|
After:
|
2018-07-15 17:24:53 +00:00
|
|
|
call ale#assert#TearDownLinterTest()
|
2018-02-15 11:23:36 +00:00
|
|
|
|
|
|
|
Execute(The staticcheck callback should return the right defaults):
|
2018-07-15 17:24:53 +00:00
|
|
|
AssertLinter 'staticcheck',
|
2018-10-23 14:20:27 +00:00
|
|
|
\ ale#path#CdString(expand('%:p:h'))
|
2018-02-15 11:23:36 +00:00
|
|
|
\ . 'staticcheck '
|
2018-07-15 17:24:53 +00:00
|
|
|
\ . ale#Escape(expand('%' . ':t'))
|
2018-02-15 11:23:36 +00:00
|
|
|
|
|
|
|
Execute(The staticcheck callback should use configured options):
|
|
|
|
let b:ale_go_staticcheck_options = '-test'
|
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
AssertLinter 'staticcheck',
|
2018-10-23 14:20:27 +00:00
|
|
|
\ ale#path#CdString(expand('%:p:h'))
|
2018-02-15 11:23:36 +00:00
|
|
|
\ . 'staticcheck '
|
2018-07-15 17:24:53 +00:00
|
|
|
\ . '-test ' . ale#Escape(expand('%' . ':t'))
|
2018-02-15 11:23:36 +00:00
|
|
|
|
|
|
|
Execute(The staticcheck `lint_package` option should use the correct command):
|
|
|
|
let b:ale_go_staticcheck_lint_package = 1
|
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
AssertLinter 'staticcheck',
|
2018-10-23 14:20:27 +00:00
|
|
|
\ ale#path#CdString(expand('%:p:h')) . 'staticcheck .',
|