Switched to linter plugin #19

Merged
sev merged 3 commits from linter-plugin into master 5 years ago
  1. 17
      .ci/lint-shell.sh
  2. 14
      .ci/lint-yaml.sh
  3. 9
      .shellcheckrc
  4. 18
      .woodpecker.yml
  5. 0
      .yamllint.yml

17
.ci/lint-shell.sh

@ -1,17 +0,0 @@
#!/usr/bin/env bash
RET=0
CUR_DIR=$(pwd)
SHELL_FILES=".bash_profile .bashrc"
SHELL_FILES="${SHELL_FILES} $(find \"${CUR_DIR}\" -type f -name '*.sh')"
for SH_F in ${SHELL_FILES[*]}; do
shellcheck --color=always \
--severity=style \
"${SH_F}" \
|| RET=${?}
done
exit ${RET}

14
.ci/lint-yaml.sh

@ -1,14 +0,0 @@
#!/usr/bin/env bash
RET=0
CUR_DIR=$(pwd)
YAML_FILES=$(find "${CUR_DIR}" -type f \( -iname '*.yml' -or -iname '*.yaml' \))
for YM_F in ${YAML_FILES[*]}; do
yamllint -c "${CUR_DIR}/.ci/yamllint.yml" "${YM_F}" \
|| RET=${?}
done
exit ${RET}

9
.shellcheckrc

@ -0,0 +1,9 @@
shell=bash
color=always
severity=error
# Ignore missing shebang
disable=SC2148
# Ignore slackware's ${LS_OPTIONS}
disable=SC2139
# Don't follow includes
disable=SC1091

18
.woodpecker.yml

@ -1,18 +1,20 @@
---
pipeline:
lint-shell:
image: koalaman/shellcheck-alpine:stable
image: sevoid/linter:plugin
pull: true
group: lint
commands:
- apk add --no-cache bash
- bash ./.ci/lint-shell.sh
lint: shell
files:
- ".bashrc"
- ".bash_profile"
- ".bash_aliases"
lint-yaml:
image: sdesbure/yamllint:latest
image: sevoid/linter:plugin
pull: true
group: lint
commands:
- apk add --no-cache bash
- bash ./.ci/lint-yaml.sh
lint: yaml
branches:
exlude: [ master ]

0
.ci/yamllint.yml → .yamllint.yml

Loading…
Cancel
Save