mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-01 09:03:29 +08:00
Close #3325 - Apply new formatting where possible
This commit is contained in:
@@ -501,10 +501,10 @@ endfunction
|
||||
|
||||
function! ale#c#GetMakeCommand(buffer) abort
|
||||
if s:CanParseMakefile(a:buffer)
|
||||
let l:makefile_path = ale#path#FindNearestFile(a:buffer, 'Makefile')
|
||||
let l:path = ale#path#FindNearestFile(a:buffer, 'Makefile')
|
||||
|
||||
if !empty(l:makefile_path)
|
||||
return 'cd '. fnamemodify(l:makefile_path, ':p:h') . ' && make -n'
|
||||
if !empty(l:path)
|
||||
return ale#path#CdString(fnamemodify(l:path, ':h')) . 'make -n'
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
@@ -5,14 +5,13 @@ call ale#Set('ocaml_ocamlformat_executable', 'ocamlformat')
|
||||
call ale#Set('ocaml_ocamlformat_options', '')
|
||||
|
||||
function! ale#fixers#ocamlformat#Fix(buffer) abort
|
||||
let l:filename = expand('#' . a:buffer . ':p')
|
||||
let l:executable = ale#Var(a:buffer, 'ocaml_ocamlformat_executable')
|
||||
let l:options = ale#Var(a:buffer, 'ocaml_ocamlformat_options')
|
||||
|
||||
return {
|
||||
\ 'command': ale#Escape(l:executable)
|
||||
\ . (empty(l:options) ? '' : ' ' . l:options)
|
||||
\ . ' --name=' . ale#Escape(l:filename)
|
||||
\ . ' --name=%s'
|
||||
\ . ' -'
|
||||
\}
|
||||
endfunction
|
||||
|
||||
@@ -29,8 +29,7 @@ function! ale#fixers#rubocop#GetCommand(buffer) abort
|
||||
\ . (!empty(l:config) ? ' --config ' . ale#Escape(l:config) : '')
|
||||
\ . (!empty(l:options) ? ' ' . l:options : '')
|
||||
\ . (l:auto_correct_all ? ' --auto-correct-all' : ' --auto-correct')
|
||||
\ . ' --force-exclusion --stdin '
|
||||
\ . ale#Escape(expand('#' . a:buffer . ':p'))
|
||||
\ . ' --force-exclusion --stdin %s'
|
||||
endfunction
|
||||
|
||||
function! ale#fixers#rubocop#Fix(buffer) abort
|
||||
|
||||
Reference in New Issue
Block a user