summaryrefslogtreecommitdiff
path: root/ale_linters/asm
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2019-05-20 13:00:32 +0100
committerw0rp <devw0rp@gmail.com>2019-05-20 13:00:32 +0100
commit5e64acc6abeb61d4a10864b24df763327663f240 (patch)
treee49da2e872346d8f9bbe15995e285f154d61f47e /ale_linters/asm
parent4ee28d312976e463a3373f6170cd5a0cdd1bcf3c (diff)
downloadale-5e64acc6abeb61d4a10864b24df763327663f240.zip
Fix #2512 - Use -o /dev/null for gcc linting
Diffstat (limited to 'ale_linters/asm')
-rw-r--r--ale_linters/asm/gcc.vim5
1 files changed, 4 insertions, 1 deletions
diff --git a/ale_linters/asm/gcc.vim b/ale_linters/asm/gcc.vim
index 72b293c0..eecab6ef 100644
--- a/ale_linters/asm/gcc.vim
+++ b/ale_linters/asm/gcc.vim
@@ -5,7 +5,10 @@ call ale#Set('asm_gcc_executable', 'gcc')
call ale#Set('asm_gcc_options', '-Wall')
function! ale_linters#asm#gcc#GetCommand(buffer) abort
- return '%e -x assembler -fsyntax-only '
+ " `-o /dev/null` or `-o null` is needed to catch all errors,
+ " -fsyntax-only doesn't catch everything.
+ return '%e -x assembler'
+ \ . ' -o ' . g:ale#util#nul_file
\ . '-iquote ' . ale#Escape(fnamemodify(bufname(a:buffer), ':p:h'))
\ . ' ' . ale#Var(a:buffer, 'asm_gcc_options') . ' -'
endfunction