Skip to content

📖 Update README.md - With instructions for GolangCI 2x #109

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

camilamacedo86
Copy link
Member

No description provided.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 26, 2025
@k8s-ci-robot k8s-ci-robot requested review from JoelSpeed and jpbetz June 26, 2025 11:57
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: camilamacedo86
Once this PR has been reviewed and has the lgtm label, please assign jpbetz for approval. For more information see the Code Review Process.

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

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jun 26, 2025
Comment on lines +124 to +126
##### Enabling Specific Linters (Valid for Versions < 2.x)

> **Note**: The following configuration is only supported when using the **module integration** via `.custom-gcl.yml` and is **not valid in plugin mode** (`.so` files with `golangci-lint` v2.x+).
Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't true, you can do exactly the same configuration between both versions

Copy link
Member Author

@camilamacedo86 camilamacedo86 Jul 7, 2025

Choose a reason for hiding this comment

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

I tried it, but it did not work out.
Now, with your message, I found: https://github.com/golangci/golangci-lint/blob/main/.custom-gcl.reference.yml

It might changed the format. I will try out after.
Thanks!

Comment on lines -114 to -122
linters-settings:
custom:
kubeapilinter:
path: "bin/kube-api-linter.so"
description: Kube API LInter lints Kube like APIs based on API conventions and best practices.
original-url: sigs.k8s.io/kube-api-linter
settings:
linters: {}
lintersConfig: {}
Copy link
Contributor

Choose a reason for hiding this comment

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

Looking at the diff above, it seems we just need to update this section slightly, and the rest remains true and the same?

Comment on lines +64 to +70
exclusions:
rules:
# Only run kubeapilinter inside the 'api/' directory
# Prevents running API-specific checks on unrelated packages like controllers or tests
- path-except: "^api/"
linters:
- kubeapilinter

Choose a reason for hiding this comment

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

Is the formatting off for the exclusions stanza here? It looks like it needs to be linters.exclusions when I was looking at integrating this linter in my repository that uses the 2.x golangci-lint version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants