diff options
author | w0rp <devw0rp@gmail.com> | 2017-01-22 14:54:57 +0000 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-01-22 14:54:57 +0000 |
commit | d7ed49f84964aebdaa180b553e83943cd85c5d20 (patch) | |
tree | fc71c3fb869ca67864a32d4513cb27f25ce50f69 /ale_linters/php | |
parent | e4a4fcd26bff47b3611887167a0510a5e29cbe3b (diff) | |
download | ale-d7ed49f84964aebdaa180b553e83943cd85c5d20.zip |
Add a script for custom checks to enforce using the abort flag for functions and trailing whitespace, and fix existing issues.
Diffstat (limited to 'ale_linters/php')
-rw-r--r-- | ale_linters/php/hack.vim | 2 | ||||
-rw-r--r-- | ale_linters/php/php.vim | 2 | ||||
-rw-r--r-- | ale_linters/php/phpcs.vim | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/ale_linters/php/hack.vim b/ale_linters/php/hack.vim index bacd835d..5c90247b 100644 --- a/ale_linters/php/hack.vim +++ b/ale_linters/php/hack.vim @@ -1,7 +1,7 @@ " Author: Zefei Xuan <https://github.com/zefei> " Description: Hack type checking (http://hacklang.org/) -function! ale_linters#php#hack#Handle(buffer, lines) +function! ale_linters#php#hack#Handle(buffer, lines) abort let l:pattern = '^\(.*\):\(\d\+\):\(\d\+\),\(\d\+\): \(.\+])\)$' let l:output = [] diff --git a/ale_linters/php/php.vim b/ale_linters/php/php.vim index 573036d8..b807fee9 100644 --- a/ale_linters/php/php.vim +++ b/ale_linters/php/php.vim @@ -1,7 +1,7 @@ " Author: Spencer Wood <https://github.com/scwood> " Description: This file adds support for checking PHP with php-cli -function! ale_linters#php#php#Handle(buffer, lines) +function! ale_linters#php#php#Handle(buffer, lines) abort " Matches patterns like the following: " " Parse error: parse error in - on line 7 diff --git a/ale_linters/php/phpcs.vim b/ale_linters/php/phpcs.vim index 6e64d30e..4b3cabdf 100644 --- a/ale_linters/php/phpcs.vim +++ b/ale_linters/php/phpcs.vim @@ -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) |