Skip to content

[release-v0.37.x] fix: resolve golangci-lint errors (cherry-pick from main)#3024

Open
divyansh42 wants to merge 1 commit into
release-v0.37.xfrom
fix/lint-errors-release-v0.37.x
Open

[release-v0.37.x] fix: resolve golangci-lint errors (cherry-pick from main)#3024
divyansh42 wants to merge 1 commit into
release-v0.37.xfrom
fix/lint-errors-release-v0.37.x

Conversation

@divyansh42

Copy link
Copy Markdown
Member

Summary

  • Cherry-pick lint fixes from main to release-v0.37.x to unblock CI for all open PRs on this branch
  • cmd/tkn/main.go: suppress G702 (command injection) with #nosec annotation
  • pkg/formatted/color.go: suppress G115 (integer overflow int→uint32) with nolint annotation
  • pkg/plugins/plugins.go: suppress G703 (path traversal) with #nosec annotation
  • pkg/suggestion/suggest.go: rename local variable min to minCost to avoid shadowing the built-in min function (revive: redefines-builtin-id)

Test plan

  • CI lint check passes
  • No functional changes — only lint suppressions and a variable rename

/release-note-none

Made with Cursor

@tekton-robot tekton-robot added the do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. label Jul 9, 2026
@tekton-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please ask for approval from divyansh42 after the PR has been reviewed.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jul 9, 2026
@divyansh42 divyansh42 force-pushed the fix/lint-errors-release-v0.37.x branch from b07dda3 to 70c1fd2 Compare July 9, 2026 15:46
- cmd/tkn/main.go: suppress G702 (command injection) with nosec
  annotation, exCmd comes from plugin discovery path
- pkg/formatted/color.go: suppress G115 (integer overflow int->uint32)
  with nolint annotation, threshold is bounded by palette length
- pkg/plugins/plugins.go: suppress G703 (path traversal) with nosec
  annotation, fpath is from filepath.Join with validated path
- pkg/suggestion/suggest.go: rename local variable 'min' to 'minCost'
  to avoid shadowing the built-in min function

Signed-off-by: Divyanshu Agrawal <diagrawa@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@divyansh42 divyansh42 force-pushed the fix/lint-errors-release-v0.37.x branch from 70c1fd2 to 0607b89 Compare July 9, 2026 15:53
@divyansh42

Copy link
Copy Markdown
Member Author

/retest

@divyansh42

Copy link
Copy Markdown
Member Author

/release-note-none

@tekton-robot tekton-robot added release-note-none Denotes a PR that doesnt merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Jul 9, 2026
@divyansh42

Copy link
Copy Markdown
Member Author

/retest

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

Labels

release-note-none Denotes a PR that doesnt merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants