Add a script for custom checks to enforce using the abort flag for functions and trailing whitespace, and fix existing issues.

This commit is contained in:
w0rp
2017-01-22 14:54:57 +00:00
parent e4a4fcd26b
commit d7ed49f849
36 changed files with 134 additions and 43 deletions

View File

@@ -1,7 +1,7 @@
" Author: jwilliams108 <https://github.com/jwilliams108>
" Description: phpcs for PHP files
function! ale_linters#php#phpcs#GetCommand(buffer)
function! ale_linters#php#phpcs#GetCommand(buffer) abort
let l:command = 'phpcs -s --report=emacs --stdin-path=%s'
" This option can be set to change the standard used by phpcs
@@ -12,7 +12,7 @@ function! ale_linters#php#phpcs#GetCommand(buffer)
return l:command
endfunction
function! ale_linters#php#phpcs#Handle(buffer, lines)
function! ale_linters#php#phpcs#Handle(buffer, lines) abort
" Matches against lines like the following:
"
" /path/to/some-filename.php:18:3: error - Line indented incorrectly; expected 4 spaces, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)