Fix 2816 - Standard fix does not work.

The standard linter --fix fails if the file being input is not relative
to the project root (https://github.com/standard/standard/issues/1384).

This MR attempts to fix this by changing the command so the input file
is relative to the project root and the output is to a temporary file.

Preliminary tests with toy javascript projects seem to indicate this
works fine.
This commit is contained in:
Horacio Sanson committed 2020-03-12 16:29:46 +09:00
1 parent bbe5153fcb
commit c207d6a550
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -27,7 +27,7 @@ function! ale#fixers#standard#Fix(buffer) abort
return {
\ 'command': ale#node#Executable(a:buffer, l:executable)
\ . (!empty(l:options) ? ' ' . l:options : '')
\ . ' --fix %t',
\ . ' --fix --stdin < %s > %t',
\ 'read_temporary_file': 1,
\}
endfunction