You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
648 B
VimL

" Author: Alexander Olofsson <alexander.olofsson@liu.se>
" Description: puppet-lint fixer
if !exists('g:ale_puppet_puppetlint_executable')
let g:ale_puppet_puppetlint_executable = 'puppet-lint'
endif
if !exists('g:ale_puppet_puppetlint_options')
let g:ale_puppet_puppetlint_options = ''
endif
function! ale#fixers#puppetlint#Fix(buffer) abort
let l:executable = ale#Var(a:buffer, 'puppet_puppetlint_executable')
return {
\ 'command': ale#Escape(l:executable)
\ . ' ' . ale#Var(a:buffer, 'puppet_puppetlint_options')
\ . ' --fix'
\ . ' %t',
\ 'read_temporary_file': 1,
\}
endfunction