Documentation
¶
Overview ¶
Package noerrorassert implements rule G10 of the anti-slop rule set. The rule rejects a type assertion and a type switch on a value of the predeclared error type. A caller wraps an error, and the wrapper answers such a test with the wrong type. errors.As and errors.Is walk the wrap chain, so they answer the question the code asks.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Analyzer = &analysis.Analyzer{ Name: "noerrorassert", Doc: doc, URL: "https://github.com/JacobJNilsson/anti-slop-go/blob/main/docs/spec/002-rules.md", Requires: []*analysis.Analyzer{inspect.Analyzer}, Run: run, }
Analyzer is the G10 analyzer. Consumers get it through antislop.Analyzers().
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.