Documentation
¶
Index ¶
- type ASTCall
- type ASTPointer
- type ASTPos
- type ASTRange
- type ASTRuleMatch
- type CompactionResult
- type DataFlow
- type Dependency
- type HealResult
- type HybridSearchResult
- type ImpactEntity
- type ImpactResult
- type MemoryInsight
- type Range
- type RiskMetrics
- type RuleViolationReport
- type SemanticMetrics
- type StructuralRule
- type Symbol
- type TestEvent
- type TestResult
- type TestTarget
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ASTCall ¶
type ASTCall struct {
CallerName string `json:"caller_name" validate:"required"`
CalleeName string `json:"callee_name" validate:"required"`
CalleePath string `json:"callee_path"` // Optional: absolute path to the callee file
LinkType string `json:"link_type"` // call, implements, emits, etc.
Path string `json:"path" validate:"required"`
Line int `json:"line" validate:"required,gte=1"`
}
type ASTPointer ¶
type ASTPointer struct {
Type string `json:"type" validate:"required,oneof=function class method variable interface method_spec"`
Name string `json:"name" validate:"required"`
PackagePath string `json:"package_path"`
ReceiverType string `json:"receiver_type"`
Signature string `json:"signature,omitempty"`
Doc string `json:"doc"`
Range Range `json:"range" validate:"required"`
StartLine int `json:"start_line" validate:"required,gte=1"`
StartCol int `json:"start_col" validate:"required,gte=1"`
EndLine int `json:"end_line" validate:"required,gtfield=StartLine"`
Hash string `json:"hash" validate:"required,len=64"`
StructuralHash string `json:"structural_hash,omitempty" validate:"omitempty,len=64"`
LogicHash string `json:"logic_hash,omitempty" validate:"omitempty,len=64"`
Metrics *SemanticMetrics `json:"metrics,omitempty"`
}
type ASTRuleMatch ¶
type ASTRuleMatch struct {
RuleID string `json:"ruleId"`
File string `json:"file"`
Text string `json:"text"`
Message string `json:"message"`
Severity string `json:"severity"`
Range ASTRange `json:"range"`
}
ASTRuleMatch represents a single violation found by ast-grep.
func (ASTRuleMatch) String ¶
func (m ASTRuleMatch) String() string
type CompactionResult ¶
type Dependency ¶
type HealResult ¶
type HybridSearchResult ¶
type HybridSearchResult struct {
Symbols []Symbol `json:"symbols"`
Insights []MemoryInsight `json:"insights"`
}
type ImpactEntity ¶
type ImpactResult ¶
type ImpactResult struct {
Target ImpactEntity `json:"target"`
Callers []ImpactEntity `json:"callers"`
Mermaid string `json:"mermaid"`
RiskLevel string `json:"risk_level"` // Low, Medium, High, Critical
Breakdown string `json:"breakdown,omitempty"`
}
type MemoryInsight ¶
type RiskMetrics ¶
type RuleViolationReport ¶
type RuleViolationReport struct {
FilePath string
Violations []ASTRuleMatch
}
RuleViolationReport is a collection of matches for a specific file.
type SemanticMetrics ¶
type StructuralRule ¶
type StructuralRule struct {
Pattern string `json:"pattern"`
Inside string `json:"inside,omitempty"`
Has string `json:"has,omitempty"`
}
StructuralRule encapsulates a structural search pattern and relational constraints.
type Symbol ¶
type Symbol struct {
Name string `json:"name"`
Type string `json:"type"`
PackagePath string `json:"package_path"` // Fully qualified package path
ReceiverType string `json:"receiver_type"` // pointer, value, or empty
Signature string `json:"signature,omitempty"`
Doc string `json:"doc"`
Path string `json:"path"`
StartLine int `json:"start_line"`
EndLine int `json:"end_line"`
LinkedInsights []string `json:"linked_insights,omitempty"`
Metrics *SemanticMetrics `json:"metrics,omitempty"`
}
type TestResult ¶
type TestResult struct {
TestName string `json:"test_name" validate:"required"`
Status string `json:"status" validate:"required,oneof=pass fail skip"`
ErrorMessage string `json:"error_message,omitempty"`
StackTrace string `json:"stack_trace,omitempty"`
TargetSymbol string `json:"target_symbol,omitempty"`
DurationMS int64 `json:"duration_ms" validate:"gte=0"`
Project string `json:"project,omitempty"`
}
type TestTarget ¶
Click to show internal directories.
Click to hide internal directories.