helpers

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoFilesFound      = errors.New("no supported source files found in path")
	ErrInvalidFormat     = errors.New("invalid output format: must be text, json, sarif, or md")
	ErrThresholdExceeded = errors.New("duplication percentage exceeds threshold")
	ErrInvalidMinLines   = errors.New("min-lines must be greater than 0")
	ErrInvalidMinTokens  = errors.New("min-tokens must be greater than 0")
	ErrPathNotFound      = errors.New("path does not exist")
	// ErrClonesFound is returned by the scan action when duplicates are detected.
	// main() maps this to exit code 1 (distinct from exit code 2 for tool errors).
	ErrClonesFound = errors.New("duplicate code detected")
	// ErrTooManyFiles is returned when the file collector hits the --max-files
	// safety cap. This is the fail-fast guard for runaway scans on huge trees.
	ErrTooManyFiles = errors.New("too many files to scan: raise --max-files or narrow --include")
	// ErrTooManyPairs is returned when the fuzzy detector would build more
	// candidate pairs than --max-pairs allows. The fix is one of:
	// raise --max-pairs, lower --max-bucket, or disable fuzzy with --similarity 1.0.
	ErrTooManyPairs = errors.New("fuzzy detector exceeded --max-pairs cap: lower --max-bucket, raise --max-pairs, or disable fuzzy with --similarity 1.0")
)

Log is the global logger instance.

Functions

func SetupLogger

func SetupLogger(level string)

SetupLogger initializes the global logger with the given level.

Types

This section is empty.

Jump to

Keyboard shortcuts

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