Skip to content

Commit bfc0c78

Browse files
committed
Add ShellCheck GitHub Actions workflow
Add a shellcheck workflow that validates all .sh scripts on PRs. Runs at severity=error to catch real bugs without blocking on style warnings. Fix two existing shellcheck errors (SC2145) in test scripts where "$@" was used in echo strings instead of "$*".
1 parent 8da6552 commit bfc0c78

3 files changed

Lines changed: 30 additions & 2 deletions

File tree

  • .github/workflows
  • telco-ran/configuration/extra-manifests-builder

.github/workflows/shellcheck.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: ShellCheck
3+
4+
on:
5+
pull_request:
6+
branches:
7+
- main
8+
paths:
9+
- "**/*.sh"
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
shellcheck:
16+
name: Validate Shell Scripts
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
22+
- name: Run ShellCheck
23+
run: |
24+
find . -name '*.sh' \
25+
-not -path './.git/*' \
26+
-not -path './venv/*' \
27+
-not -path './.venv/*' \
28+
-print0 | xargs -0 shellcheck --severity=error

telco-ran/configuration/extra-manifests-builder/01-container-mount-ns-and-kubelet-conf/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
fatal() {
4-
echo "FATAL: $@"
4+
echo "FATAL: $*"
55
exit 1
66
}
77

telco-ran/configuration/extra-manifests-builder/08-set-rcu-normal/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
fatal() {
4-
echo "FATAL: $@"
4+
echo "FATAL: $*"
55
exit 1
66
}
77

0 commit comments

Comments
 (0)