From f34c089685d1437f523e9c947c06b402f12c4b95 Mon Sep 17 00:00:00 2001 From: Cyril Roelandt Date: Thu, 1 Nov 2018 18:20:48 +0100 Subject: PHP linter: make the path to the executable configurable Fixes #1388 --- ale_linters/php/php.vim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ale_linters') 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 , Adriaan Zonnenberg " 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', \}) -- cgit v1.2.3