summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ale_linters/php/phpcs.vim2
-rw-r--r--test/command_callback/test_phpcs_command_callback.vader6
2 files changed, 7 insertions, 1 deletions
diff --git a/ale_linters/php/phpcs.vim b/ale_linters/php/phpcs.vim
index 45f57cda..408c2652 100644
--- a/ale_linters/php/phpcs.vim
+++ b/ale_linters/php/phpcs.vim
@@ -16,7 +16,7 @@ function! ale_linters#php#phpcs#GetCommand(buffer) abort
return '%e -s --report=emacs --stdin-path=%s'
\ . ale#Pad(l:standard_option)
- \ . ' ' . l:options
+ \ . ale#Pad(l:options)
endfunction
function! ale_linters#php#phpcs#Handle(buffer, lines) abort
diff --git a/test/command_callback/test_phpcs_command_callback.vader b/test/command_callback/test_phpcs_command_callback.vader
index 941a92d6..e5d2f449 100644
--- a/test/command_callback/test_phpcs_command_callback.vader
+++ b/test/command_callback/test_phpcs_command_callback.vader
@@ -27,3 +27,9 @@ Execute(Projects without local executables should use the global one):
AssertLinter 'phpcs',
\ ale#Escape('phpcs') . ' -s --report=emacs --stdin-path=%s'
+
+Execute(User provided options are used):
+ let g:ale_php_phpcs_options = '--my-user-provided-option my-value'
+
+ AssertLinter 'phpcs',
+ \ ale#Escape('phpcs') . ' -s --report=emacs --stdin-path=%s --my-user-provided-option my-value'