# Structs
AddConstantRule suggests using constants instead of magic numbers and string literals.
ArgumentsLimitRule lints the number of arguments a function can receive.
AtomicRule lints usages of the `sync/atomic` package.
BannedCharsRule checks if a file contains banned characters.
BareReturnRule lints bare returns.
BlankImportsRule lints blank imports.
BoolLiteralRule warns when logic expressions contains Boolean literals.
CallToGCRule lints calls to the garbage collector.
CognitiveComplexityRule sets restriction for maximum cognitive complexity.
CommentsDensityRule enforces a minimum comment / code relation.
CommentSpacingsRule check whether there is a space between the comment symbol( // ) and the start of the comment text.
ConfusingNamingRule lints method names that differ only by capitalization.
ConfusingResultsRule lints given function declarations.
ConstantLogicalExprRule warns on constant logical expressions.
ContextAsArgumentRule suggests that `context.Context` should be the first argument of a function.
ContextKeysType disallows the usage of basic types in `context.WithValue`.
CyclomaticRule sets restriction for maximum cyclomatic complexity.
DataRaceRule lints assignments to value method-receivers.
DeepExitRule lints program exit at functions other than main or init.
DeferRule lints gotchas in defer statements.
DotImportsRule forbids .
DuplicatedImportsRule looks for packages that are imported two or more times.
EarlyReturnRule finds opportunities to reduce nesting by inverting the condition of an "if" block.
EmptyBlockRule warns on empty code blocks.
EmptyLinesRule lints empty lines in blocks.
EnforceMapStyleRule implements a rule to enforce `make(map[type]type)` over `map[type]type{}`.
EnforceRepeatedArgTypeStyleRule implements a rule to enforce repeated argument type style.
EnforceSliceStyleRule implements a rule to enforce `make([]type)` over `[]type{}`.
ErrorfRule suggests using `fmt.Errorf` instead of `errors.New(fmt.Sprintf())`.
ErrorNamingRule lints naming of error variables.
ErrorReturnRule ensures that the error return parameter is the last parameter.
ErrorStringsRule lints error strings.
ExportedRule lints naming and commenting conventions on exported symbols.
FileHeaderRule lints the header that each file should have.
FileLengthLimitRule lints the number of lines in a file.
FilenameFormatRule lints source filenames according to a set of regular expressions given as arguments.
FlagParamRule warns on boolean parameters that create a control coupling.
FunctionLength lint.
FunctionResultsLimitRule limits the maximum number of results a function can return.
GetReturnRule warns on getters that do not yield any result.
IdenticalBranchesRule warns on constant logical expressions.
IfReturnRule searches for redundant `if` when returning an error.
ImportAliasNamingRule lints import alias naming.
ImportsBlocklistRule disallows importing the specified packages.
ImportShadowingRule spots identifiers that shadow an import.
IncrementDecrementRule lints `i += 1` and `i -= 1` constructs.
IndentErrorFlowRule prevents redundant else statements.
LineLengthLimitRule lints number of characters in a line.
MaxControlNestingRule sets restriction for maximum nesting of control structures.
MaxPublicStructsRule lints the number of public structs in a file.
ModifiesParamRule warns on assignments to function parameters.
ModifiesValRecRule lints assignments to value method-receivers.
NestedStructs lints nested structs.
OptimizeOperandsOrderRule checks inefficient conditional expressions.
PackageCommentsRule lints the package comments.
RangeRule prevents redundant variables when iterating over a collection.
RangeValAddress lints.
RangeValInClosureRule warns if range value is used in a closure dispatched as goroutine.
ReceiverNamingRule lints a receiver name.
RedefinesBuiltinIDRule warns when a builtin identifier is shadowed.
RedundantBuildTagRule lints the presence of redundant build tags.
RedundantImportAlias warns on import aliases matching the imported package name.
RedundantTestMainExitRule suggests removing Exit call in TestMain function for test files.
StringFormatRule lints strings and/or comments according to a set of regular expressions given as Arguments.
StringOfIntRule warns when logic expressions contains Boolean literals.
StructTagRule lints struct tags.
SuperfluousElseRule lints given else constructs.
TimeEqualRule shows where "==" and "!=" used for equality check time.Time.
TimeNamingRule lints the name of a time variable.
UncheckedTypeAssertionRule lints missing or ignored `ok`-value in dynamic type casts.
UnconditionalRecursionRule warns on function calls that will lead to infinite recursion.
UnexportedNamingRule lints wrongly named unexported symbols.
UnexportedReturnRule warns when a public return is from unexported type.
UnhandledErrorRule warns on unhandled errors returned by function calls.
UnnecessaryStmtRule warns on unnecessary statements.
UnreachableCodeRule lints unreachable code.
UnusedParamRule lints unused params in functions.
UnusedReceiverRule lints unused receivers in functions.
UseAnyRule proposes to replace `interface{}` with its alias `any`.
UseErrorsNewRule spots calls to fmt.Errorf that can be replaced by errors.New.
UselessBreak lint rule.
VarDeclarationsRule reduces redundancies around variable declaration.
VarNamingRule lints the name of a variable.
WaitGroupByValueRule lints sync.WaitGroup passed by copy in functions.