chore(ci): build golangci-lint from go.sum to align with project version#2111
Open
chore(ci): build golangci-lint from go.sum to align with project version#2111
Conversation
7 tasks
Retina Code Coverage ReportTotal coverage decreased from
|
| Impacted Files | Coverage | |
|---|---|---|
| pkg/enricher/enricher.go | 57.8% ... 55.0% (-2.8%) |
⬇️ |
alexcastilio
previously approved these changes
Mar 13, 2026
f783b4e to
3eca20f
Compare
7c298b0 to
5d9e01f
Compare
5d9e01f to
3c3421f
Compare
Replace golangci-lint-action (which downloads the latest release) with go build from go.sum, so CI uses the same v1.64.7 as local `make lint`. The binary is built with GOOS=linux GOARCH=amd64 for the host runner, while job-level GOOS/GOARCH env vars direct golangci-lint's analysis to the target platform. Use a YAML block scalar for the lint run step to avoid a YAML parse error caused by the leading double-quoted path. Signed-off-by: Quang Nguyen <nguyenquang@microsoft.com>
3c3421f to
92b476a
Compare
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.
Description
Currently the golangci-lint workflow uses
golangci-lint-actionwithversion: latest, which drifts from the version pinned ingo.sum. This causes lint results in CI that don't reproduce locally viamake lint(#2027).This PR replaces the action with a
go buildstep that builds golangci-lint from the version tracked ingo.sum, so CI uses the exact same version as localmake lint. It also switches from the action'sonly-new-issuesflag to--new-from-revfor incremental linting.Related Issue
Fixes #2027
Checklist
git commit -S -s ...).