Skip to content

Migration to golangci-lint v2…#8745

Merged
tekton-robot merged 1 commit intotektoncd:mainfrom
vdemeester:golangci-2-migration
May 12, 2025
Merged

Migration to golangci-lint v2…#8745
tekton-robot merged 1 commit intotektoncd:mainfrom
vdemeester:golangci-2-migration

Conversation

@vdemeester
Copy link
Member

@vdemeester vdemeester commented May 6, 2025

Changes

Also updating the action as it is tied to it.

Signed-off-by: Vincent Demeester vincent@sbr.pm

Closes #8740

/kind misc

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • Has Docs if any changes are user facing, including updates to minimum requirements e.g. Kubernetes version bumps
  • Has Tests included if any functionality added or changed
  • pre-commit Passed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including functionality, content, code)
  • Has a kind label. You can add one by adding a comment on this PR that contains /kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep
  • Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings). See some examples of good release notes.
  • Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

NONE

@tekton-robot tekton-robot added kind/misc Categorizes issue or PR as a miscellaneuous one. release-note-none Denotes a PR that doesnt merit a release note. labels May 6, 2025
@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 6, 2025
@tekton-robot tekton-robot requested review from abayer and afrittoli May 6, 2025 11:48
@vdemeester
Copy link
Member Author

cc @waveywaves

@vdemeester vdemeester force-pushed the golangci-2-migration branch 2 times, most recently from f9b85f7 to d6b0335 Compare May 7, 2025 07:25
@vdemeester
Copy link
Member Author

/cc @waveywaves

@tekton-robot tekton-robot requested a review from waveywaves May 7, 2025 08:50
- pkg/client
- pkg/spire/test
- third_party$
- builtin$
Copy link
Member

Choose a reason for hiding this comment

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

Comment on lines -195 to -196
- EXC0012 # https://golangci-lint.run/usage/false-positives/#exc0012
- EXC0014 # https://golangci-lint.run/usage/false-positives/#exc0014
Copy link
Member

Choose a reason for hiding this comment

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

should we still keep these rules, they are good for documentation

- EXC0012  # Checks if exported elements have comments
- EXC0014  # Checks if comments on exported elements have proper form

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah I ran golangci-lint migrate and it removed it, I wonder if it's still something configurable or not.

Copy link
Member

Choose a reason for hiding this comment

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

I think we can add it later, it's not a blocker

Copy link
Member

Choose a reason for hiding this comment

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

TODO ^

Copy link
Member

Choose a reason for hiding this comment

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

I think golangci-lint v2 no longer has "off-by-default" functionality.
Apart from path specific exclusions, the new configuation is

  exclusions:
    generated: lax
    presets:
      - common-false-positives
      - legacy
      - std-error-handling

Which I think means that those comment rules are on.
It should be possible to verify by breaking a comment and running lint

Copy link
Member

Choose a reason for hiding this comment

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

Thank you for checking this Andrea

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: waveywaves

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 May 12, 2025
@vdemeester
Copy link
Member Author

@afrittoli @abayer 🙏🏼

Also updating the action as it is tied to it.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
@abayer
Copy link
Contributor

abayer commented May 12, 2025

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label May 12, 2025
@tekton-robot tekton-robot merged commit 475894b into tektoncd:main May 12, 2025
20 checks passed
@vdemeester vdemeester deleted the golangci-2-migration branch May 12, 2025 10:22
@waveywaves
Copy link
Member

/cherry-pick release-v1.0.x

@tekton-robot
Copy link
Collaborator

@waveywaves: new pull request created: #8942

Details

In response to this:

/cherry-pick release-v1.0.x

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

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. kind/misc Categorizes issue or PR as a miscellaneuous one. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesnt merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants