Merge pull request #1820 from SuRaMoN/master

Added phpcs options support as described in #257
This commit is contained in:
w0rp
2018-08-23 22:42:45 +01:00
committed by GitHub
3 changed files with 18 additions and 1 deletions

View File

@@ -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