Documentation
¶
Overview ¶
Code generated by generate_rules.py. DO NOT EDIT.
Package ignore provides file/directory pattern matching for exclusion
This package handles advanced file/directory exclusion patterns based on multiple criteria including .gitignore rules, hidden files, and custom patterns. It uses the functional options pattern for configuration.
Package ignore provides file/directory pattern matching for exclusion
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultIgnorePatterns = []string{}/* 183 elements not displayed */
DefaultIgnorePatterns contains the standard default ignore rules.
Functions ¶
Types ¶
type Config ¶
type Config struct {
RootDir string
IgnoreHidden bool
IgnoreGit bool
RecursiveMode bool
CustomRules []string
Logger utils.Logger
Disabled bool
}
Config holds configuration options for the ignore matcher
type IgnoreMatcher ¶
type IgnoreMatcher struct {
// contains filtered or unexported fields
}
IgnoreMatcher determines whether a file or directory should be ignored
func CreateDisabledMatcher ¶
func CreateDisabledMatcher() *IgnoreMatcher
func NewDefaultMatcher ¶
func NewDefaultMatcher(rootDir string) (*IgnoreMatcher, error)
func NewFromConfig ¶
func NewFromConfig(cfg Config) (*IgnoreMatcher, error)
func (*IgnoreMatcher) ClassifyVisibility ¶
func (m *IgnoreMatcher) ClassifyVisibility(relativePath string, isDir bool) Visibility
ClassifyVisibility reports hidden and repository-gitignore metadata without applying those matches as filters.
func (*IgnoreMatcher) ShouldIgnore ¶
func (m *IgnoreMatcher) ShouldIgnore(relativePath string, isDir bool) bool
ShouldIgnore checks if a file or directory should be ignored
type Option ¶
type Option func(*IgnoreMatcher)
func WithCustomRules ¶
func WithDisabled ¶
func WithGitIgnore ¶
func WithHiddenIgnore ¶
func WithLogger ¶
func WithRecursive ¶
type Visibility ¶
Visibility describes presentation-relevant ignore metadata. Explicit and custom safety exclusions remain hard filters and are not represented here.