-
Notifications
You must be signed in to change notification settings - Fork 261
enable linting and bingo management of the lint tool #1524
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
openshift-merge-bot
merged 6 commits into
operator-framework:master
from
grokspawn:add-linting
Feb 10, 2025
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
4e9cbe1
enable linting and bingo management of the lint tool
grokspawn 424c4f0
automated lint fixes
grokspawn f1100b1
manual test fixes
grokspawn 94c8ea2
linter feature code
grokspawn 92f5b29
update bingo to work with go version stampede
grokspawn ac872de
review revisions
grokspawn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
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
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT | ||
|
||
go 1.22.5 | ||
|
||
require github.com/golangci/golangci-lint v1.63.4 // cmd/golangci-lint |
Large diffs are not rendered by default.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
######## | ||
# NOTE | ||
# | ||
# This file is duplicated in the following repos: | ||
# - operator-framework/kubectl-operator | ||
# - operator-framework/catalogd | ||
# - operator-framework/operator-controller | ||
# - operator-framework/operator-registry | ||
# | ||
# If you are making a change, please make it in ALL | ||
# of the above repositories! | ||
# | ||
# TODO: Find a way to have a shared golangci config. | ||
######## | ||
|
||
run: | ||
# Default timeout is 1m, up to give more room | ||
timeout: 4m | ||
|
||
linters: | ||
enable: | ||
- asciicheck | ||
- bodyclose | ||
- errorlint | ||
- gci | ||
- gofmt | ||
- govet | ||
- gosec | ||
- importas | ||
- misspell | ||
- nestif | ||
- nonamedreturns | ||
- prealloc | ||
- stylecheck | ||
- testifylint | ||
- tparallel | ||
- unconvert | ||
- unparam | ||
- unused | ||
- whitespace | ||
|
||
linters-settings: | ||
gci: | ||
sections: | ||
- standard | ||
- dot | ||
- default | ||
- prefix(github.com/operator-framework) | ||
- localmodule | ||
custom-order: true | ||
|
||
errorlint: | ||
errorf: false | ||
|
||
importas: | ||
alias: | ||
- pkg: k8s.io/apimachinery/pkg/apis/meta/v1 | ||
alias: metav1 | ||
- pkg: k8s.io/apimachinery/pkg/api/errors | ||
alias: apierrors | ||
- pkg: k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1 | ||
alias: apiextensionsv1 | ||
- pkg: k8s.io/apimachinery/pkg/util/runtime | ||
alias: utilruntime | ||
- pkg: "^k8s\\.io/api/([^/]+)/(v[^/]+)$" | ||
alias: $1$2 | ||
- pkg: sigs.k8s.io/controller-runtime | ||
alias: ctrl | ||
- pkg: github.com/blang/semver/v4 | ||
alias: bsemver | ||
|
||
issues: | ||
# exclusion rules, mostly to avoid functionally complete areas and reduce unit test noise | ||
exclude-rules: | ||
- path: _test\.go | ||
linters: | ||
- unused | ||
- govet | ||
grokspawn marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
|
||
output: | ||
formats: | ||
- format: tab |
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
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
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
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
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.
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.
you don't have to, but if it's easy enough, we could add govet here as well (then maybe drop it from the Makefile if it's there)
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.
the .golangci.yaml file in this project is a copy of that in op-con. Since that one has just updated, I can take that change, but IMO we can update the Makefile in a separate PR. This one is already way beyond any reasonable complexity.
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.
Hi @grokspawn
You are with an outdated version :-P
See that we added govet there and we cleanup the staff: operator-framework/operator-controller@099a6cf
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.
But I am ok with we move forward as it is and add govet in a follow up.
It is fine for me too. @perdasilva wdyt?
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 did add govet in ac872deec7a3f69452cdf7d1cdcc38b7dec70911