Created
February 8, 2023 00:18
-
-
Save aanoaa/8b6168756c362145ba3d11879dd2d531 to your computer and use it in GitHub Desktop.
This file contains 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
linters: | |
fast: true | |
enable: | |
## https://golangci-lint.run/usage/linters/#enabled-by-default | |
- errcheck # checks unchecked errors | |
- gosimple # simplify code | |
- govet # examines Go source code and reports suspicious constructs | |
- ineffassign # detect unused assign | |
- staticcheck # cover Go vet edge cases | |
- typecheck # type-checks Go code | |
- unused # checks Go code for unused constants, variables, functions and types | |
## additional linters | |
- bidichk # checks for dangerous unicode character sequences | |
- bodyclose # checks whether HTTP response body is closed successfully | |
- contextcheck # check the function whether use a non-inherited context | |
- dupl # code clone detection | |
- durationcheck # check for two durations multiplied together | |
- errname # checks that sentinel errors are prefixed with the Err and error types are suffixed with the Error | |
- errorlint # find code that will cause problems with the error wrapping scheme | |
- exportloopref # checks for pointers to enclosing loop variables | |
- goconst # finds repeated strings that could be replaced by a constant | |
- gocritic # provides diagnostics that check for bugs, performance and style issues | |
- godot # check if comments end in a period | |
- gofmt # checks whether code was gofmt-ed | |
- goimports # fix imports, formats your code in the same style as gofmt | |
- misspell # finds commonly misspelled English words in comments | |
- noctx # finds sending http request without context.Context | |
- predeclared # find code that shadows one of Go's predeclared identifiers | |
- revive # replacement of golint | |
- unconvert # remove unnecessary type conversions | |
- whitespace # tool for detection of leading and trailing whitespace | |
- wrapcheck # check that errors from external packages are wrapped during return to help identify the error source. | |
severity: | |
default-severity: info |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment