feat: Add shellcheck to CI and Make target (#10)

This commit is contained in:
Yuming Long 2022-09-29 15:24:28 -04:00 committed by GitHub
parent 64e1c725eb
commit 8eba1b6006
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 0 deletions

View File

@ -57,6 +57,13 @@ jobs:
source .venv/bin/activate
make check
shellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ShellCheck
uses: ludeeus/action-shellcheck@master
test:
runs-on: ubuntu-latest
env:

View File

@ -109,6 +109,12 @@ check-tests:
black --line-length 100 test_${PACKAGE_NAME} --check
flake8 test_${PACKAGE_NAME}
## check-scripts: run shellcheck
.PHONY: check-scripts
check-scripts:
# Fail if any of these files have warnings
scripts/shellcheck.sh
## tidy: run black
.PHONY: tidy
tidy:

4
scripts/shellcheck.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
find scripts -name "*.sh" -exec shellcheck {} +