chore(router): gofmt check in CI (#2576)#2583
Conversation
WalkthroughThis PR adds Go code formatting enforcement across the repository. A new GitHub Action step verifies gofmt compliance in CI, while format Makefile targets are added to multiple modules to run Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Router-nonroot image scan passed✅ No security vulnerabilities found in image: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2583 +/- ##
===========================================
+ Coverage 45.67% 63.34% +17.66%
===========================================
Files 1032 249 -783
Lines 138877 26643 -112234
Branches 8628 0 -8628
===========================================
- Hits 63435 16876 -46559
+ Misses 73716 8404 -65312
+ Partials 1726 1363 -363
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/actions/go-linter/action.yaml:
- Around line 25-34: The gofmt check in the "Check gofmt formatting" workflow
step currently uses a non-recursive pattern (`gofmt -l .`) which misses
subdirectories; update the shell command that populates the `files` variable to
use the recursive pattern (`gofmt -l ./...`) so it matches the project's `make
format`/`go fmt ./...` behavior and detects unformatted Go files in
subdirectories.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 4370e009-40b3-4349-9061-26db807de6af
📒 Files selected for processing (6)
.github/actions/go-linter/action.yamlaws-lambda-router/Makefilecomposition-go/Makefilegraphqlmetrics/Makefilerouter-tests/Makefilerouter/Makefile
|
fyi I removed the Makefile, husky, etc. stuff because #2579 already adds that |
|
If we merge my PR first, you could then just call |
|
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
Summary by CodeRabbit
Checklist
Adds
gofmtvalidation in go-linter Github action, which is enforced in router/, router-tests/, aws-lambda-router/, graphqlmetrics/ and composition-go/ directories