Skip to content

ci: run go fix as part of the lint workflow#90

Open
marten-seemann wants to merge 1 commit into
masterfrom
go-fix
Open

ci: run go fix as part of the lint workflow#90
marten-seemann wants to merge 1 commit into
masterfrom
go-fix

Conversation

@marten-seemann

@marten-seemann marten-seemann commented Jun 22, 2026

Copy link
Copy Markdown
Member

Run go fix -diff as part of the lint workflow

  • Adds a new step in lint.yml that runs go fix -diff ./... for Go 1.25.x, surfacing any fixes suggested by the current Go toolchain.
  • Updates qpack_test.go to apply go fix changes to the replaceRandomCharacter helper, replacing intermediate variable usage with direct slice concatenation.
  • The golangci-lint step is updated with if: success() || failure() so it still runs even when the go fix step fails.

Macroscope summarized 05f5846.

Copilot AI review requested due to automatic review settings June 22, 2026 15:32
@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.55%. Comparing base (77b3bdb) to head (05f5846).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 replaceRandomCharacter in qpack_test.go per go fix output.
  • Adjust lint workflow step conditions so golangci-lint can run even if go fix fails.

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 make go fix/golangci-lint run even if actions/setup-go fails, which can create misleading secondary errors (e.g., go: command not found) and obscure the root cause. Consider (1) letting go fix run only when Go setup succeeded, and (2) running golangci-lint with always() but gated on setup-go success so it still runs when go fix fails (the stated goal) without running after a failed toolchain setup.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codspeed-hq

codspeed-hq Bot commented Jun 22, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 4 untouched benchmarks


Comparing go-fix (05f5846) with master (77b3bdb)

Open in CodSpeed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants