Documentation
¶
Overview ¶
Package trace builds and queries the CodeGrapher projection of SpecScore trace records. The projection is deliberately separate from language scope stores because a source link commonly crosses from Go to a SpecScore node.
Index ¶
Constants ¶
View Source
const ContractVersion = contractVersion
ContractVersion is the provider contract consumed by this package.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Coverage ¶
type Coverage struct {
Available bool `json:"available"`
ContentHash string `json:"content_hash,omitempty"`
LinesCovered int `json:"lines_covered,omitempty"`
LinesUncovered int `json:"lines_uncovered,omitempty"`
PctCovered float64 `json:"pct_covered,omitempty"`
RunAt int64 `json:"run_at,omitempty"`
}
type LinkedSymbol ¶
type LinkedSymbol struct {
Symbol store.TraceNode `json:"symbol"`
Location SourceLocation `json:"location"`
Directive SourceLocation `json:"directive"`
Coverage *Coverage `json:"coverage,omitempty"`
}
type QueryResult ¶
type QueryResult struct {
Version string `json:"version"`
Reference string `json:"reference"`
IndexedRevision string `json:"indexed_revision"`
Target store.TraceNode `json:"target"`
Implements []LinkedSymbol `json:"implements"`
Verifies []LinkedSymbol `json:"verifies"`
References []LinkedSymbol `json:"references"`
AvailableCoverage bool `json:"available_coverage"`
}
QueryResult is the stable JSON response for `codegrapher trace`.
type SourceLocation ¶
type SourceLocation struct {
Path string `json:"path"`
StartLine int `json:"start_line"`
StartColumn int `json:"start_column"`
EndLine int `json:"end_line"`
EndColumn int `json:"end_column"`
}
SourceLocation is the user-facing location of an attached source symbol or directive.
Click to show internal directories.
Click to hide internal directories.