summaryrefslogtreecommitdiff
path: root/ale_linters
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2018-08-23 22:42:45 +0100
committerGitHub <noreply@github.com>2018-08-23 22:42:45 +0100
commit7c10249c521d1bb03a90f6ca7f84ecf9f08e62f7 (patch)
tree5c4612b21da7fc0e9fb819d4d040d9033987f4a0 /ale_linters
parentc2f7b379ee475d295a23f4ebb3d271861bba9d98 (diff)
parentf82ab768333d677f692d6301230c55108bf66d40 (diff)
downloadale-7c10249c521d1bb03a90f6ca7f84ecf9f08e62f7.zip
Merge pull request #1820 from SuRaMoN/master
Added phpcs options support as described in #257
Diffstat (limited to 'ale_linters')
-rw-r--r--ale_linters/php/phpcs.vim6
1 files changed, 5 insertions, 1 deletions
diff --git a/ale_linters/php/phpcs.vim b/ale_linters/php/phpcs.vim
index 25e53714..408c2652 100644
--- a/ale_linters/php/phpcs.vim
+++ b/ale_linters/php/phpcs.vim
@@ -3,6 +3,7 @@
let g:ale_php_phpcs_standard = get(g:, 'ale_php_phpcs_standard', '')
+call ale#Set('php_phpcs_options', '')
call ale#Set('php_phpcs_executable', 'phpcs')
call ale#Set('php_phpcs_use_global', get(g:, 'ale_use_global_executables', 0))
@@ -11,8 +12,11 @@ function! ale_linters#php#phpcs#GetCommand(buffer) abort
let l:standard_option = !empty(l:standard)
\ ? '--standard=' . l:standard
\ : ''
+ let l:options = ale#Var(a:buffer, 'php_phpcs_options')
- return '%e -s --report=emacs --stdin-path=%s' . ale#Pad(l:standard_option)
+ return '%e -s --report=emacs --stdin-path=%s'
+ \ . ale#Pad(l:standard_option)
+ \ . ale#Pad(l:options)
endfunction
function! ale_linters#php#phpcs#Handle(buffer, lines) abort