ci: run go fix as part of the lint workflow#90
Open
marten-seemann wants to merge 1 commit into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #90 +/- ##
=======================================
Coverage 93.55% 93.55%
=======================================
Files 4 4
Lines 186 186
=======================================
Hits 174 174
Misses 6 6
Partials 6 6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the lint CI workflow to run go fix -diff ./... (on Go 1.25.x) and applies the corresponding go fix rewrite to a helper in qpack_test.go.
Changes:
- Add a
go fix -diff ./...step to the lint workflow for Go 1.25.x. - Update
replaceRandomCharacterinqpack_test.gopergo fixoutput. - Adjust lint workflow step conditions so
golangci-lintcan run even ifgo fixfails.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| qpack_test.go | Applies go fix-driven simplification to the replaceRandomCharacter test helper. |
| .github/workflows/lint.yml | Adds a go fix -diff step and updates conditional execution for lint steps. |
Comments suppressed due to low confidence (1)
.github/workflows/lint.yml:28
- The step-level
if: success() || failure()conditions are broader than intended: they makego fix/golangci-lintrun even ifactions/setup-gofails, which can create misleading secondary errors (e.g.,go: command not found) and obscure the root cause. Consider (1) lettinggo fixrun only when Go setup succeeded, and (2) runninggolangci-lintwithalways()but gated onsetup-gosuccess so it still runs whengo fixfails (the stated goal) without running after a failed toolchain setup.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Run
go fix -diffas part of the lint workflowgo fix -diff ./...for Go 1.25.x, surfacing any fixes suggested by the current Go toolchain.qpack_test.goto applygo fixchanges to thereplaceRandomCharacterhelper, replacing intermediate variable usage with direct slice concatenation.golangci-lintstep is updated withif: success() || failure()so it still runs even when thego fixstep fails.Macroscope summarized 05f5846.