wg-quicker/vendor/github.com/matoous/godox/.revive.toml

136 lines
4.6 KiB
TOML

ignoreGeneratedHeader = false
severity = "warning"
# confidence <= 0.2 generate a lot of errors from package-comments rule. It marks files that do not contain
# package-level comments as a warning irrespective of existing package-level coment in one file.
confidence = 0.25
errorCode = 1
warningCode = 1
# Rules block.
# ⚠ Make sure to sort rules alpabetically for readability! ⚠
# argument-limit rule is setting up a maximum number of parameters that can be passed to the functions/methods.
[rule.argument-limit]
arguments = [5]
# atomic rule checks for commonly mistaken usages of the sync/atomic package.
[rule.atomic]
# blank-imports rule disallows blank imports.
[rule.blank-imports]
# bool-literal-in-expr suggests removing boolean literals from logic expressions like `bar == true`, `arg == false`,
# `r != true`, `false && boolExpr` and `boolExpr || true`.
[rule.bool-literal-in-expr]
# constant-logical-expr rule warns on constant logical expressions, like `name == name`.
[rule.constant-logical-expr]
# context-as-argument rule makes sure that context.Context is the first argument of a function.
[rule.context-as-argument]
# context-keys-type rule disallows the usage of basic types in context.WithValue
[rule.context-keys-type]
# confusing-naming rule warns on methods with names that differ only by capitalization.
[rule.confusing-naming]
# confusing-results rule suggests to name potentially confusing function results.
[rule.confusing-results]
# cyclomatic rule sets restriction for maximum Cyclomatic complexity.
[rule.cyclomatic]
arguments = [15]
# deep-exit rule looks for program exits in funcs other than `main()` or `init()`.
[rule.deep-exit]
# dot-imports rule forbids `.` imports.
[rule.dot-imports]
# empty-block warns on empty code blocks.
[rule.empty-block]
# error-return rule ensure that the error return parameter is the last.
[rule.error-return]
# error-strings rule ensure conventions around error strings.
[rule.error-strings]
# error-naming rule ensure naming of error variables (has `Err` or `err` prefix).
[rule.error-naming]
# errorf rule warns on usage errors.New(fmt.Sprintf()) instead of fmt.Errorf()
[rule.errorf]
# exported rule ensure naming and commenting conventions on exported symbols.
[rule.exported]
# flag-parameter rule warns on boolean parameters that create a control coupling.
[rule.flag-parameter]
# get-return rule warns on getters that do not yield any result.
[rule.get-return]
# if-return rule warns redundant if when returning an error.
[rule.if-return]
# increment-decrement rule forces to use `i++` and `i--` instead of `i += 1` and `i -= 1`.
[rule.increment-decrement]
# indent-error-flow rule prevents redundant else statements.
[rule.indent-error-flow]
# modifies-value-receiver warns on assignments to value-passed method receivers.
[rule.modifies-value-receiver]
# package-comments rule ensures package commenting conventions.
[rule.package-comments]
# range rule prevents redundant variables when iterating over a collection.
[rule.range]
# range-val-in-closure warns if range value is used in a closure dispatched as goroutine.
[rule.range-val-in-closure]
# receiver-naming ensures conventions around the naming of receivers.
[rule.receiver-naming]
# redefines-builtin-id warns on redefinitions of built-in (constants, variables, function and types) identifiers,
# like `true := "false"` etc.
[rule.redefines-builtin-id]
# rule.superfluous-else prevents redundant else statements (extends indent-error-flow). Checks for `if-then-else`where
# the then block ends with branching statement like `continue`, `break`, or `goto`.
[rule.superfluous-else]
# rule.struct-tag checks common struct tags like `json`, `xml`, `yaml`.
[rule.struct-tag]
# time-naming rule conventions around the naming of time variables. Like not to use unit suffixes (sec, min etc.) in
# naming variables of type `time.Time` or `time.Duration`.
[rule.time-naming]
# unexported-return rule warns when a public return is from unexported type.
[rule.unexported-return]
# unnecessary-stmt suggests removing or simplifying unnecessary statements like breaks at the end of cases or return at
# the end of bodies of functions returning nothing.
[rule.unnecessary-stmt]
# unreachable-code rule warns on the unreachable code.
[rule.unreachable-code]
# unused-parameter rule suggests to rename or remove unused function parameters.
[rule.unused-parameter]
# var-declaration rule reduces redundancies around variable declaration.
[rule.var-declaration]
# var-naming checks naming rules.
[rule.var-naming]
# waitgroup-by-value rule warns on functions taking `sync.WaitGroup` as a by-value parameter.
[rule.waitgroup-by-value]