Files
ale/autoload/ale/fixers/apkbuild_fixer.vim
T
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

20 lines
785 B
VimL

" Author: Leo <thinkabit.ukim@gmail.com>
" Description: Fix policy violations found by apkbuild-lint
call ale#Set('apkbuild_apkbuild_fixer_executable', 'apkbuild-fixer')
call ale#Set('apkbuild_apkbuild_fixer_lint_executable', get(g:, 'ale_apkbuild_apkbuild_lint_executable'))
call ale#Set('apkbuild_apkbuild_fixer_options', '')
function! ale#fixers#apkbuild_fixer#Fix(buffer) abort
let l:executable = ale#Var(a:buffer, 'apkbuild_apkbuild_fixer_executable')
let l:options = ale#Var(a:buffer, 'apkbuild_apkbuild_fixer_options')
return {
\ 'command': ale#Escape(l:executable)
\ . ' -p ' . ale#Var(a:buffer, 'apkbuild_apkbuild_fixer_lint_executable')
\ . ale#Pad(l:options)
\ . ' %t',
\ 'read_temporary_file': 1,
\}
endfunction