summaryrefslogtreecommitdiff
path: root/ale_linters/mercury
diff options
context:
space:
mode:
Diffstat (limited to 'ale_linters/mercury')
-rw-r--r--ale_linters/mercury/mmc.vim8
1 files changed, 3 insertions, 5 deletions
diff --git a/ale_linters/mercury/mmc.vim b/ale_linters/mercury/mmc.vim
index 8a9ccc0e..85969e10 100644
--- a/ale_linters/mercury/mmc.vim
+++ b/ale_linters/mercury/mmc.vim
@@ -5,12 +5,9 @@ call ale#Set('mercury_mmc_executable', 'mmc')
call ale#Set('mercury_mmc_options', '--make --output-compile-error-lines 100')
function! ale_linters#mercury#mmc#GetCommand(buffer) abort
- let l:module_name = expand('#' . a:buffer . ':t:r')
-
- return ale#path#BufferCdString(a:buffer)
- \ . '%e --errorcheck-only '
+ return '%e --errorcheck-only '
\ . ale#Var(a:buffer, 'mercury_mmc_options')
- \ . ' ' . l:module_name
+ \ . ' %s:t:r'
endfunction
function! ale_linters#mercury#mmc#Handle(buffer, lines) abort
@@ -34,6 +31,7 @@ call ale#linter#Define('mercury', {
\ 'name': 'mmc',
\ 'output_stream': 'stderr',
\ 'executable': {b -> ale#Var(b, 'mercury_mmc_executable')},
+\ 'cwd': '%s:h',
\ 'command': function('ale_linters#mercury#mmc#GetCommand'),
\ 'callback': 'ale_linters#mercury#mmc#Handle',
\ 'lint_file': 1,