discovery

package
v0.42.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FileOwnerComment         = "file/owner"
	FileDisabledCheckComment = "file/disable"
	FileSnoozeCheckComment   = "file/snooze"
	RuleOwnerComment         = "rule/owner"
)

Variables

View Source
var ErrFileIsIgnored = errors.New("file was ignored")

Functions

This section is empty.

Types

type ChangeType added in v0.40.1

type ChangeType int
const (
	Unknown ChangeType = iota
	Noop
	Added
	Modified
	Removed
)

func (*ChangeType) MarshalJSON added in v0.40.1

func (c *ChangeType) MarshalJSON() ([]byte, error)

func (ChangeType) String added in v0.40.1

func (c ChangeType) String() string

type Entry added in v0.15.0

type Entry struct {
	State          ChangeType
	ReportedPath   string // symlink target
	SourcePath     string // file path (can be symlink)
	PathError      error
	ModifiedLines  []int
	Rule           parser.Rule
	Owner          string
	DisabledChecks []string
}

type GitBlameFinder added in v0.40.1

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

func NewGitBlameFinder added in v0.40.1

func NewGitBlameFinder(
	gitCmd git.CommandRunner,
	include []*regexp.Regexp,
	baseBranch string,
	maxCommits int,
	relaxed []*regexp.Regexp,
) GitBlameFinder

func (GitBlameFinder) Find added in v0.40.1

func (f GitBlameFinder) Find() (entries []Entry, err error)

type GitBranchFinder added in v0.15.0

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

func NewGitBranchFinder added in v0.15.0

func NewGitBranchFinder(
	gitCmd git.CommandRunner,
	include []*regexp.Regexp,
	baseBranch string,
	maxCommits int,
	relaxed []*regexp.Regexp,
) GitBranchFinder

func (GitBranchFinder) Find added in v0.15.0

func (f GitBranchFinder) Find() (entries []Entry, err error)

type GlobFinder added in v0.15.0

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

func NewGlobFinder added in v0.15.0

func NewGlobFinder(patterns []string, relaxed []*regexp.Regexp) GlobFinder

func (GlobFinder) Find added in v0.15.0

func (f GlobFinder) Find() (entries []Entry, err error)

type RuleFinder added in v0.15.0

type RuleFinder interface {
	Find() ([]Entry, error)
}

Jump to

Keyboard shortcuts

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