filters

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const RecoveryKindFullOutput = "full-output"

Variables

This section is empty.

Functions

func BuildTree

func BuildTree(paths []string, root string) string

func Clip

func Clip(input string, max int) string

func CollapseBlock

func CollapseBlock(line string) string

func CompactLines

func CompactLines(input string, maxLines int) string

func DeclarativeBuiltinRecoveryInfo added in v0.5.0

func DeclarativeBuiltinRecoveryInfo(name, noun, input string, maxLines int) (string, string, bool)

func DeclarativeFullOutputRecovery added in v0.5.0

func DeclarativeFullOutputRecovery(result declarative.Result, noun string) (string, string, bool)

func DedupeLines

func DedupeLines(input string, maxLines int) string

func DefaultRipgrepExcludeGlobs added in v0.3.0

func DefaultRipgrepExcludeGlobs() []string

func DefaultSearchNoiseDirs added in v0.3.0

func DefaultSearchNoiseDirs() []string

func DiagnosticAnchor

func DiagnosticAnchor(line string) string

func FoldConsecutiveLines

func FoldConsecutiveLines(lines []string) []string

func FoldConsecutiveSimilarLines added in v0.5.0

func FoldConsecutiveSimilarLines(lines []string) []string

func FullOutputRecovery added in v0.5.0

func FullOutputRecovery(summary string) (string, string, bool)

func GoTestJSONRecoveryInfo added in v0.5.0

func GoTestJSONRecoveryInfo(input string) (string, string, bool)

func GroupRipgrep

func GroupRipgrep(input string, maxGroups int) string

func InterestingErrorLines added in v0.5.0

func InterestingErrorLines(input string, maxLines int) string

func IsSearchNoisePath added in v0.3.0

func IsSearchNoisePath(path string) bool

func JoinLimitedLines

func JoinLimitedLines(lines []string, maxLines int) string

func NewDeclarativeBuiltinReducer added in v0.5.0

func NewDeclarativeBuiltinReducer(
	name string,
	noun string,
	maxLines int,
	stdoutEnabled bool,
	stderrEnabled bool,
) engineCompatibleReducer

func NoRecovery added in v0.5.0

func NoRecovery() (string, string, bool)

func NonEmptyLines

func NonEmptyLines(input string) []string

func ReadLevel

func ReadLevel(data []byte, level string, lineNumbers bool, maxLines int) string

func RenderDeclarativeBuiltin added in v0.5.0

func RenderDeclarativeBuiltin(name, input string, maxLines int) string

func RenderJSONStructure

func RenderJSONStructure(data []byte) string

func RenderValueStructure

func RenderValueStructure(value any) string

func ScannerDedupe

func ScannerDedupe(data []byte) string

func SearchNoiseBucket added in v0.3.0

func SearchNoiseBucket(path string) string

func SelectUniqueAnchoredLines

func SelectUniqueAnchoredLines(lines []string, maxFrames int) []string

func ShouldSkipTreePart

func ShouldSkipTreePart(part string) bool

func SplitTreeParts

func SplitTreeParts(root, path string, relFn func(string, string) (string, error)) []string

func StripANSI

func StripANSI(input string) string

func SummarizeFindOutput added in v0.3.0

func SummarizeFindOutput(stdout, stderr string, maxLines int) string

func SummarizeFindPaths added in v0.3.0

func SummarizeFindPaths(paths []string, maxLines int) string

func SummarizeFindPathsGrouped added in v0.5.0

func SummarizeFindPathsGrouped(paths []string, maxLines int) string

func SummarizeGenericFailure

func SummarizeGenericFailure(input string, maxLines int) string

func SummarizeGenericFailureWithOptions added in v0.4.0

func SummarizeGenericFailureWithOptions(input string, opts GenericFailureReducerOptions) string

func SummarizeGoTestJSON

func SummarizeGoTestJSON(input string) string

func SummarizeJSONPreview added in v0.4.0

func SummarizeJSONPreview(data []byte, maxLines int) string

func SummarizeJSONValuePreview added in v0.4.0

func SummarizeJSONValuePreview(value any, maxLines int) string

func SummarizeRipgrep

func SummarizeRipgrep(input string, maxGroups, maxLines int) string

func UniqueStrings

func UniqueStrings(values []string) []string

Types

type BufferedTextReducer

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

func NewBufferedTextReducer

func NewBufferedTextReducer(stdoutEnabled, stderrEnabled bool, render func(string) string) *BufferedTextReducer

func NewBufferedTextReducerWithRecovery added in v0.5.0

func NewBufferedTextReducerWithRecovery(
	stdoutEnabled, stderrEnabled bool,
	render func(string) string,
	recovery func(string) (string, string, bool),
) *BufferedTextReducer

func (*BufferedTextReducer) BytesParsed

func (r *BufferedTextReducer) BytesParsed() int

func (*BufferedTextReducer) ConsumeStderr

func (r *BufferedTextReducer) ConsumeStderr(chunk []byte)

func (*BufferedTextReducer) ConsumeStdout

func (r *BufferedTextReducer) ConsumeStdout(chunk []byte)

func (*BufferedTextReducer) FallbackUsed

func (r *BufferedTextReducer) FallbackUsed() bool

func (*BufferedTextReducer) RecoveryInfo added in v0.5.0

func (r *BufferedTextReducer) RecoveryInfo() (string, string, bool)

func (*BufferedTextReducer) Result

func (r *BufferedTextReducer) Result() string

type CompactLineReducer

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

func NewCompactLineReducer

func NewCompactLineReducer(maxLines, maxBytes int) *CompactLineReducer

func (*CompactLineReducer) BytesParsed

func (r *CompactLineReducer) BytesParsed() int

func (*CompactLineReducer) ConsumeStderr

func (r *CompactLineReducer) ConsumeStderr(chunk []byte)

func (*CompactLineReducer) ConsumeStdout

func (r *CompactLineReducer) ConsumeStdout(chunk []byte)

func (*CompactLineReducer) FallbackUsed

func (r *CompactLineReducer) FallbackUsed() bool

func (*CompactLineReducer) Preview

func (r *CompactLineReducer) Preview() string

func (*CompactLineReducer) RecoveryInfo added in v0.5.0

func (r *CompactLineReducer) RecoveryInfo() (string, string, bool)

func (*CompactLineReducer) Result

func (r *CompactLineReducer) Result() string

type FindReducer added in v0.3.0

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

func NewFindReducer added in v0.3.0

func NewFindReducer(maxLines int) *FindReducer

func (*FindReducer) BytesParsed added in v0.3.0

func (r *FindReducer) BytesParsed() int

func (*FindReducer) ConsumeStderr added in v0.3.0

func (r *FindReducer) ConsumeStderr(chunk []byte)

func (*FindReducer) ConsumeStdout added in v0.3.0

func (r *FindReducer) ConsumeStdout(chunk []byte)

func (*FindReducer) Done added in v0.3.0

func (r *FindReducer) Done() bool

func (*FindReducer) FallbackUsed added in v0.3.0

func (r *FindReducer) FallbackUsed() bool

func (*FindReducer) Preview added in v0.3.0

func (r *FindReducer) Preview() string

func (*FindReducer) RecoveryInfo added in v0.5.0

func (r *FindReducer) RecoveryInfo() (string, string, bool)

func (*FindReducer) Result added in v0.3.0

func (r *FindReducer) Result() string

type FindSummaryStyle added in v0.5.0

type FindSummaryStyle string
const (
	FindSummaryStyleInventory FindSummaryStyle = "inventory"
	FindSummaryStyleGrouped   FindSummaryStyle = "grouped"
)

type GenericFailureReducer

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

func NewGenericFailureReducer

func NewGenericFailureReducer(maxLines, maxBytes int) *GenericFailureReducer

func NewGenericFailureReducerWithContract

func NewGenericFailureReducerWithContract(maxLines, maxBytes, minFailures, minAnchors, minHints int) *GenericFailureReducer

func NewGenericFailureReducerWithOptions added in v0.4.0

func NewGenericFailureReducerWithOptions(opts GenericFailureReducerOptions) *GenericFailureReducer

func (*GenericFailureReducer) BytesParsed

func (r *GenericFailureReducer) BytesParsed() int

func (*GenericFailureReducer) ConsumeStderr

func (r *GenericFailureReducer) ConsumeStderr(chunk []byte)

func (*GenericFailureReducer) ConsumeStdout

func (r *GenericFailureReducer) ConsumeStdout(chunk []byte)

func (*GenericFailureReducer) Done

func (r *GenericFailureReducer) Done() bool

func (*GenericFailureReducer) FallbackUsed

func (r *GenericFailureReducer) FallbackUsed() bool

func (*GenericFailureReducer) Preview

func (r *GenericFailureReducer) Preview() string

func (*GenericFailureReducer) RecoveryInfo added in v0.5.0

func (r *GenericFailureReducer) RecoveryInfo() (string, string, bool)

func (*GenericFailureReducer) Result

func (r *GenericFailureReducer) Result() string

type GenericFailureReducerOptions added in v0.4.0

type GenericFailureReducerOptions struct {
	MaxLines           int
	MaxBytes           int
	MinFailures        int
	MinAnchors         int
	MinHints           int
	NoisePrefiltering  bool
	SemanticCompaction bool
}

type LineScanner

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

func (*LineScanner) Consume

func (s *LineScanner) Consume(chunk []byte, emit func(string))

func (*LineScanner) Finish

func (s *LineScanner) Finish(emit func(string))

type RipgrepReducer added in v0.3.0

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

func NewRipgrepReducer added in v0.3.0

func NewRipgrepReducer(maxGroups, maxLines int) *RipgrepReducer

func (*RipgrepReducer) BytesParsed added in v0.3.0

func (r *RipgrepReducer) BytesParsed() int

func (*RipgrepReducer) ConsumeStderr added in v0.3.0

func (r *RipgrepReducer) ConsumeStderr(chunk []byte)

func (*RipgrepReducer) ConsumeStdout added in v0.3.0

func (r *RipgrepReducer) ConsumeStdout(chunk []byte)

func (*RipgrepReducer) Done added in v0.3.0

func (r *RipgrepReducer) Done() bool

func (*RipgrepReducer) FallbackUsed added in v0.3.0

func (r *RipgrepReducer) FallbackUsed() bool

func (*RipgrepReducer) Preview added in v0.3.0

func (r *RipgrepReducer) Preview() string

func (*RipgrepReducer) RecoveryInfo added in v0.5.0

func (r *RipgrepReducer) RecoveryInfo() (string, string, bool)

func (*RipgrepReducer) Result added in v0.3.0

func (r *RipgrepReducer) Result() string

Jump to

Keyboard shortcuts

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