|
@@ -62,12 +62,15 @@ linters:
|
|
|
# - grouper # An analyzer to analyze expression groups.
|
|
|
# - importas # Enforces consistent import aliases
|
|
|
# - makezero # Finds slice declarations with non-zero initial length
|
|
|
+ # - misspell # Finds commonly misspelled English words in comments
|
|
|
# - nolintlint # Reports ill-formed or insufficient nolint directives
|
|
|
+ # - predeclared # find code that shadows one of Go's predeclared identifiers
|
|
|
# - rowserrcheck # checks whether Err of rows is checked successfully
|
|
|
# - sqlclosecheck # Checks that sql.Rows and sql.Stmt are closed.
|
|
|
# - tenv # tenv is analyzer that detects using os.Setenv instead of t.Setenv since Go1.17
|
|
|
# - tparallel # tparallel detects inappropriate usage of t.Parallel() method in your Go test codes
|
|
|
# - typecheck # Like the front-end of a Go compiler, parses and type-checks Go code
|
|
|
+ # - unconvert # Remove unnecessary type conversions
|
|
|
# - varcheck # Finds unused global variables and constants
|
|
|
|
|
|
#
|
|
@@ -94,15 +97,12 @@ linters:
|
|
|
- gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification
|
|
|
- goimports # In addition to fixing imports, goimports also formats your code in the same style as gofmt.
|
|
|
- gosec # (gas): Inspects source code for security problems
|
|
|
- - misspell # Finds commonly misspelled English words in comments
|
|
|
- nakedret # Finds naked returns in functions greater than a specified function length
|
|
|
- nilerr # Finds the code that returns nil even if it checks that the error is not nil.
|
|
|
- nonamedreturns # Reports all named returns
|
|
|
- - nosprintfhostport # Checks for misuse of Sprintf to construct a host with port in a URL.
|
|
|
- - predeclared # find code that shadows one of Go's predeclared identifiers
|
|
|
+ - nosprintfhostport # Checks for misuse of Sprintf to construct a host with port in a URL.
|
|
|
- promlinter # Check Prometheus metrics naming via promlint
|
|
|
- revive # Fast, configurable, extensible, flexible, and beautiful linter for Go. Drop-in replacement of golint.
|
|
|
- - unconvert # Remove unnecessary type conversions
|
|
|
- wastedassign # wastedassign finds wasted assignment statements.
|
|
|
- gocritic # Provides diagnostics that check for bugs, performance and style issues.
|
|
|
- exhaustive # check exhaustiveness of enum switch statements
|
|
@@ -170,6 +170,8 @@ linters:
|
|
|
|
|
|
|
|
|
issues:
|
|
|
+ max-issues-per-linter: 0
|
|
|
+ max-same-issues: 10
|
|
|
exclude-rules:
|
|
|
- path: go.mod
|
|
|
text: "replacement are not allowed: golang.org/x/time/rate"
|
|
@@ -179,20 +181,6 @@ issues:
|
|
|
- govet
|
|
|
text: "shadow: declaration of \"err\" shadows declaration"
|
|
|
|
|
|
- #
|
|
|
- # govet
|
|
|
- #
|
|
|
-
|
|
|
- - linters:
|
|
|
- - govet
|
|
|
- text: "shadow: declaration of .* shadows declaration"
|
|
|
- - linters:
|
|
|
- - govet
|
|
|
- text: "copylocks: assignment copies lock value to newStream:"
|
|
|
- - linters:
|
|
|
- - govet
|
|
|
- text: "composites: .* composite literal uses unkeyed fields"
|
|
|
-
|
|
|
#
|
|
|
# errcheck
|
|
|
#
|
|
@@ -217,25 +205,3 @@ issues:
|
|
|
- linters:
|
|
|
- staticcheck
|
|
|
text: "SA1006: printf-style function with dynamic format string and no further arguments should use print-style function instead"
|
|
|
-
|
|
|
- #
|
|
|
- # gosimple
|
|
|
- #
|
|
|
-
|
|
|
- - linters:
|
|
|
- - gosimple
|
|
|
- text: "S1023: redundant .* statement"
|
|
|
- - linters:
|
|
|
- - gosimple
|
|
|
- text: "S1000: should use a simple channel send/receive instead of `select` with a single case"
|
|
|
- - linters:
|
|
|
- - gosimple
|
|
|
- text: "S1028: should use .* instead of .*"
|
|
|
-
|
|
|
- #
|
|
|
- # ineffassign
|
|
|
- #
|
|
|
-
|
|
|
- - linters:
|
|
|
- - ineffassign
|
|
|
- text: "ineffectual assignment to .*"
|