Files
ale/autoload/ale/fixers/cmakeformat.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
524 B
VimL

" Author: Attila Maczak <attila@maczak.hu>
" Description: Integration of cmakeformat with ALE.
call ale#Set('cmake_cmakeformat_executable', 'cmake-format')
call ale#Set('cmake_cmakeformat_options', '')
function! ale#fixers#cmakeformat#Fix(buffer) abort
let l:executable = ale#Var(a:buffer, 'cmake_cmakeformat_executable')
let l:options = ale#Var(a:buffer, 'cmake_cmakeformat_options')
return {
\ 'command': ale#Escape(l:executable)
\ . ale#Pad(l:options)
\ . ' -'
\}
endfunction