2017-08-21 17:42:18 +00:00
|
|
|
Before:
|
2018-07-15 17:24:53 +00:00
|
|
|
call ale#assert#SetUpLinterTest('php', 'phpstan')
|
2017-08-21 17:42:18 +00:00
|
|
|
|
2018-11-23 09:39:50 +00:00
|
|
|
WithChainResults ['0.10.2']
|
|
|
|
|
2017-08-21 17:42:18 +00:00
|
|
|
After:
|
2018-07-15 17:24:53 +00:00
|
|
|
call ale#assert#TearDownLinterTest()
|
2017-08-21 17:42:18 +00:00
|
|
|
|
|
|
|
Execute(Custom executables should be used for the executable and command):
|
|
|
|
let g:ale_php_phpstan_executable = 'phpstan_test'
|
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
AssertLinter 'phpstan_test',
|
|
|
|
\ ale#Escape('phpstan_test') . ' analyze -l4 --errorFormat raw %s'
|
2017-08-21 17:42:18 +00:00
|
|
|
|
|
|
|
Execute(project with level set to 3):
|
|
|
|
call ale#test#SetFilename('phpstan-test-files/foo/test.php')
|
|
|
|
let g:ale_php_phpstan_level = 3
|
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
AssertLinter 'phpstan',
|
|
|
|
\ ale#Escape('phpstan') . ' analyze -l3 --errorFormat raw %s'
|
2017-09-30 16:18:20 +00:00
|
|
|
|
|
|
|
Execute(Custom phpstan configuration file):
|
|
|
|
let g:ale_php_phpstan_configuration = 'phpstan_config'
|
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
AssertLinter 'phpstan',
|
|
|
|
\ ale#Escape('phpstan') . ' analyze -l4 --errorFormat raw -c phpstan_config %s'
|
2018-11-23 09:39:50 +00:00
|
|
|
|
|
|
|
Execute(Choose the right format for error format param):
|
|
|
|
WithChainResults ['0.10.3']
|
|
|
|
|
|
|
|
AssertLinter 'phpstan', [
|
|
|
|
\ ale#Escape('phpstan') . ' --version',
|
|
|
|
\ ale#Escape('phpstan') . ' analyze -l4 --error-format raw %s'
|
|
|
|
\ ]
|