Skip to content

Commit 2fcdd8f

Browse files
committed
chore: add static checks workflow for #320 phase C
1 parent a113aa8 commit 2fcdd8f

5 files changed

Lines changed: 86 additions & 5 deletions

File tree

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Static Checks
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
paths:
8+
- "**/*.sh"
9+
- "**/*.bash"
10+
- "**/*.zsh"
11+
- ".github/workflows/**"
12+
- ".github/workflows/static-checks.yaml"
13+
push:
14+
branches:
15+
- main
16+
paths:
17+
- "**/*.sh"
18+
- "**/*.bash"
19+
- "**/*.zsh"
20+
- ".github/workflows/**"
21+
- ".github/workflows/static-checks.yaml"
22+
23+
defaults:
24+
run:
25+
shell: bash
26+
27+
jobs:
28+
shell-static:
29+
name: ShellCheck and shfmt
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v6
34+
35+
- name: Install shellcheck and shfmt
36+
run: |
37+
sudo apt-get update
38+
sudo apt-get install -y shellcheck shfmt
39+
40+
- name: Run shellcheck
41+
run: |
42+
mapfile -t shell_files < <(git ls-files '*.sh' '*.bash' '*.zsh' | grep -v '^submodules/' || true)
43+
if [ "${#shell_files[@]}" -eq 0 ]; then
44+
echo "No shell files found"
45+
exit 0
46+
fi
47+
shellcheck "${shell_files[@]}"
48+
49+
- name: Run shfmt diff check
50+
run: |
51+
mapfile -t shell_files < <(git ls-files '*.sh' '*.bash' '*.zsh' | grep -v '^submodules/' || true)
52+
if [ "${#shell_files[@]}" -eq 0 ]; then
53+
echo "No shell files found"
54+
exit 0
55+
fi
56+
shfmt -d "${shell_files[@]}"
57+
58+
actionlint:
59+
name: actionlint
60+
runs-on: ubuntu-latest
61+
steps:
62+
- name: Checkout
63+
uses: actions/checkout@v6
64+
65+
- name: Run actionlint
66+
uses: rhysd/actionlint@v1

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@
33
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
44

55

6+
---
7+
## [0.1.23] - 2026-04-09
8+
9+
### Added
10+
11+
- Added `.github/workflows/static-checks.yaml` to introduce Phase C CI scaffolding for `shellcheck`, `shfmt -d`, and `actionlint` as part of #320 code-scanning transition.
12+
13+
### Changed
14+
15+
- Updated `docs/plans/bsctl-codeql-decommission-plan.md` with Phase C status and immediate next steps for static-check validation before CodeQL re-scope/removal.
16+
617
---
718
## [0.1.22] - 2026-04-09
819

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# BasicSetupCliVersion - constant for semantic versioning
2-
BasicSetupCliVersion: "0.1.22"
2+
BasicSetupCliVersion: "0.1.23"

docs/plans/bsctl-codeql-decommission-plan.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ Retire remaining `bsctl` Go CLI and CodeQL dependencies without breaking release
4646
- Re-scope or remove `.github/workflows/codeql.yaml` only after replacement checks are enforced in CI.
4747
- Document rationale and replacement security posture.
4848

49+
Current status:
50+
51+
- Added `.github/workflows/static-checks.yaml` scaffolding for `shellcheck`, `shfmt -d`, and `actionlint`.
52+
4953
### Phase D: `bsctl/` retirement
5054

5155
- Remove remaining `bsctl/` tree once dependencies and references are eliminated.
@@ -61,6 +65,6 @@ Retire remaining `bsctl` Go CLI and CodeQL dependencies without breaking release
6165

6266
## Immediate Next Steps
6367

64-
1. Complete Phase B PR merge and verify workflow parity on `main`.
65-
2. Start Phase C by adding shell/workflow static checks (`shellcheck`, `shfmt -d`, `actionlint`) in CI.
66-
3. Reassess CodeQL scope and retire/re-scope `.github/workflows/codeql.yaml` once replacement checks are stable.
68+
1. Validate `.github/workflows/static-checks.yaml` in CI and tune file targeting/exclusions for stable signal.
69+
2. Reassess CodeQL scope and retire/re-scope `.github/workflows/codeql.yaml` once replacement checks are stable.
70+
3. Update issue #320 acceptance checkboxes as Phase C milestones complete.

resources/version.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# BasicSetupCliVersion - primary version source for releases and docs bump automation
2-
BasicSetupCliVersion: "0.1.22"
2+
BasicSetupCliVersion: "0.1.23"

0 commit comments

Comments
 (0)