Skip to content

Commit e068569

Browse files
committed
CI: add shellcheck
1 parent 234425b commit e068569

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

.github/workflows/lint.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,21 @@ jobs:
5555
- name: Run transaction Fuzzing check
5656
run: make check-tx-fuzzing
5757

58+
shellcheck:
59+
name: Shellcheck - ${{ matrix.os }}
60+
runs-on: ${{ matrix.os }}
61+
strategy:
62+
matrix:
63+
os: [ubuntu-latest]
64+
steps:
65+
- uses: actions/checkout@v4
66+
- name: Install shellcheck
67+
run: |
68+
sudo apt update || true
69+
sudo apt install -y shellcheck || true
70+
- name: Run shellcheck
71+
run: make lint-bash
72+
5873
hadolint:
5974
name: Hadolint - ${{ matrix.os }}
6075
runs-on: ${{ matrix.os }}

Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,16 @@ format-md: ## Format all markdown and MDX files to wrap at 80 characters
162162
lint: ## Run linter (clippy)
163163
cargo clippy --all-targets -- -D warnings --allow clippy::mutable_key_type
164164

165+
.PHONY: lint-bash
166+
lint-bash: ## Check all shell scripts using shellcheck
167+
@echo "Running shellcheck on shell scripts..."
168+
@find . -name "*.sh" \
169+
-not -path "*/target/*" \
170+
-not -path "*/node_modules/*" \
171+
-not -path "*/website/docs/developers/scripts/setup/*" \
172+
-print0 | xargs -0 shellcheck
173+
@echo "Shellcheck completed successfully!"
174+
165175
.PHONY: lint-dockerfiles
166176
lint-dockerfiles: ## Check all Dockerfiles using hadolint
167177
@if [ "$$GITHUB_ACTIONS" = "true" ]; then \

0 commit comments

Comments
 (0)