Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Matcher ¶
Matcher evaluates whether file paths match ignore patterns.
func LoadMatcher ¶
LoadMatcher searches for .gocodeignore (or .gitignore as fallback) starting from dir.
type SensitiveMatcher ¶ added in v0.4.0
SensitiveMatcher wraps an existing Matcher and additionally checks against built-in sensitive file patterns.
func NewSensitiveMatcher ¶ added in v0.4.0
func NewSensitiveMatcher(inner Matcher, extraPatterns []string) *SensitiveMatcher
NewSensitiveMatcher creates a matcher that combines the given inner matcher with built-in sensitive file patterns. Additional patterns can be added.
func (*SensitiveMatcher) IsIgnored ¶ added in v0.4.0
func (s *SensitiveMatcher) IsIgnored(path string, isDir bool) bool
IsIgnored checks both the inner matcher and the sensitive file patterns.
func (*SensitiveMatcher) IsSensitive ¶ added in v0.4.0
func (s *SensitiveMatcher) IsSensitive(path string) string
IsSensitive checks if the given path matches any sensitive file pattern. Returns the matching pattern if sensitive, or empty string if not.
func (*SensitiveMatcher) ShouldBlock ¶ added in v0.4.0
func (s *SensitiveMatcher) ShouldBlock(path string, isDir bool) (bool, string)
ShouldBlock combines IsIgnored and IsSensitive checks. Returns (blocked bool, reason string).