Skip to content

Add version in .golangci.yml #316

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 2, 2025

Conversation

HeavyWombat
Copy link
Contributor

@HeavyWombat HeavyWombat commented May 19, 2025

Changes

Ref: #312

Add version in .golangci.yml to unblock updates of golangci/golangci-lint-action.

Submitter Checklist

  • Includes tests if functionality changed/was added
  • Includes docs if changes are user-facing
  • Set a kind label on this PR
  • Release notes block has been filled in, or marked NONE

See the contributor guide
for details on coding conventions, github and prow interactions, and the code review process.

Release Notes

NONE

@HeavyWombat HeavyWombat added the kind/dependency-change Categorizes issue or PR as related to changing dependencies label May 19, 2025
@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label May 19, 2025
@openshift-ci openshift-ci bot requested review from adambkaplan and qu1queee May 19, 2025 15:29
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 6 to 8.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](golangci/golangci-lint-action@v6...v8)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@HeavyWombat HeavyWombat force-pushed the use/golangci-lint-version-field branch 2 times, most recently from 00f1427 to 694f029 Compare May 19, 2025 15:39
with:
args: --timeout=10m
args: --new-from-rev=HEAD~ --timeout=10m
Copy link
Member

Choose a reason for hiding this comment

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

Where will we find about them then ?

I know it has always been painful (having gosec specifically in mind) that you cannot PR something anymore because you first have to fix new findings due to a tool update, but if we would not be that strict I would assume nobody takes care of that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can open an issue with the existing findings and we can discuss them in the community meeting?

Copy link
Member

Choose a reason for hiding this comment

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

That is just one side of it. Your change will for all time cause new findings due to tooling changes to be hidden. For that community meeting would be a good place to decide whether that is a good idea and how to handle that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is just one side of it. Your change will for all time cause new findings due to tooling changes to be hidden. For that community meeting would be a good place to decide whether that is a good idea and how to handle that.

I am not sure I follow. That flag will only show linter findings that are introduced with the respective PR. So in theory the amount of current findings in the code remains the same. New findings in new PR should then be addressed in the respective PR.

Copy link
Member

Choose a reason for hiding this comment

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

I am hunting after those new findings that are in existing code but found because the validation tool is enhanced. Like recently when gosec added integer casting validation. From one moment to the next one when they released that, all new/updated pull requests became red because they had those findings. We then had to fix those first and rebased the other PRs. If we tell the tool to only bring up findings in modified code, then we will not notice those new "tool update findings" anymore. And that we should decide as community. Imo we should either not do what you suggest, or we require some replacement - could be a daily action that scans the existing code and opens an issue when there are findings (like we do with vulns in the latest release).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I dropped the --new flag.

@HeavyWombat HeavyWombat force-pushed the use/golangci-lint-version-field branch from 694f029 to 4f64b32 Compare June 2, 2025 13:26
Add `version` in `.golangci.yml` to unblock updates of `golangci/golangci-lint-action`.

Signed-off-by: Matthias Diester <[email protected]>
@HeavyWombat HeavyWombat force-pushed the use/golangci-lint-version-field branch from 4f64b32 to 132edcb Compare June 2, 2025 13:32
@SaschaSchwarze0 SaschaSchwarze0 added this to the release-v0.16.0 milestone Jun 2, 2025
Copy link
Member

@SaschaSchwarze0 SaschaSchwarze0 left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 2, 2025
Copy link
Contributor

openshift-ci bot commented Jun 2, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: SaschaSchwarze0

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

The pull request process is described here

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 2, 2025
@openshift-merge-bot openshift-merge-bot bot merged commit 2f33c54 into main Jun 2, 2025
13 checks passed
@HeavyWombat HeavyWombat deleted the use/golangci-lint-version-field branch June 3, 2025 08:20
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/dependency-change Categorizes issue or PR as related to changing dependencies lgtm Indicates that a PR is ready to be merged. release-note-none size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants