diff options
author | w0rp <w0rp@users.noreply.github.com> | 2019-05-12 21:32:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-12 21:32:57 +0100 |
commit | aa047b5ba3f3e16d18c54a0afb94642dc7568f78 (patch) | |
tree | fb7ba331a32a8a33954cdcffb3a7d013cc6f09ed /ale_linters | |
parent | bfc79bd2aafffc9b8590f9ffa68254243e3f808a (diff) | |
parent | 6b919e88befb5de245d10b74fb9c68034e0d50eb (diff) | |
download | ale-aa047b5ba3f3e16d18c54a0afb94642dc7568f78.zip |
Merge pull request #2491 from mpesari/phpstan-autoload-option
Add phpstan autoload option
Diffstat (limited to 'ale_linters')
-rw-r--r-- | ale_linters/php/phpstan.vim | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ale_linters/php/phpstan.vim b/ale_linters/php/phpstan.vim index b621f855..78f7dd10 100644 --- a/ale_linters/php/phpstan.vim +++ b/ale_linters/php/phpstan.vim @@ -5,6 +5,7 @@ let g:ale_php_phpstan_executable = get(g:, 'ale_php_phpstan_executable', 'phpstan') let g:ale_php_phpstan_level = get(g:, 'ale_php_phpstan_level', '') let g:ale_php_phpstan_configuration = get(g:, 'ale_php_phpstan_configuration', '') +let g:ale_php_phpstan_autoload = get(g:, 'ale_php_phpstan_autoload', '') function! ale_linters#php#phpstan#GetCommand(buffer, version) abort let l:configuration = ale#Var(a:buffer, 'php_phpstan_configuration') @@ -12,6 +13,11 @@ function! ale_linters#php#phpstan#GetCommand(buffer, version) abort \ ? ' -c ' . ale#Escape(l:configuration) \ : '' + let l:autoload = ale#Var(a:buffer, 'php_phpstan_autoload') + let l:autoload_option = !empty(l:autoload) + \ ? ' -a ' . ale#Escape(l:autoload) + \ : '' + let l:level = ale#Var(a:buffer, 'php_phpstan_level') let l:config_file_exists = ale#path#FindNearestFile(a:buffer, 'phpstan.neon') @@ -31,6 +37,7 @@ function! ale_linters#php#phpstan#GetCommand(buffer, version) abort return '%e analyze --no-progress' \ . l:error_format \ . l:configuration_option + \ . l:autoload_option \ . l:level_option \ . ' %s' endfunction |