Use a function to define shellcheck linters and vars needed, fixes tests

This commit is contained in:
Ian2020
2020-05-08 12:55:54 +01:00
parent 65bea1a5cb
commit ca97f32258
4 changed files with 27 additions and 40 deletions

View File

@@ -1,11 +1,4 @@
" Author: Ian2020 <https://github.com/Ian2020>
" Description: This file adds support for using the shellcheck linter with
" bats scripts. Heavily inspired by/copied from work by w0rp on shellcheck
" for sh files.
" Description: shellcheck linter for bats scripts.
call ale#linter#Define('bats', {
\ 'name': 'shellcheck',
\ 'executable': function('ale#handlers#shellcheck#GetExecutable'),
\ 'command': function('ale#handlers#shellcheck#GetCommand'),
\ 'callback': 'ale#handlers#shellcheck#Handle',
\})
call ale#handlers#shellcheck#DefineLinter('bats')