Documentation
¶
Overview ¶
Package antislop provides go/analysis analyzers that reject low-evidence Go patterns. The rule catalogue lives in docs/spec.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Analyzers ¶
Analyzers returns every analyzer this module provides, the opt-in rules included. Consumers register the full list; rule toggles happen in the consumer's configuration, not here.
One registry serves the three consumption paths of 003. The golangci-lint plugin reads a configuration file, so it applies the opt-in severity of 002 and drops such a rule until enable names it. cmd/antislop and go vet -vettool read no configuration file, so they run every rule. The reader turns one off with the -NAME=false flag that multichecker gives each analyzer.
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
analyzers
|
|
|
errsemantics
Package errsemantics implements rule G13 of the anti-slop rule set.
|
Package errsemantics implements rule G13 of the anti-slop rule set. |
|
fullstructcomp
Package fullstructcomp implements rule G12 of the anti-slop rule set.
|
Package fullstructcomp implements rule G12 of the anti-slop rule set. |
|
justifypanic
Package justifypanic implements rule G11 of the anti-slop rule set.
|
Package justifypanic implements rule G11 of the anti-slop rule set. |
|
noadhoctypeswitch
Package noadhoctypeswitch implements rule G06 of the anti-slop rule set.
|
Package noadhoctypeswitch implements rule G06 of the anti-slop rule set. |
|
noanyparam
Package noanyparam implements rule G03 of the anti-slop rule set.
|
Package noanyparam implements rule G03 of the anti-slop rule set. |
|
noanyreturn
Package noanyreturn implements rule G04 of the anti-slop rule set.
|
Package noanyreturn implements rule G04 of the anti-slop rule set. |
|
noerrorassert
Package noerrorassert implements rule G10 of the anti-slop rule set.
|
Package noerrorassert implements rule G10 of the anti-slop rule set. |
|
nointerfacereturn
Package nointerfacereturn implements rule G09 of the anti-slop rule set.
|
Package nointerfacereturn implements rule G09 of the anti-slop rule set. |
|
nolaundering
Package nolaundering implements rule G05 of the anti-slop rule set.
|
Package nolaundering implements rule G05 of the anti-slop rule set. |
|
nomonkeypatch
Package nomonkeypatch implements rule G08 of the anti-slop rule set.
|
Package nomonkeypatch implements rule G08 of the anti-slop rule set. |
|
noreflect
Package noreflect implements rule G07 of the anti-slop rule set.
|
Package noreflect implements rule G07 of the anti-slop rule set. |
|
nountypedmap
Package nountypedmap implements rule G02 of the anti-slop rule set.
|
Package nountypedmap implements rule G02 of the anti-slop rule set. |
|
safetyassert
Package safetyassert implements rule G01 of the anti-slop rule set: a single-result type assertion must carry a comment that states the invariant which makes the panic unreachable.
|
Package safetyassert implements rule G01 of the anti-slop rule set: a single-result type assertion must carry a comment that states the invariant which makes the panic unreachable. |
|
separategotwant
Package separategotwant implements rule G14 of the anti-slop rule set.
|
Package separategotwant implements rule G14 of the anti-slop rule set. |
|
cmd
|
|
|
antislop
command
Command antislop runs every anti-slop analyzer as a standalone multichecker.
|
Command antislop runs every anti-slop analyzer as a standalone multichecker. |
|
internal
|
|
|
pathmatch
Package pathmatch matches the import path of a package against the path patterns of a configuration setting.
|
Package pathmatch matches the import path of a package against the path patterns of a configuration setting. |
|
signature
Package signature holds the machinery that more than one rule needs.
|
Package signature holds the machinery that more than one rule needs. |
|
Package antislopplugin registers the anti-slop analyzers as a golangci-lint module plugin.
|
Package antislopplugin registers the anti-slop analyzers as a golangci-lint module plugin. |