-
Notifications
You must be signed in to change notification settings - Fork 223
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
Remove unneeded loop variable copying #1946
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
# golangci-lint configuration file | ||
# see: https://golangci-lint.run/usage/configuration/ | ||
|
||
# Options for analysis running | ||
run: | ||
# Which dirs to skip: they won't be analyzed; | ||
skip-dirs: | ||
- bin | ||
|
||
# Settings of specific linters | ||
linters-settings: | ||
gocritic: | ||
enabled-checks: | ||
- dupImport | ||
disabled-checks: # temporarily disabled checks, will fix them later | ||
- appendAssign | ||
- assignOp | ||
- captLocal | ||
- commentFormatting | ||
- deprecatedComment | ||
- elseif | ||
- exitAfterDefer | ||
- ifElseChain | ||
Comment on lines
+9
to
+17
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need these? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Without these lines, a lot of the Running make ci-lint with removed disabled-checks section
It's because There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should we use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can't use You can view the enabled
|
||
goimports: | ||
local-prefixes: sigs.k8s.io/kueue | ||
govet: | ||
|
@@ -21,10 +24,21 @@ linters-settings: | |
# Settings for enabling and disabling linters | ||
linters: | ||
enable: | ||
- copyloopvar | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I found that this is implemented by my co-worker :) |
||
- dupword | ||
- ginkgolinter | ||
- gocritic | ||
- goimports | ||
- govet | ||
- misspell | ||
- unconvert | ||
|
||
# Settings related to issues | ||
issues: | ||
# Which dirs to exclude: issues from them won't be reported | ||
exclude-dirs: | ||
- bin | ||
# Show all issues from a linter | ||
max-issues-per-linter: 0 | ||
# Show all issues with the same text | ||
max-same-issues: 0 |
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.
why remove this?
IIUC,
issues.exclude-dirs
would skip the reporting for this folder, but it would still analyze it. Or not?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.
run.skip-dirs
has been deprecated sincegolangci-lint
v1.57.0 and replaced byissues.exclude-dirs
. These options are technically identical. For a detailed explanation, see golangci/golangci-lint#4509.Unfortunately,
golangci-lint
does not provide a way to skip directory analysis,run.skip-dirs
lies. See golangci/golangci-lint#1832