Skip to content

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

Merged
tekton-robot merged 1 commit into
release-v0.37.xfrom
fix/lint-errors-release-v0.37.x
Jul 10, 2026
Merged

[release-v0.37.x] fix: resolve golangci-lint errors (cherry-pick from main)#3024
tekton-robot merged 1 commit into
release-v0.37.xfrom
fix/lint-errors-release-v0.37.x

Conversation

@divyansh42

@divyansh42 divyansh42 commented Jul 9, 2026

Copy link
Copy Markdown
Member

Changes

  • 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)

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes tests (if functionality changed/added)
  • Run the code checkers with make check
  • Regenerate the manpages, docs and go formatting with make generated
  • Commit messages follow commit message best practices

See the contribution guide
for more details.

Release Notes

NONE

@tekton-robot tekton-robot added do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels 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

@vdemeester vdemeester left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@divyansh42 ideally the PR description should follow the pull request template 🐼

@tekton-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vdemeester

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

The pull request process is described 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 approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 10, 2026
@divyansh42

Copy link
Copy Markdown
Member Author

@divyansh42 ideally the PR description should follow the pull request template 🐼

Ah yes, let me fix it.
Cursor just created the PR 😅

@pratap0007

Copy link
Copy Markdown
Contributor

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 10, 2026
@tekton-robot
tekton-robot merged commit 0c907bc into release-v0.37.x Jul 10, 2026
18 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. 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.

4 participants