-
Notifications
You must be signed in to change notification settings - Fork 550
Update KAL and GolangCI-Lint to v2 #2321
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
JoelSpeed
wants to merge
8
commits into
openshift:master
Choose a base branch
from
JoelSpeed:golangci-lint-v2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
407f6f7
Move go mod golangci-lint to v2
JoelSpeed 8fbc2d0
Update configuration to move to golangci-lint v2
JoelSpeed 5ad939b
Update KAL vendor
JoelSpeed a0c9334
Move kube-api-linter to a go-plugin integration
JoelSpeed 5c3e911
Configure optionalfields linter
JoelSpeed fec8d73
Update to 4.20 images with golang 1.24
JoelSpeed acac2f7
Apply partial fixes
JoelSpeed 70ffd28
Update generated content
JoelSpeed File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
build_root_image: | ||
name: release | ||
namespace: openshift | ||
tag: rhel-9-release-golang-1.23-openshift-4.19 | ||
tag: rhel-9-release-golang-1.24-openshift-4.20 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,54 @@ | ||
linters-settings: | ||
custom: | ||
kubeapilinter: | ||
type: "module" | ||
description: kubeapilinter is the Kube-API-Linter and lints Kube like APIs based on API conventions and best practices. | ||
settings: | ||
linters: | ||
enable: | ||
- "maxlength" | ||
- "nobools" | ||
- "nomaps" | ||
- "statussubresource" | ||
lintersConfig: | ||
conditions: | ||
isFirstField: Warn | ||
useProtobuf: Ignore | ||
usePatchStrategy: Ignore | ||
version: "2" | ||
linters: | ||
disable-all: true | ||
default: none | ||
enable: | ||
- kubeapilinter | ||
settings: | ||
custom: | ||
kubeapilinter: | ||
path: tools/_output/bin/kube-api-linter.so | ||
description: kubeapilinter is the Kube-API-Linter and lints Kube like APIs based on API conventions and best practices. | ||
settings: | ||
linters: | ||
enable: | ||
- maxlength | ||
- nobools | ||
- nomaps | ||
- statussubresource | ||
lintersConfig: | ||
conditions: | ||
isFirstField: Warn | ||
usePatchStrategy: Ignore | ||
useProtobuf: Ignore | ||
optionalfields: | ||
pointers: | ||
preference: WhenRequired | ||
policy: SuggestFix | ||
omitEmpty: | ||
# Ignore missing omitempty so that we can omit the omitempty for discoverability. | ||
# Discoverability is for configuration APIs, generally singletons. | ||
# Refer to the API conventions for when to use discoverability (not our default stance). | ||
policy: Ignore | ||
exclusions: | ||
generated: lax | ||
presets: | ||
- comments | ||
- common-false-positives | ||
- legacy | ||
- std-error-handling | ||
paths: | ||
- third_party$ | ||
- builtin$ | ||
- examples$ | ||
issues: | ||
# We have a lot of existing issues. | ||
# Want to make sure that those adding new fields have an | ||
# opportunity to fix them when running the linter locally. | ||
max-issues-per-linter: 1000 | ||
formatters: | ||
exclusions: | ||
generated: lax | ||
paths: | ||
- third_party$ | ||
- builtin$ | ||
- examples$ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Should we add a configuration for the new
uniquemarkers
linter to prevent duplicate feature-gate markers on fields and types?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.
Yes we should, will need to work out what the appropriate configuration is for that 🤔