From d7ed49f84964aebdaa180b553e83943cd85c5d20 Mon Sep 17 00:00:00 2001 From: w0rp Date: Sun, 22 Jan 2017 14:54:57 +0000 Subject: Add a script for custom checks to enforce using the abort flag for functions and trailing whitespace, and fix existing issues. --- ale_linters/php/hack.vim | 2 +- ale_linters/php/php.vim | 2 +- ale_linters/php/phpcs.vim | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'ale_linters/php') 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 " 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 " 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 " 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) -- cgit v1.2.3