Documentation
¶
Overview ¶
Package cli wires together the CLI commands.
Index ¶
- Constants
- Variables
- func BuildBaselineGraphFromGitRef(baselineRef string, buildGraph func(string) (*graph.Graph, error)) (*graph.Graph, error)
- func BuildGraph(absRoot string) (*graph.Graph, error)
- func PrintJSON(env Envelope) int
- func Run(args []string) int
- type Envelope
- type GateConfig
- type Snapshot
Constants ¶
View Source
const SchemaVersion = "1"
SchemaVersion is the stable JSON output schema version. Bump when the envelope shape changes in a backwards-incompatible way.
Variables ¶
View Source
var Version = "dev"
Version is set at build time via -ldflags; defaults to "dev" for local builds.
Functions ¶
func BuildBaselineGraphFromGitRef ¶ added in v1.4.45
func BuildBaselineGraphFromGitRef(baselineRef string, buildGraph func(string) (*graph.Graph, error)) (*graph.Graph, error)
BuildBaselineGraphFromGitRef extracts a repository state at the given git ref into a temporary directory and builds a graph for it.
Types ¶
type Envelope ¶ added in v1.4.10
type Envelope struct {
SchemaVersion string `json:"schema_version"`
Command string `json:"command"`
Query string `json:"query,omitempty"`
// Status is "ok" (results found), "empty" (no results, symbol/query valid),
// or "error" (hard failure — graph missing, parse error, etc.).
Status string `json:"status"`
Count int `json:"count,omitempty"`
Results interface{} `json:"results,omitempty"`
Error string `json:"error,omitempty"`
}
Envelope is the top-level JSON wrapper for all --json output. schema_version lets agents pin to a known schema and detect changes.
type GateConfig ¶ added in v1.4.54
type Snapshot ¶ added in v1.4.54
type Snapshot struct {
Name string `json:"name"`
Timestamp string `json:"timestamp"`
TotalSymbols int `json:"total_symbols"`
OrphanCount int `json:"orphan_count"`
GodObjects []string `json:"god_objects"`
MaxComplexity int `json:"max_complexity"`
AvgInstability float64 `json:"avg_instability"`
CouplingEdges int `json:"coupling_edges"`
}
Click to show internal directories.
Click to hide internal directories.