Unify golangci-lint: replace Docker-based lint with go run pattern#1046
Open
aravindtga wants to merge 1 commit into
Open
Unify golangci-lint: replace Docker-based lint with go run pattern#1046aravindtga wants to merge 1 commit into
aravindtga wants to merge 1 commit into
Conversation
✅ Deploy Preview for kpt-porch ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
f8243fb to
8affcc2
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR primarily updates Go linting to run golangci-lint via go run with a pinned version, and applies various gofmt/alignment cleanups in Go test files.
Changes:
- Switch
make lintto run golangci-lint viago runand introduce a new golangci-lint version variable. - Add a golangci-lint exclusion rule for a govet “inline: cannot inline” message.
- Apply formatting fixes in several Go tests (imports/spacing/newlines).
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/task/generictaskhandler_test.go | Formatting/alignment tweaks in test resource maps |
| make/go.mk | Replace container/host branching lint logic with go run ...@version |
| controllers/packagerevisions/pkg/controllers/packagerevision/render_test.go | Import order and whitespace formatting cleanups |
| controllers/packagerevisions/pkg/controllers/packagerevision/labels_test.go | Fix malformed test function formatting |
| .golangci.json | Add exclusion for govet “inline: cannot inline” message |
8affcc2 to
45dd652
Compare
liamfallon
previously approved these changes
Jun 17, 2026
7e0de91 to
43bdccf
Compare
43bdccf to
39cb709
Compare
39cb709 to
0287886
Compare
Signed-off-by: Aravindhan Ayyanathan <aravindhan.a@est.tech>
0287886 to
82bfda6
Compare
|
liamfallon
approved these changes
Jun 18, 2026
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
golangci-lintinvocation withgo run, renameGOLANG_CI_VERtoGOLANGCI_LINT_VERSION, bump tov2.12.2. Add exclusion forgovetinlineanalyzer's known generics limitation. Fixgofmtformatting issues in test files.go runis simpler, reproducible, and consistent with the pattern used in the other repos (kpt, krm-functions-sdk, krm-functions-catalog).go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v$(GOLANGCI_LINT_VERSION)downloads and runs the exact pinned version without needing Docker or a pre-installed binary.Type of Change
Checklist
AI Disclosure
If so, please describe how:
- Kiro to assist with the Makefile refactoring and
.golangci.jsonconfiguration.