classification

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package classification categorizes a merge conflict by type and severity.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImportChangeSummary

type ImportChangeSummary struct {
	Added   int
	Removed int
	Changed int
}

ImportChangeSummary describes how imports changed between base/ours/theirs.

type Inputs

type Inputs struct {
	Language        core.LanguageKey
	BaseSymbols     []core.SymbolData
	OursSymbols     []core.SymbolData
	TheirsSymbols   []core.SymbolData
	SymbolConflicts []core.SymbolConflict
	ImportChanges   ImportChangeSummary
	BreakingChanges []core.BreakingChange
	IsConfigFile    bool
}

Inputs is the set of signals the classifier examines.

type Result

type Result struct {
	Type     core.ConflictType
	Severity core.ConflictSeverity
}

Result is what the classifier returns.

func Classify

func Classify(in Inputs) Result

Classify applies a small rule-based classifier producing a (type, severity) pair. The rules favor explicit signals (breaking changes, config files) and fall back to conflict counts.

Jump to

Keyboard shortcuts

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