Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfidenceBreakdown ¶
type ConfidenceBreakdown struct {
High []Finding `json:"high"`
Medium []Finding `json:"medium"`
Low []Finding `json:"low"`
}
ConfidenceBreakdown groups review findings by confidence band.
type Finding ¶
type Finding struct {
Concern string `json:"concern"`
Severity contracts.Severity `json:"severity"`
File string `json:"file"`
Line int `json:"line"`
EndLine int `json:"end_line,omitempty"`
Message string `json:"message"`
Fix string `json:"fix,omitempty"`
Reasoning string `json:"reasoning,omitempty"`
CWE string `json:"cwe,omitempty"`
Confidence float64 `json:"confidence"`
SASTSource bool `json:"sast_source,omitempty"`
}
Finding is the neutral review finding contract shared across Hawk and review engines.
type InlineComment ¶
type InlineComment struct {
Path string `json:"path"`
StartLine int `json:"start_line"`
EndLine int `json:"end_line,omitempty"`
Body string `json:"body"`
Suggestion string `json:"suggestion,omitempty"`
}
InlineComment is a review finding mapped to a concrete diff position.
type Result ¶
type Result struct {
Findings []Finding `json:"findings"`
Comments []InlineComment `json:"comments"`
Stats Stats `json:"stats"`
Report string `json:"report"`
FailOn contracts.Severity `json:"fail_on"`
SASTFusion *SASTFusionResult `json:"sast_fusion,omitempty"`
ConfidenceBreakdown *ConfidenceBreakdown `json:"confidence_breakdown,omitempty"`
}
Result is the neutral review result contract.
func (*Result) Failed ¶
Failed reports whether any finding meets or exceeds the configured fail threshold.
func (*Result) MaxSeverity ¶
MaxSeverity returns the highest severity present in the result.
type SASTFusionResult ¶
type SASTFusionResult struct {
Confirmed []Finding `json:"confirmed"`
Dismissed []Finding `json:"dismissed"`
Unaddressed []Finding `json:"unaddressed"`
}
SASTFusionResult tracks how the LLM handled SAST findings during a review. Only populated when SAST-LLM fusion is active (preAnalysis enabled).
type Stats ¶
type Stats struct {
FilesReviewed int `json:"files_reviewed"`
HunksAnalyzed int `json:"hunks_analyzed"`
FindingsTotal int `json:"findings_total"`
BySeverity map[contracts.Severity]int `json:"by_severity"`
ByConcern map[string]int `json:"by_concern"`
TokensUsed int `json:"tokens_used"`
DurationPerConcern map[string]time.Duration `json:"duration_per_concern"`
AverageConfidence float64 `json:"average_confidence"`
HighConfidenceCount int `json:"high_confidence_count"`
LowConfidenceCount int `json:"low_confidence_count"`
}
Stats captures review execution metrics.
Click to show internal directories.
Click to hide internal directories.