Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NormalizeDiffPath ¶
NormalizeDiffPath return path normalized path from given path in diff with strip.
Types ¶
type DiffFilter ¶
type DiffFilter struct {
// contains filtered or unexported fields
}
DiffFilter filters lines by diff.
func (*DiffFilter) ShouldReport ¶
ShouldReport returns true, if the given path should be reported depending on the filter Mode. It also optionally return diff file/line.
type Mode ¶
type Mode int
Mode represents enumeration of available filter modes
const ( // ModeDefault represents default mode, which means users doesn't specify // filter-mode. The behavior can be changed depending on reporters/context // later if we want. Basically, it's same as ModeAdded because it's most safe // and basic mode for reporters implementation. ModeDefault Mode = iota // ModeAdded represents filtering by added/changed diff lines. ModeAdded // ModeDiffContext represents filtering by diff context. // i.e. changed lines +-N lines (e.g. N=3 for default git diff). ModeDiffContext // ModeFile represents filtering by changed files. ModeFile // ModeNoFilter doesn't filter out any results. ModeNoFilter )
Click to show internal directories.
Click to hide internal directories.