Skip to content

Commit

Permalink
chore: Lint Shell scripts
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin Heisig <[email protected]>
  • Loading branch information
bheisig committed May 3, 2024
1 parent 76573cc commit 044879b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
- docker-compose
- dockerfile
- jenkinsfile
- shell
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ RUN apt-get update; \
python3-venv \
rsync \
tar \
xz-utils \
;\
apt-get clean; \
rm -rf /var/lib/apt/lists/*
Expand All @@ -60,6 +61,17 @@ RUN touch /var/mail/ubuntu; \

WORKDIR /tmp/

# shellcheck:
# renovate: datasource=github-releases depName=koalaman/shellcheck
ARG SHELLCHECK_VERSION=0.10.0
RUN curl -OfsSL \
"https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.linux.x86_64.tar.xz"; \
tar -xf "shellcheck-v${SHELLCHECK_VERSION}.linux.x86_64.tar.xz"; \
install -m 755 -o root -g root "shellcheck-v${SHELLCHECK_VERSION}/shellcheck" /usr/local/bin/; \
rm -r \
"shellcheck-v${SHELLCHECK_VERSION}/" \
"shellcheck-v${SHELLCHECK_VERSION}.linux.x86_64.tar.xz"

# hadolint:
# renovate: datasource=github-releases depName=hadolint/hadolint
ARG HADOLINT_VERSION=2.12.0
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
"system:pip:outdated": "pip list --outdated",
"test": "run-s test:*",
"test:markdown": "remark --rc-path .config/remark.json --ignore-path .gitignore .",
"test:shell": "git ls-files | grep -e '\\.sh$' | xargs shellcheck",
"test:spelling": "cspell '**/*.md' --config .config/cspell.json --gitignore --no-progress --relative --show-context",
"test:wording": "alex",
"test:ec": "ec",
Expand Down

0 comments on commit 044879b

Please sign in to comment.