Documentation ¶
Index ¶
Constants ¶
View Source
const PatchUnstaged = "lint-staged_unstaged.patch"
Variables ¶
View Source
var ( ErrApplyEmptyCommit = fmt.Errorf("apply empty commit error") ErrConfigNotFound = fmt.Errorf("configuration could not be found") ErrConfigFormat = fmt.Errorf("configuration should be an object or a function") // TODO ErrConfigEmpty = fmt.Errorf("configuration should not be empty") ErrGetBackupStash = fmt.Errorf("get backup stash error") ErrGetStagedFiles = fmt.Errorf("get staged files error") ErrGitRepo = fmt.Errorf("git repo error") ErrIgnore = fmt.Errorf("load ignore rules error") ErrHideUnstagedChanges = fmt.Errorf("hide unstaged changes error") ErrInvalidOptions = fmt.Errorf("invalid options") ErrRestoreMergeStatus = fmt.Errorf("restore merge status error") ErrRestoreOriginalState = fmt.Errorf("restore original state error") ErrRestoreUnstagedChanges = fmt.Errorf("restore unstaged changes error") )
Functions ¶
Types ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
File
it's underlying data is the path relative to the git root
func (File) AbsolutePath ¶
func (File) GitRelativePath ¶
func (File) RelativePathToGitRoot ¶
type Files ¶
type Files []*File
Files is a slice of File
func (Files) AbsolutePaths ¶
func (Files) GitRelativePaths ¶
func (Files) RelativePathsToGitRoot ¶
type IgnoreChecker ¶
type IgnoreChecker struct {
// contains filtered or unexported fields
}
func NewIgnoreChecker ¶
func NewIgnoreChecker(repoRoot string) (*IgnoreChecker, error)
func (*IgnoreChecker) ShouldIgnore ¶
func (c *IgnoreChecker) ShouldIgnore(gitRelativePath string) bool
type TaskResult ¶
type TaskResult struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.