Add original filename to SyntaxErl command

This commit is contained in:
Dmitri Vereshchagin 2017-08-19 14:08:54 +03:00
parent e9e1bec772
commit 18cb9a725d
2 changed files with 4 additions and 4 deletions

View File

@ -10,7 +10,7 @@ endfunction
function! ale_linters#erlang#syntaxerl#GetCommand(buffer) abort
return ale_linters#erlang#syntaxerl#GetExecutable(a:buffer) . ' %t'
return ale_linters#erlang#syntaxerl#GetExecutable(a:buffer) . ' -b %s %t'
endfunction

View File

@ -17,10 +17,10 @@ Execute (Get SyntaxErl executable):
AssertEqual '/yet/another/syntaxerl', ale_linters#erlang#syntaxerl#GetExecutable(bufnr(''))
Execute (Get SyntaxErl command line):
AssertEqual 'syntaxerl %t', ale_linters#erlang#syntaxerl#GetCommand(bufnr(''))
AssertEqual 'syntaxerl -b %s %t', ale_linters#erlang#syntaxerl#GetCommand(bufnr(''))
let g:ale_erlang_syntaxerl_executable = '/some/other/syntaxerl'
AssertEqual '/some/other/syntaxerl %t', ale_linters#erlang#syntaxerl#GetCommand(bufnr(''))
AssertEqual '/some/other/syntaxerl -b %s %t', ale_linters#erlang#syntaxerl#GetCommand(bufnr(''))
let b:ale_erlang_syntaxerl_executable = '/yet/another/syntaxerl'
AssertEqual '/yet/another/syntaxerl %t', ale_linters#erlang#syntaxerl#GetCommand(bufnr(''))
AssertEqual '/yet/another/syntaxerl -b %s %t', ale_linters#erlang#syntaxerl#GetCommand(bufnr(''))