Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Analyzer = &analysis.Analyzer{ Name: "looppointer", Doc: "checks for pointers to enclosing loop variables; modified for sweeping GitHub", Run: run, RunDespiteErrors: true, Requires: []*analysis.Analyzer{inspect.Analyzer, packid.Analyzer, callgraph.Analyzer, nogofunc.Analyzer, pointerescapes.Analyzer}, }
Analyzer checks for pointers to enclosing loop variables; modified for sweeping GitHub
Functions ¶
This section is empty.
Types ¶
type Reason ¶
type Reason uint8
Reason describes why an instance is being reported.
const ( // ReasonNone indicates nothing is being reported. ReasonNone Reason = iota // ReasonPointerReassigned indicates a reference to a range loop variable was reassigned. ReasonPointerReassigned // ReasonCallMayWritePtr indicates some function call may store a reference to a range loop variable. ReasonCallMayWritePtr // ReasonCallMaybeAsync indicates some function call taking a reference to a range loop variable may start a Goroutine. ReasonCallMaybeAsync // ReasonCallPassesToThirdParty indicates some function call passes a pointer to third-party code ReasonCallPassesToThirdParty // ReasonPointerStoredInCompositeLit indicates a pointer to a range-loop variable was used in a composite literal. ReasonPointerStoredInCompositeLit )
Click to show internal directories.
Click to hide internal directories.