mirror of
https://github.com/dense-analysis/ale.git
synced 2026-03-01 12:56:57 +08:00
* fix: added support for local solhint executable * feat: added support for matching parse errors * test: added test for solhint command callback and handler * chore: removed command callback test * refactor: made solhint handler structure closer to eslint * refactor(shfmt-fixer): remove derivation of default CLI arguments
18 lines
523 B
VimL
18 lines
523 B
VimL
scriptencoding utf-8
|
|
" Author: Simon Bugert <simon.bugert@gmail.com>
|
|
" Description: Fix sh files with shfmt.
|
|
|
|
call ale#Set('sh_shfmt_executable', 'shfmt')
|
|
call ale#Set('sh_shfmt_options', '')
|
|
|
|
function! ale#fixers#shfmt#Fix(buffer) abort
|
|
let l:executable = ale#Var(a:buffer, 'sh_shfmt_executable')
|
|
let l:options = ale#Var(a:buffer, 'sh_shfmt_options')
|
|
|
|
return {
|
|
\ 'command': ale#Escape(l:executable)
|
|
\ . ' -filename=%s'
|
|
\ . (empty(l:options) ? '' : ' ' . l:options)
|
|
\}
|
|
endfunction
|