Versions in this module Expand all Collapse all v0 v0.2.0 Jun 21, 2026 Changes in this version + func RegisterLanguage(cfg LanguageConfig) + func SupportedExtensions() []string + func SupportedLanguages() []string + type LanguageConfig struct + Extensions []string + Grammar *sitter.Language + Hints *LanguageHints + Name string + type LanguageHints struct + DecisionKinds []string + FunctionKinds []string + ImportKinds []string + NameField string + NestingKinds []string + ParamsField string v0.1.0 Jun 21, 2026 Changes in this version + const DefaultDuplicationMinTokens + func BuildExcludeSet(includeDefaults bool, extras []string) map[string]struct + func ComputeChurn(root *TreeNode, scanRoot string) bool + type Config struct + AnalyzerWorkers int + ExcludePatterns []string + ExcludedDirs map[string]struct{} + GitChurn bool + SupportedOnly bool + type DependencyReport struct + Cycles [][]string + Edges int + ExternalImports int + MostDependedOn []DependencyStat + MostDependencies []DependencyStat + Nodes int + func BuildDependencyGraph(root *TreeNode, scanRoot string, topN int) DependencyReport + type DependencyStat struct + FanIn int + FanOut int + Node string + type DuplicateBlock struct + FirstEnd int + FirstPath string + FirstStart int + Lines int + OtherEnd int + OtherPath string + OtherStart int + Tokens int + type DuplicationReport struct + Blocks []DuplicateBlock + DuplicatedLines int + MinTokens int + TotalBlocks int + func DetectDuplication(root *TreeNode, minTokens, topN int) DuplicationReport + type FileHotspot struct + Churn int + Cyclomatic int + Hotspot float64 + Language string + LineCount int + Maintainability float64 + Path string + type FileMetrics struct + BlankLines int + CodeLines int + CommentLines int + Cyclomatic int + Functions []FunctionInfo + Halstead Halstead + ImportCount int + Imports []string + Language string + LineCount int + Maintainability float64 + MaxComplexity int + TodoCount int + VariableCount int + func AnalyzeFile(path string) (*FileMetrics, bool, error) + func (m *FileMetrics) CommentRatio() float64 + func (m *FileMetrics) FunctionCount() int + type FunctionHotspot struct + Cognitive int + Cyclomatic int + Line int + LineCount int + Name string + Path string + type FunctionInfo struct + Cognitive int + Cyclomatic int + Line int + LineCount int + Maintainability float64 + MaxNesting int + Name string + Params int + Signature string + type Halstead struct + Difficulty float64 + Effort float64 + Length int + Vocabulary int + Volume float64 + type LanguageAnalyzer interface + Analyze func(source []byte) (*FileMetrics, error) + type Options struct + DupMinTokens int + Excludes []string + NoDefaultExcludes bool + NoDeps bool + NoDup bool + NoGit bool + SupportedOnly bool + TopN int + Workers int + type Report struct + Dependencies *DependencyReport + Duplication *DuplicationReport + Root *TreeNode + Summary Summary + func Inspect(path string, opts Options) (*Report, error) + type Summary struct + Files int + GitChurn bool + Longest []FunctionHotspot + LowestMaintainable []FileHotspot + MostComplex []FunctionHotspot + SupportedFiles int + TopHotspots []FileHotspot + TotalBlank int + TotalCode int + TotalComment int + TotalFunctions int + TotalLines int + TotalTodos int + func BuildSummary(root *TreeNode, topN int, gitChurn bool) Summary + type TreeNode struct + Children []*TreeNode + Churn int + Hotspot float64 + IsDir bool + Metrics *FileMetrics + Name string + Path string + RelPath string + Warning string + func BuildTree(rootPath string, cfg Config) (*TreeNode, error)