-
Notifications
You must be signed in to change notification settings - Fork 708
Enable linters for enforce-switch-style & redundant-test-main-exit
#4496
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?
Enable linters for enforce-switch-style & redundant-test-main-exit
#4496
Conversation
Signed-off-by: Aditya <[email protected]>
Signed-off-by: Aditya <[email protected]>
| fmt.Fprintln(os.Stderr, file) | ||
| } | ||
|
|
||
| exitCode = 1 |
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 is irrelevant to redundant-test-main-exit
| fmt.Fprintln(os.Stderr, "Leaking go routines") | ||
| fmt.Fprintln(os.Stderr, os.Stderr, err.Error()) | ||
|
|
||
| exitCode = 1 |
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 is irrelevant to redundant-test-main-exit
| fmt.Fprintln(os.Stderr, file) | ||
| } | ||
|
|
||
| exitCode = 1 |
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 is irrelevant to redundant-test-main-exit
| fmt.Fprintln(os.Stderr, "Leaking go routines") | ||
| fmt.Fprintln(os.Stderr, err.Error()) | ||
|
|
||
| exitCode = 1 |
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 is irrelevant to redundant-test-main-exit
| - "fmt.Fprint" | ||
| - "fmt.Fprintln" | ||
| - "fmt.Fprintf" | ||
| - name: redundant-test-main-exit |
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 line can be removed
| - name: add-constant | ||
| # 2605 occurrences. Kind of useful in itself, but unacceptable amount of effort to fix | ||
| disabled: true | ||
| - name: enforce-switch-style |
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 line can be removed
| switch base.Info().CgroupDriver { | ||
| case "none", "": | ||
| t.Skip("requires cgroup (for pausing)") | ||
| default: |
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.
nit: add // NOP to clarify that this empty default is not a typo
default:
// NOPSame for other occurrences too
| - "fmt.Fprintln" | ||
| - "fmt.Fprintf" | ||
| - name: redundant-test-main-exit | ||
| - name: enforce-switch-style |
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 line can be removed
Resolves #4493, in parts.
redundant-test-main-exit&enforce-switch-stylein golangci file.defaultcase otherwise.