2017-04-12 22:23:25 +00:00
|
|
|
" Author: Alexander Olofsson <alexander.olofsson@liu.se>, Robert Flechtner <flechtner@chemmedia.de>
|
|
|
|
" Description: puppet-lint for puppet files
|
|
|
|
|
|
|
|
let g:ale_puppet_puppetlint_executable =
|
|
|
|
\ get(g:, 'ale_puppet_puppetlint_executable', 'puppet-lint')
|
|
|
|
|
|
|
|
let g:ale_puppet_puppetlint_options =
|
|
|
|
\ get(g:, 'ale_puppet_puppetlint_options', '')
|
|
|
|
|
|
|
|
function! ale_linters#puppet#puppetlint#GetExecutable(buffer) abort
|
|
|
|
return g:ale_puppet_puppetlint_executable
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
function! ale_linters#puppet#puppetlint#GetCommand(buffer) abort
|
|
|
|
return ale_linters#puppet#puppetlint#GetExecutable(a:buffer)
|
|
|
|
\ . ' ' . g:ale_puppet_puppetlint_options
|
|
|
|
\ . ' --log-format "-:%{line}:%{column}: %{kind}: [%{check}] %{message}"'
|
|
|
|
\ . ' %t'
|
|
|
|
endfunction
|
2016-11-25 12:00:07 +00:00
|
|
|
|
|
|
|
call ale#linter#Define('puppet', {
|
|
|
|
\ 'name': 'puppetlint',
|
2017-04-12 22:23:25 +00:00
|
|
|
\ 'executable_callback': 'ale_linters#puppet#puppetlint#GetExecutable',
|
|
|
|
\ 'command_callback': 'ale_linters#puppet#puppetlint#GetCommand',
|
2017-04-11 19:32:57 +00:00
|
|
|
\ 'callback': 'ale#handlers#gcc#HandleGCCFormat',
|
2016-11-25 12:00:07 +00:00
|
|
|
\})
|