Add puppet-lint config options and documentation (#462)
This commit is contained in:
parent
ceb910e78c
commit
7e0e7359c0
@ -1,10 +1,26 @@
|
|||||||
" Author: Alexander Olofsson <alexander.olofsson@liu.se>
|
" 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
|
||||||
|
|
||||||
call ale#linter#Define('puppet', {
|
call ale#linter#Define('puppet', {
|
||||||
\ 'name': 'puppetlint',
|
\ 'name': 'puppetlint',
|
||||||
\ 'executable': 'puppet-lint',
|
\ 'executable_callback': 'ale_linters#puppet#puppetlint#GetExecutable',
|
||||||
\ 'command': 'puppet-lint --no-autoloader_layout-check'
|
\ 'command_callback': 'ale_linters#puppet#puppetlint#GetCommand',
|
||||||
\ . ' --log-format "-:%{line}:%{column}: %{kind}: [%{check}] %{message}"'
|
|
||||||
\ . ' %t',
|
|
||||||
\ 'callback': 'ale#handlers#gcc#HandleGCCFormat',
|
\ 'callback': 'ale#handlers#gcc#HandleGCCFormat',
|
||||||
\})
|
\})
|
||||||
|
26
doc/ale-puppet.txt
Normal file
26
doc/ale-puppet.txt
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
===============================================================================
|
||||||
|
ALE Puppet Integration *ale-puppet-options*
|
||||||
|
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
puppetlint *ale-puppet-puppetlint*
|
||||||
|
|
||||||
|
g:ale_puppet_puppetlint_executable *g:ale_puppet_puppetlint_executable*
|
||||||
|
|
||||||
|
Type: |String|
|
||||||
|
Default: `'puppet-lint'`
|
||||||
|
|
||||||
|
This variable can be changed to specify the executable used for puppet-lint.
|
||||||
|
|
||||||
|
|
||||||
|
g:ale_puppet_puppetlint_options *g:ale_puppet_puppetlint_options*
|
||||||
|
|
||||||
|
Type: |String|
|
||||||
|
Default: `''`
|
||||||
|
|
||||||
|
This variable can be changed to add command-line arguments to the
|
||||||
|
puppet-lint invocation.
|
||||||
|
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
Loading…
Reference in New Issue
Block a user