diff options
author | w0rp <w0rp@users.noreply.github.com> | 2018-11-04 10:13:44 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-04 10:13:44 +0000 |
commit | 6aab3fe20929e44401f56bd7fb28cb491a742c8c (patch) | |
tree | 3628b6f4b05dedb29a247ee8c6b2b79093427501 /ale_linters | |
parent | 93180239b9f5bf3d22d28eea2fc7b6d6a3aca09f (diff) | |
parent | f34c089685d1437f523e9c947c06b402f12c4b95 (diff) | |
download | ale-6aab3fe20929e44401f56bd7fb28cb491a742c8c.zip |
Merge pull request #2044 from Steap/bug/1388
PHP linter: make the path to the executable configurable
Diffstat (limited to 'ale_linters')
-rw-r--r-- | ale_linters/php/php.vim | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ale_linters/php/php.vim b/ale_linters/php/php.vim index 6470383b..5d87196c 100644 --- a/ale_linters/php/php.vim +++ b/ale_linters/php/php.vim @@ -1,6 +1,8 @@ " Author: Spencer Wood <https://github.com/scwood>, Adriaan Zonnenberg <amz@adriaan.xyz> " Description: This file adds support for checking PHP with php-cli +call ale#Set('php_php_executable', 'php') + function! ale_linters#php#php#Handle(buffer, lines) abort " Matches patterns like the following: " @@ -30,8 +32,8 @@ endfunction call ale#linter#Define('php', { \ 'name': 'php', -\ 'executable': 'php', +\ 'executable_callback': ale#VarFunc('php_php_executable'), \ 'output_stream': 'stdout', -\ 'command': 'php -l -d error_reporting=E_ALL -d display_errors=1 -d log_errors=0 --', +\ 'command': '%e -l -d error_reporting=E_ALL -d display_errors=1 -d log_errors=0 --', \ 'callback': 'ale_linters#php#php#Handle', \}) |