summaryrefslogtreecommitdiff
path: root/ale_linters/erlang
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-08-19 15:48:29 +0100
committerw0rp <devw0rp@gmail.com>2017-08-19 15:48:29 +0100
commit20e64fbae092e7307c4f01d82fa0e0082c3bb1cb (patch)
tree386644e3d48afbd9b8af8e8de4c100cb93df02e6 /ale_linters/erlang
parentf8de08faf0c23ac4b76e610f685dcf6c3dfdf180 (diff)
downloadale-20e64fbae092e7307c4f01d82fa0e0082c3bb1cb.zip
#860 Only enable the new option for setting the original filename for SyntaxErl if an option is on in ALE
Diffstat (limited to 'ale_linters/erlang')
-rw-r--r--ale_linters/erlang/syntaxerl.vim9
1 files changed, 8 insertions, 1 deletions
diff --git a/ale_linters/erlang/syntaxerl.vim b/ale_linters/erlang/syntaxerl.vim
index 7a94856a..e7d006b4 100644
--- a/ale_linters/erlang/syntaxerl.vim
+++ b/ale_linters/erlang/syntaxerl.vim
@@ -2,6 +2,7 @@
" Description: SyntaxErl linter for Erlang files
call ale#Set('erlang_syntaxerl_executable', 'syntaxerl')
+call ale#Set('erlang_syntaxerl_use_basename', 0)
function! ale_linters#erlang#syntaxerl#GetExecutable(buffer) abort
@@ -10,7 +11,13 @@ endfunction
function! ale_linters#erlang#syntaxerl#GetCommand(buffer) abort
- return ale_linters#erlang#syntaxerl#GetExecutable(a:buffer) . ' -b %s %t'
+ let l:base_options = ale#Var(a:buffer, 'erlang_syntaxerl_use_basename')
+ \ ? ' -b %s'
+ \ : ''
+
+ return ale_linters#erlang#syntaxerl#GetExecutable(a:buffer)
+ \ . l:base_options
+ \ . ' %t'
endfunction