-
Notifications
You must be signed in to change notification settings - Fork 14
📖 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
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: camilamacedo86 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 |
##### 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+). |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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!
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: {} |
There was a problem hiding this comment.
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?
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 |
There was a problem hiding this comment.
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.
No description provided.