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