Documentation
¶
Overview ¶
Package codeinventory is a deterministic, pure-Go code-size inventory: it walks a source tree, classifies each file's language with go-enry, and counts code / comment / blank lines per language, plus functions where a first-party parser exists (Go today, via go/parser). It NEVER executes the target and reads bounded (skips vendored/binary/generated/oversized files, follows no symlinks), mirroring the go-enry and SAST library adapters. It is the Phase-0 producer of the code-quality capability; accurate multi-language function/complexity counting arrives with the AST phase.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Analyzer ¶
type Analyzer struct {
// contains filtered or unexported fields
}
Analyzer is the pure-Go code-inventory adapter. An optional ASTProvider (the synapse-ast sidecar) supplies accurate function counts for the non-Go languages it supports; without it, only Go function counts are known.
type Option ¶
type Option func(*Analyzer)
Option configures an Analyzer.
func WithASTProvider ¶
func WithASTProvider(p ports.ASTProvider) Option
WithASTProvider wires an ASTProvider so function counts are filled for the languages it parses. A nil provider is ignored (the analyzer stays pure-Go, Go-only function counts).