detection

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package detection provides hierarchical test framework detection.

Index

Constants

View Source
const FrameworkUnknown = "unknown"

Variables

This section is empty.

Functions

This section is empty.

Types

type Confidence

type Confidence int
const (
	ConfidenceUnknown Confidence = iota
	ConfidenceLow                // scope config
	ConfidenceMedium             // import
	ConfidenceHigh               // pragma (future)
)

type Detector

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

func NewDetector

func NewDetector(matcherRegistry *matchers.Registry, scopeResolver *config.Resolver) *Detector

func (*Detector) Detect

func (d *Detector) Detect(ctx context.Context, filePath string, content []byte) Result

Detect performs hierarchical framework detection. Level 1: Import statements → Level 2: Scope config files → Level 3: Unknown

type Result

type Result struct {
	ConfigPath string
	Confidence Confidence
	Framework  string
	Source     Source
}

func FromImport

func FromImport(framework string) Result

func FromScopeConfig

func FromScopeConfig(framework, configPath string) Result

func Unknown

func Unknown() Result

func (Result) IsUnknown

func (r Result) IsUnknown() bool

type Source

type Source string
const (
	SourceUnknown     Source = "unknown"
	SourceImport      Source = "import"
	SourceScopeConfig Source = "scope_config"
	SourcePragma      Source = "pragma"
)

Directories

Path Synopsis
Package config provides scope-based configuration file resolution.
Package config provides scope-based configuration file resolution.
Package matchers provides framework-specific detection rules.
Package matchers provides framework-specific detection rules.

Jump to

Keyboard shortcuts

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