c2

package
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type C2Analyzer

type C2Analyzer struct {
	// contains filtered or unexported fields
}

C2Analyzer implements the pipeline.Analyzer interface for C2: Semantic Explicitness. It dispatches to language-specific analyzers and aggregates results. It also implements GoAwareAnalyzer for Go-specific analysis via SetGoPackages.

func NewC2Analyzer

func NewC2Analyzer(tsParser *parser.TreeSitterParser) *C2Analyzer

NewC2Analyzer creates a C2Analyzer with Tree-sitter-based language analyzers. If tsParser is nil, only Go analysis (via SetGoPackages) is available.

func (*C2Analyzer) Analyze

func (a *C2Analyzer) Analyze(targets []*types.AnalysisTarget) (*types.AnalysisResult, error)

Analyze runs C2 analysis on the given analysis targets. It dispatches to the appropriate language-specific analyzer for each target, then aggregates per-language results weighted by LOC.

func (*C2Analyzer) Name

func (a *C2Analyzer) Name() string

Name returns the analyzer display name.

func (*C2Analyzer) SetGoPackages

func (a *C2Analyzer) SetGoPackages(pkgs []*parser.ParsedPackage)

SetGoPackages stores Go-specific parsed packages for use during Analyze.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL