Skip to content

Commit f6f9625

Browse files
committed
CI: add shellcheck
1 parent 494d9f9 commit f6f9625

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
@@ -159,6 +159,16 @@ format-md: ## Format all markdown and MDX files to wrap at 80 characters
159159
lint: ## Run linter (clippy)
160160
cargo clippy --all-targets -- -D warnings --allow clippy::mutable_key_type
161161

162+
.PHONY: lint-bash
163+
lint-bash: ## Check all shell scripts using shellcheck
164+
@echo "Running shellcheck on shell scripts..."
165+
@find . -name "*.sh" \
166+
-not -path "*/target/*" \
167+
-not -path "*/node_modules/*" \
168+
-not -path "*/website/docs/developers/scripts/setup/*" \
169+
-print0 | xargs -0 shellcheck --severity=warning --format=gcc
170+
@echo "Shellcheck completed successfully!"
171+
162172
.PHONY: lint-dockerfiles
163173
lint-dockerfiles: ## Check all Dockerfiles using hadolint
164174
@if [ "$$GITHUB_ACTIONS" = "true" ]; then \

0 commit comments

Comments
 (0)