discovery

package
v0.58.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangeType added in v0.40.1

type ChangeType uint8
const (
	Unknown ChangeType = iota
	Noop
	Added
	Modified
	Removed
	Moved
	Excluded
)

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 {
	PathError      error
	Path           Path
	Owner          string
	ModifiedLines  []int
	DisabledChecks []string
	Rule           parser.Rule
	State          ChangeType
}

type FileIgnoreError added in v0.53.0

type FileIgnoreError struct {
	Err  error
	Line int
}

func (FileIgnoreError) Error added in v0.53.0

func (fe FileIgnoreError) Error() string

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,
	filter git.PathFilter,
	baseBranch string,
	maxCommits int,
) GitBranchFinder

func (GitBranchFinder) Find added in v0.15.0

func (f GitBranchFinder) Find(allEntries []Entry) (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, filter git.PathFilter) GlobFinder

func (GlobFinder) Find added in v0.15.0

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

type Path added in v0.58.0

type Path struct {
	Name          string // file path, it can be symlink
	SymlinkTarget string // symlink target, or the same as name if not a symlink
}

func (Path) String added in v0.58.0

func (p Path) String() string

Jump to

Keyboard shortcuts

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