diff options
author | w0rp <w0rp@users.noreply.github.com> | 2018-09-10 09:24:35 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2018-09-10 09:26:35 +0100 |
commit | c76d8aa0b59f877fbc7d741a18f0c0485b62fb7b (patch) | |
tree | 176f1464fb83014c75e0bc12806fed2c6f8e89f4 | |
parent | 9518ea9accc4376626a14d718984124fc8cd37fc (diff) | |
download | ale-c76d8aa0b59f877fbc7d741a18f0c0485b62fb7b.zip |
Merge pull request #1900 from McSwaggens/masterv2.1.1
Fixed NASM linter from outputting junk file
-rw-r--r-- | ale_linters/nasm/nasm.vim | 2 | ||||
-rw-r--r-- | test/command_callback/test_nasm_nasm_command_callbacks.vader | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/ale_linters/nasm/nasm.vim b/ale_linters/nasm/nasm.vim index 29d19e62..cb2119a6 100644 --- a/ale_linters/nasm/nasm.vim +++ b/ale_linters/nasm/nasm.vim @@ -8,10 +8,12 @@ function! ale_linters#nasm#nasm#GetCommand(buffer) abort " Note that NASM requires a trailing slash for the -I option. let l:separator = has('win32') ? '\' : '/' let l:path = fnamemodify(bufname(a:buffer), ':p:h') . l:separator + let l:output_null = has('win32') ? 'NUL' : '/dev/null' return '%e -X gnu -I ' . ale#Escape(l:path) \ . ale#Pad(ale#Var(a:buffer, 'nasm_nasm_options')) \ . ' %s' + \ . ' -o ' . l:output_null endfunction function! ale_linters#nasm#nasm#Handle(buffer, lines) abort diff --git a/test/command_callback/test_nasm_nasm_command_callbacks.vader b/test/command_callback/test_nasm_nasm_command_callbacks.vader index 0d3e572a..8e077306 100644 --- a/test/command_callback/test_nasm_nasm_command_callbacks.vader +++ b/test/command_callback/test_nasm_nasm_command_callbacks.vader @@ -2,9 +2,9 @@ Before: call ale#assert#SetUpLinterTest('nasm', 'nasm') let b:command_tail = - \ ' -X gnu -I ' . ale#Escape(getcwd() . (has('win32') ? '\' : '/')) . ' %s' + \ ' -X gnu -I ' . ale#Escape(getcwd() . (has('win32') ? '\' : '/')) . ' %s -o ' . (has('win32') ? 'NUL' : '/dev/null') let b:command_tail_opt = - \ ' -X gnu -I ' . ale#Escape(getcwd() . (has('win32') ? '\' : '/')) . ' -w+orphan-labels %s' + \ ' -X gnu -I ' . ale#Escape(getcwd() . (has('win32') ? '\' : '/')) . ' -w+orphan-labels %s -o ' . (has('win32') ? 'NUL' : '/dev/null') After: unlet! b:command_tail @@ -23,7 +23,7 @@ Execute(The options should be configurable): let b:ale_nasm_nasm_options = '-w-macro-params' AssertLinter 'nasm', ale#Escape('nasm') - \ . ' -X gnu -I ' . ale#Escape(getcwd() . (has('win32') ? '\' : '/')) . ' -w-macro-params %s' + \ . ' -X gnu -I ' . ale#Escape(getcwd() . (has('win32') ? '\' : '/')) . ' -w-macro-params %s -o ' . (has('win32') ? 'NUL' : '/dev/null') Execute(The options should be used in command): let b:ale_nasm_nasm_options = '-w+orphan-labels' |