ignore

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ignore

type Ignore interface {
	Match(s string) bool
}

Ignore support to check the string matches the ignore rule or not

func New

func New(ignoreFile string, logger *logger.Logger) (Ignore, error)

New get a default Ignore instance

type PathIgnore added in v0.6.1

type PathIgnore interface {
	// MatchPath the current string matches the rule or not, if enable the matchIgnoreDeletedPath, check the deleted file rule is matched or not first
	MatchPath(path, caller, desc string) bool
}

PathIgnore check the ignore rules of the specified file path

func NewPathIgnore added in v0.6.1

func NewPathIgnore(ignoreConf string, ignoreDeletedPath bool, logger *logger.Logger) (PathIgnore, error)

NewPathIgnore create an instance of the PathIgnore component ignoreConf the config file path of the ignore component ignoreDeletedPath whether ignore the deleted path

type Rule added in v0.4.3

type Rule interface {
	// Match reports whether the string s is matched of this rule
	Match(s string) bool
	// SwitchName return the rule switch name
	SwitchName() string
	// Expression return the rule expression
	Expression() string
}

Rule the match rule provider

Jump to

Keyboard shortcuts

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