This repository has been archived on 2024-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
ale/test/command_callback/test_psalm_command_callbacks.vader
2019-10-07 23:15:01 +02:00

40 lines
1.1 KiB
Text

Before:
call ale#assert#SetUpLinterTest('php', 'psalm')
After:
if isdirectory(g:dir . '/.git')
call delete(g:dir . '/.git', 'd')
endif
call ale#assert#TearDownLinterTest()
Execute(The default executable path should be correct):
AssertLinter 'psalm',
\ ale#Escape('psalm') . ' --language-server'
Execute(Vendor executables should be detected):
call ale#test#SetFilename('psalm-project/test.php')
AssertLinter
\ ale#path#Simplify(g:dir . '/psalm-project/vendor/bin/psalm'),
\ ale#Escape(ale#path#Simplify(
\ g:dir
\ . '/psalm-project/vendor/bin/psalm'
\ )) . ' --language-server'
Execute(User provided options should be used):
let g:ale_psalm_langserver_options = '--my-user-provided-option my-value'
AssertLinter 'psalm',
\ ale#Escape('psalm')
\ . ' --language-server --my-user-provided-option my-value'
Execute(The project path should be correct for .git directories):
call ale#test#SetFilename('psalm-project/test.php')
if !isdirectory(g:dir . '/.git')
call mkdir(g:dir . '/.git')
endif
AssertLSPProject g:dir