scorer

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ScoreResult

type ScoreResult struct {
	TargetName string
	TargetFile string
	TargetLine int
	Scores     map[analyzer.Principle]float64
	Total      float64
	Confidence map[analyzer.Principle]float64
	Details    map[analyzer.Principle][]string
}

ScoreResult holds SOLID scores for a single target (struct or function).

type Scorer

type Scorer struct {
	Analyzers []analyzer.Analyzer
	Weights   map[string]float64
}

Scorer orchestrates all SOLID analyzers and computes weighted totals.

func New

func New(analyzers []analyzer.Analyzer, weights map[string]float64) *Scorer

New creates a Scorer with all provided analyzers and weights.

func (*Scorer) Score

func (s *Scorer) Score(pkg *model.PackageInfo) []*ScoreResult

Score analyzes a package and returns per-target score results.

Jump to

Keyboard shortcuts

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