Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Analyzer = SCAnalyzer.Analyzer
View Source
var SCAnalyzer = lint.InitializeAnalyzer(&lint.Analyzer{ Analyzer: &analysis.Analyzer{ Name: "SA1032", Requires: []*analysis.Analyzer{buildir.Analyzer}, Run: callcheck.Analyzer(rules), }, Doc: &lint.RawDocumentation{ Title: `Wrong order of arguments to \'errors.Is\'`, Text: ` The first argument of the function \'errors.Is\' is the error that we have and the second argument is the error we're trying to match against. For example: if errors.Is(err, io.EOF) { ... } This check detects some cases where the two arguments have been swapped. It flags any calls where the first argument is referring to a package-level error variable, such as if errors.Is(io.EOF, err) { /* this is wrong */ }`, Since: "2024.1", Severity: lint.SeverityError, MergeIf: lint.MergeIfAny, }, })
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.