Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,11 @@ jobs:

- name: Gofmt check
shell: bash
# Check every Go file in the module, not a hand-kept list of
# folders: the old list (cmd core transport) skipped config,
# examples, protocol, security, services and tests.
run: |
out=$(gofmt -l cmd core transport)
out=$(gofmt -l .)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium · Skipped folders stay unchecked

When a later change narrows the command back to a folder list and the tree has no unformatted files, a later change that restores the old folder list leaves the clean tree green, so an unformatted file in a previously skipped folder passes CI without a regression test catching it.

Add a maintained regression test that verifies the check fails for an unformatted Go file in a previously skipped folder.

Prompt for AI agents
In `.github/workflows/ci.yml` at line 43:

**Skipped folders stay unchecked**

When a later change narrows the command back to a folder list and the tree has no unformatted files, a later change that restores the old folder list leaves the clean tree green, so an unformatted file in a previously skipped folder passes CI without a regression test catching it.

Add a maintained regression test that verifies the check fails for an unformatted Go file in a previously skipped folder.

From TESTING.md L12:

- **Regression** — every fixed defect gets a test that would have caught it.

if [ -n "$out" ]; then
echo "::error::files need gofmt: $out"
exit 1
Expand Down
Loading