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: "SA4008", Run: run, Requires: []*analysis.Analyzer{buildir.Analyzer}, }, Doc: &lint.RawDocumentation{ Title: `The variable in the loop condition never changes, are you incrementing the wrong variable?`, Text: `For example: for i := 0; i < 10; j++ { ... } This may also occur when a loop can only execute once because of unconditional control flow that terminates the loop. For example, when a loop body contains an unconditional break, return, or panic: func f() { panic("oops") } func g() { for i := 0; i < 10; i++ { // f unconditionally calls panic, which means "i" is // never incremented. f() } }`, Since: "2017.1", Severity: lint.SeverityWarning, MergeIf: lint.MergeIfAll, }, })
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.