Fix Elm linter for Windows (resolves #980)

Looks like elm-make only respects /dev/null, even on Windows. The person
who wrote this linter maybe did not test it on Windows, and wrote the
code in the way you would expect to be solid by using NUL on Windows.
However it seems elm-make is not actually making use of /dev/null but
rather using it as a form of flag. Ironically this seems to be what is
already described in the comments; I added some clarification.
This commit is contained in:
Keith Pinson 2017-10-06 17:26:50 -04:00
parent 47577564a2
commit f21f52343d
1 changed files with 2 additions and 2 deletions

View File

@ -71,11 +71,11 @@ function! ale_linters#elm#make#GetCommand(buffer) abort
" The elm-make compiler, at the time of this writing, uses '/dev/null' as " The elm-make compiler, at the time of this writing, uses '/dev/null' as
" a sort of flag to tell the compiler not to generate an output file, " a sort of flag to tell the compiler not to generate an output file,
" which is why this is hard coded here. " which is why this is hard coded here. It does not use NUL on Windows.
" Source: https://github.com/elm-lang/elm-make/blob/master/src/Flags.hs " Source: https://github.com/elm-lang/elm-make/blob/master/src/Flags.hs
let l:elm_cmd = ale#Escape(l:elm_exe) let l:elm_cmd = ale#Escape(l:elm_exe)
\ . ' --report=json' \ . ' --report=json'
\ . ' --output=' . ale#Escape(g:ale#util#nul_file) \ . ' --output=/dev/null'
return l:dir_set_cmd . ' ' . l:elm_cmd . ' %t' return l:dir_set_cmd . ' ' . l:elm_cmd . ' %t'
endfunction endfunction