diff options
author | Ian2020 <Ian2020@users.noreply.github.com> | 2020-04-24 11:39:45 +0100 |
---|---|---|
committer | Ian2020 <Ian2020@users.noreply.github.com> | 2020-04-24 11:39:45 +0100 |
commit | 47d941b491844153304b3c87664f847df9d5dae4 (patch) | |
tree | b15f7cee6f3eff5de270b4f9296f7e5918292ab6 /doc | |
parent | 36e5337e30095afb10d02ef2ae362c8d6055e70d (diff) | |
download | ale-47d941b491844153304b3c87664f847df9d5dae4.zip |
Add shellcheck as linter for bats files
Diffstat (limited to 'doc')
-rw-r--r-- | doc/ale-bats.txt | 48 | ||||
-rw-r--r-- | doc/ale-supported-languages-and-tools.txt | 2 |
2 files changed, 50 insertions, 0 deletions
diff --git a/doc/ale-bats.txt b/doc/ale-bats.txt new file mode 100644 index 00000000..2ad98402 --- /dev/null +++ b/doc/ale-bats.txt @@ -0,0 +1,48 @@ +=============================================================================== +ALE Bats Integration *ale-bats-options* + + +=============================================================================== +shellcheck *ale-bats-shellcheck* + +g:ale_bats_shellcheck_executable *g:ale_bats_shellcheck_executable* + *b:ale_bats_shellcheck_executable* + Type: |String| + Default: `'shellcheck'` + + This variable sets executable used for shellcheck. + + +g:ale_bats_shellcheck_options *g:ale_bats_shellcheck_options* + *b:ale_bats_shellcheck_options* + Type: |String| + Default: `''` + + With this variable we are able to pass extra arguments for shellcheck + for shellcheck invocation. + + For example, if we want shellcheck to follow external sources (`see SC1091`) + we can set the variable as such: +> + let g:ale_bats_shellcheck_options = '-x' +< + + +g:ale_bats_shellcheck_change_directory *g:ale_bats_shellcheck_change_directory* + *b:ale_bats_shellcheck_change_directory* + Type: |Number| + Default: `1` + + If set to `1`, ALE will switch to the directory the shell file being + checked with `shellcheck` is in before checking it. This helps `shellcheck` + determine the path to sourced files more easily. This option can be turned + off if you want to control the directory `shellcheck` is executed from + yourself. + + + autocmd BufEnter PKGBUILD,.env + \ let b:ale_bats_shellcheck_exclusions = 'SC2034,SC2154,SC2164' +< + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/doc/ale-supported-languages-and-tools.txt b/doc/ale-supported-languages-and-tools.txt index 636985fb..9fe7bfe5 100644 --- a/doc/ale-supported-languages-and-tools.txt +++ b/doc/ale-supported-languages-and-tools.txt @@ -35,6 +35,8 @@ Notes: * `shell` (-n flag) * `shellcheck` * `shfmt` +* Bats + * `shellcheck` * BibTeX * `bibclean` * Bourne Shell |