summaryrefslogtreecommitdiff
path: root/ale_linters
diff options
context:
space:
mode:
authorIan2020 <Ian2020@users.noreply.github.com>2020-05-08 12:55:54 +0100
committerIan2020 <Ian2020@users.noreply.github.com>2020-05-08 12:55:54 +0100
commitca97f32258cc6e3f32b5f7605801f053e7dbe320 (patch)
treef593cbc9af75248f995f5eee23c3b46ad477829d /ale_linters
parent65bea1a5cbbc8ff2557410263c87c2e02cb4a42c (diff)
downloadale-ca97f32258cc6e3f32b5f7605801f053e7dbe320.zip
Use a function to define shellcheck linters and vars needed, fixes tests
Diffstat (limited to 'ale_linters')
-rw-r--r--ale_linters/bats/shellcheck.vim11
-rw-r--r--ale_linters/sh/shellcheck.vim10
2 files changed, 4 insertions, 17 deletions
diff --git a/ale_linters/bats/shellcheck.vim b/ale_linters/bats/shellcheck.vim
index b5a1184b..5c2a0ea9 100644
--- a/ale_linters/bats/shellcheck.vim
+++ b/ale_linters/bats/shellcheck.vim
@@ -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')
diff --git a/ale_linters/sh/shellcheck.vim b/ale_linters/sh/shellcheck.vim
index fbd7e49b..d9945126 100644
--- a/ale_linters/sh/shellcheck.vim
+++ b/ale_linters/sh/shellcheck.vim
@@ -1,10 +1,4 @@
" Author: w0rp <devw0rp@gmail.com>
-" Description: This file adds support for using the shellcheck linter with
-" shell scripts.
+" Description: shellcheck linter for shell scripts.
-call ale#linter#Define('sh', {
-\ 'name': 'shellcheck',
-\ 'executable': function('ale#handlers#shellcheck#GetExecutable'),
-\ 'command': function('ale#handlers#shellcheck#GetCommand'),
-\ 'callback': 'ale#handlers#shellcheck#Handle',
-\})
+call ale#handlers#shellcheck#DefineLinter('sh')