filters

package
v0.0.0-...-4cf0a74 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FixState   = "fix-state"
	PathPrefix = "path-prefix"
	Severity   = "severity"
	Codeowners = "codeowners"
)

Filter Flags enums for the CLI and config keys

View Source
const FilterSeparator = ","

FilterSeparator is the separator used to split filter values

Variables

This section is empty.

Functions

func Validate

func Validate(f *Filters) []error

Validate returns a list of errors if any filter expression is misspelled or could never match. This guards against false positives if users have typos in their filters.

Types

type Filters

type Filters struct {
	Severity   string
	FixState   string
	PathPrefix string
	Codeowners string
}

Filters holds all the filters to apply in a Filter() call to a given document.

  • Severity will filter by the value (Critical, Low, ...)
  • FixState will filter by the value (unknown, fixed, not-fixed)
  • PathPrefix will filter by whether or not the path starts with the given fragment (could be exenteded with a glob based path filter)
  • Codeowners will filter by the codeowners that match a given path

Jump to

Keyboard shortcuts

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