Documentation
¶
Index ¶
Constants ¶
View Source
const (
RuleID = "query-in-loop"
)
Variables ¶
This section is empty.
Functions ¶
func NewWithRuntime ¶
func NewWithRuntime(cfg *config.Config, opts RuntimeOptions) *analysis.Analyzer
NewWithRuntime creates the analyzer with explicit runtime options.
Types ¶
type FindingCollector ¶
type FindingCollector struct {
// contains filtered or unexported fields
}
FindingCollector stores emitted findings in memory.
func NewFindingCollector ¶
func NewFindingCollector() *FindingCollector
func (*FindingCollector) Entries ¶
func (c *FindingCollector) Entries() []baseline.Entry
type FindingSink ¶
FindingSink receives normalized findings emitted by the analyzer. Implementations must be safe for concurrent use.
type QueryFact ¶
QueryFact is exported across package boundaries to propagate whether a function definitely or possibly executes a database query.
type RuntimeOptions ¶
type RuntimeOptions struct {
// Explain appends structured reasoning to diagnostics.
Explain bool
// PackagePatterns is used to build/lookup cross-package dynamic dispatch.
PackagePatterns []string
// BaselineModeOverride temporarily overrides config.Baseline.Mode.
BaselineModeOverride string
// DisableFactExport disables cross-package fact export.
DisableFactExport bool
// CaptureOnly records findings but suppresses pass.Report diagnostics.
CaptureOnly bool
// CaptureSink receives emitted findings for stats/baseline workflows.
CaptureSink FindingSink
// CapturePackageAllowset optionally limits which package findings are captured.
CapturePackageAllowset map[string]struct{}
}
RuntimeOptions carries run-time behavior that should not come from global process state (env vars), making analyzer execution deterministic and testable.
Click to show internal directories.
Click to hide internal directories.