Skip to content

[release-1.3] chore(CI): add golangci linter rules #995

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

Closed

Conversation

Elbehery
Copy link
Member

backport of #994

cc @ahrtr @ivanvc

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Elbehery

The full list of commands accepted by this bot can be found 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

@Elbehery Elbehery force-pushed the 20250615_backport_linter_1.3 branch 3 times, most recently from 04815a4 to eb7be2f Compare June 16, 2025 09:49
Signed-off-by: Mustafa Elbehery <melbeher@redhat.com>
@Elbehery Elbehery force-pushed the 20250615_backport_linter_1.3 branch from eb7be2f to 013236f Compare June 16, 2025 10:08
@Elbehery
Copy link
Member Author

/retest

@Elbehery
Copy link
Member Author

@ivanvc can u help with this failure ?

It works on main branch !!!

@Elbehery
Copy link
Member Author

/retest

@Elbehery Elbehery closed this Jul 2, 2025
@Elbehery Elbehery deleted the 20250615_backport_linter_1.3 branch July 2, 2025 14:36
@Elbehery Elbehery restored the 20250615_backport_linter_1.3 branch July 2, 2025 14:36
@Elbehery Elbehery reopened this Jul 2, 2025
@ivanvc
Copy link
Member

ivanvc commented Jul 3, 2025

@ivanvc can u help with this failure ?

It works on main branch !!!

The main branch uses Go 1.24, while the release branches use 1.23. I'm unsure if golangci-lint works well with Go 1.23.

@Elbehery
Copy link
Member Author

Elbehery commented Jul 3, 2025

@ivanvc can u help with this failure ?
It works on main branch !!!

The main branch uses Go 1.24, while the release branches use 1.23. I'm unsure if golangci-lint works well with Go 1.23.

well the failure in Win env only :D

@ivanvc
Copy link
Member

ivanvc commented Jul 18, 2025

well the failure in Win env only :D

I don't think we want to merge a pull request if it will break the CI. Would it be possible to use golangci-lint v1, with the rules you enabled, rather than bumping the version to 2?

@Elbehery
Copy link
Member Author

well the failure in Win env only :D

I don't think we want to merge a pull request if it will break the CI. Would it be possible to use golangci-lint v1, with the rules you enabled, rather than bumping the version to 2?

unfortunately no, these rules require v2 😞

but if we were to maintain the same linting across release branches, how would we proceed ?

cc @ahrtr

@ahrtr
Copy link
Member

ahrtr commented Jul 18, 2025

We don't see any issue on main branch. Probably it's due to different golang version?

Eventually we will bump to v2, but for now let's do not get stuck here (I don't mind closing this PR for now), we should always keep the workflow green.

@Elbehery
Copy link
Member Author

lgtm 👍🏽

@Elbehery Elbehery closed this Jul 18, 2025
@Elbehery Elbehery deleted the 20250615_backport_linter_1.3 branch July 20, 2025 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

4 participants