ci: add always-run repo-wide gofmt gate#6358
Draft
eamonnmoloney wants to merge 1 commit into
Draft
Conversation
Add a PR check that scans every tracked Go file with gofmt and fails on any drift. Unlike the per-chart-version 'make go.fmt' step in the unit-test workflow (matrix-scoped to the chart(s) a PR touches), this is not path-filtered or version-scoped, so it also covers rarely-touched chart versions and the standalone scripts/ modules — the blind spots where drift accumulated. gofmt is syntactic, so a single pass over 'git ls-files "*.go"' covers all modules. Stacked on the gofmt-cleanup (#6311); merge that first so the tree is clean and this gate passes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which problem does the PR fix?
Prevents the
gofmtdrift cleaned up in #6311 from silently returning. The existingmake go.fmtruns only inside the unit-test workflow's per-chart-version matrix, so it checks just the chart(s) a PR touches — drift in untouched versions (8.3–8.x) and in the standalonescripts/modules accumulated unnoticed.What's in this PR?
A new always-run PR check (
Repo - Go Format) that runsgofmt -lover every tracked Go file in one pass (gofmt is syntactic, so no per-module context is needed) and fails on any drift, listing the offending files. Not path-filtered, not version-scoped — it closes both blind spots.Stacked on #6311 (the cleanup). Merge #6311 first; the gate is green once the tree is gofmt-clean. Verified locally: the gate flags all 48 drifted files on current
main, and passes on the #6311-cleaned tree.ci:-typed because it only adds a.github/workflow (no chart files).Checklist
Please make sure to follow our Contributing Guide.
Before opening the PR:
make go.update-golden-only.After opening the PR: