Versions in this module Expand all Collapse all v1 v1.5.0 Apr 2, 2026 Changes in this version + func FormatRegistryStats(stats map[string]any) string + func FormatResults(passed, failed int, failures []string) string + type CommunityFilterRegistry struct + func NewCommunityFilterRegistry(localPath, remoteURL string) *CommunityFilterRegistry + func (r *CommunityFilterRegistry) Eject(name string, destDir string) error + func (r *CommunityFilterRegistry) Install(name string) error + func (r *CommunityFilterRegistry) List(category string) []RegistryEntry + func (r *CommunityFilterRegistry) Publish(entry RegistryEntry) error + func (r *CommunityFilterRegistry) Search(query string) []RegistryEntry + func (r *CommunityFilterRegistry) Stats() map[string]any + type FilterTestCase struct + Expected string + Filter string + Input string + Name string type FilterTestSuite + Name string + func (suite *FilterTestSuite) Run(filterFunc func(string, string) string) (int, int, []string) + type RegistryEntry struct + Author string + Category string + Content string + CreatedAt time.Time + Description string + Downloads int + Name string + Rating float64 + SHA256 string + Tags []string + UpdatedAt time.Time + Version string v1.2.0 Mar 19, 2026 Changes in this version + func ProcessWithTOMLFilter(output string, config *FilterConfig) (string, int) + type FilterConfig struct + Head int + KeepLinesMatching []string + MatchCommand string + MatchOutput []MatchOutputRule + MaxLines int + OnEmpty string + Replace []ReplaceRule + StripANSI bool + StripLinesMatching []string + Tail int + TruncateLinesAt int type FilterRegistry + func (r *FilterRegistry) ListFilters() []string + func (r *FilterRegistry) LoadDirectory(dir string) error v0 v0.28.0 Apr 16, 2026 Changes in this version + type FilterConflict struct + Filter1 string + Filter2 string + Pattern1 string + Pattern2 string + Type string type FilterRegistry + func (r *FilterRegistry) DetectConflicts() []FilterConflict + type FilterTest struct + Command string + Expected string + Input string + Name string type TOMLFilter + func (f *TOMLFilter) RunTests() ([]TestResult, error) type TOMLFilterRule + CaptureStderr bool + Tests []FilterTest v0.1.0 Apr 6, 2026 Changes in this version + const SchemaVersion + func ApplyTOMLFilter(input string, config *TOMLFilterRule) (string, int) + func FormatSafetyReport(check SafetyCheck) string + func IsPrintableASCII(s string) bool + func MatchAndFilter(command string, output string, registry *FilterRegistry) (string, int, bool) + func RunTestSuite(suite TestSuite, filterFunc func(string, string) string) (int, int, []string) + func ValidateFilterConfig(content string) []string + type FilterRegistry struct + func NewFilterRegistry() *FilterRegistry + func (r *FilterRegistry) Count() int + func (r *FilterRegistry) FindMatchingFilter(command string) (string, string, *TOMLFilterRule) + func (r *FilterRegistry) LoadFile(path string) error + type FilterTestSuite struct + Tests map[string][]TOMLFilterTest + func NewFilterTestSuite() *FilterTestSuite + func ParseTests(raw map[string]any) (*FilterTestSuite, error) + func (ts *FilterTestSuite) AddTest(filterName string, test TOMLFilterTest) + func (ts *FilterTestSuite) GetTests(filterName string) []TOMLFilterTest + func (ts *FilterTestSuite) RunAllTests(filterFuncs map[string]func(string) string) []TestResult + func (ts *FilterTestSuite) RunTest(filterName string, test TOMLFilterTest, filterFunc func(string) string) TestResult + func (ts *FilterTestSuite) TotalTests() int + type Loader struct + var GlobalFilterLoader *Loader + func GetLoader() *Loader + func NewLoader(configDir string) *Loader + func (l *Loader) IsTrusted(projectPath string) bool + func (l *Loader) ListTrusted() []string + func (l *Loader) LoadAll(projectDir string) (*FilterRegistry, error) + func (l *Loader) LoadTrusted() error + func (l *Loader) TrustProject(projectPath string) error + func (l *Loader) UntrustProject(projectPath string) error + type LoaderConfig struct + ConfigDir string + DataDir string + ProjectDir string + type MatchOutputRule struct + Message string + Pattern string + Priority int + Unless string + type Parser struct + func NewParser() *Parser + func (p *Parser) ParseContent(content []byte, source string) (*TOMLFilter, error) + func (p *Parser) ParseFile(path string) (*TOMLFilter, error) + type ReplaceRule struct + Pattern string + Replacement string + type RiskSummary struct + FilterCount int + HasCatchAll bool + HasMatchOutput bool + HasReplace bool + func AnalyzeFilterRisk(content string) RiskSummary + type SafetyCheck struct + Issues []SafetyIssue + Passed bool + func CheckFilterSafety(content string) SafetyCheck + type SafetyIssue struct + Line int + Message string + Severity string + type TOMLFilter struct + Filters map[string]TOMLFilterRule + RawContent map[string]any + SchemaVersion int + func (f *TOMLFilter) MatchesCommand(command string) (string, *TOMLFilterRule, error) + func (f *TOMLFilter) Validate() error + type TOMLFilterEngine struct + func NewTOMLFilterEngine(config *TOMLFilterRule) *TOMLFilterEngine + func (e *TOMLFilterEngine) Apply(input string, mode filter.Mode) (string, int) + type TOMLFilterRule struct + Head int + KeepLinesMatching []string + MatchCommand string + MatchOutput []MatchOutputRule + MaxLines int + OnEmpty string + Replace []ReplaceRule + StripANSI bool + StripLinesMatching []string + Tail int + TruncateLinesAt int + type TOMLFilterTest struct + Expected string + Input string + Name string + Reason string + Skip bool + type TOMLFilterWrapper struct + func NewTOMLFilterWrapper(name string, config *TOMLFilterRule) *TOMLFilterWrapper + func (f *TOMLFilterWrapper) Apply(input string, mode filter.Mode) (string, int) + func (f *TOMLFilterWrapper) Name() string + type TestCase struct + Expected string + Filter string + Input string + Name string + type TestResult struct + Error error + Expected string + FilterName string + Got string + Passed bool + Reason string + Skipped bool + TestName string + type TestSuite struct + Name string + Tests []TestCase + type TestSummary struct + Failed int + Passed int + Results []TestResult + Skipped int + Total int + func Summarize(results []TestResult) TestSummary + func (s TestSummary) FormatSummary() string + type TrustEntry struct + SHA256 string + TrustedAt string + type TrustManager struct + func NewTrustManager(configDir string) *TrustManager + func (tm *TrustManager) CheckTrust(filterPath string) (TrustStatus, error) + func (tm *TrustManager) ListTrusted() map[string]TrustEntry + func (tm *TrustManager) Load() error + func (tm *TrustManager) Save() error + func (tm *TrustManager) TrustProject(filterPath string) error + func (tm *TrustManager) UntrustProject(filterPath string) (bool, error) + type TrustStatus int + const TrustStatusContentChanged + const TrustStatusEnvOverride + const TrustStatusTrusted + const TrustStatusUntrusted + type TrustStore struct + Trusted map[string]TrustEntry + Version int + func NewTrustStore() *TrustStore