Files
ale/autoload/ale/fixers/dune.vim
Mathis 674a8cced8 Use ale#Pad for option padding across the codebase (#5118)
Standardize option padding by replacing verbose ternary checks with ale#Pad()

Replace patterns like:
(empty(x) ? '' : '' . l:options)

with:
ale#Pad(l:options)

Similar to af5a38c697
2026-04-10 23:12:53 +09:00

17 lines
481 B
VimL

" Author: Albert Peschar <albert@peschar.net>
" Description: Fix files with dune format.
call ale#Set('ocaml_dune_executable', 'dune')
call ale#Set('ocaml_dune_options', '')
function! ale#fixers#dune#Fix(buffer) abort
let l:executable = ale#Var(a:buffer, 'ocaml_dune_executable')
let l:options = ale#Var(a:buffer, 'ocaml_dune_options')
return {
\ 'command': ale#Escape(l:executable)
\ . ' format'
\ . ale#Pad(l:options),
\}
endfunction