Documentation
¶
Index ¶
- func DefaultExcludes() []types.Rule
- func NewBinaryRule() types.Rule
- func NewEcosystemRule(rootPath string) types.Rule
- func NewExtensionRule(exts []string, action types.RuleAction) types.Rule
- func NewGeneratedFileRule(sizeThresholdMB int64) types.Rule
- func NewLockFileRule() types.Rule
- func NewPatternRule(patterns []string, action types.RuleAction) types.Rule
- type BaseRule
- type BinaryRule
- type EcosystemRule
- type ExtensionRule
- type GeneratedFileRule
- type LockFileRule
- type PatternRule
- type Rule
- type RuleAction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultExcludes ¶
func NewBinaryRule ¶ added in v0.2.3
func NewEcosystemRule ¶ added in v0.4.1
NewEcosystemRule creates an ecosystem-aware lock file detector
func NewExtensionRule ¶
func NewExtensionRule(exts []string, action types.RuleAction) types.Rule
func NewGeneratedFileRule ¶ added in v0.4.1
func NewLockFileRule ¶ added in v0.4.1
func NewPatternRule ¶
func NewPatternRule(patterns []string, action types.RuleAction) types.Rule
Types ¶
type BaseRule ¶
type BaseRule struct {
// contains filtered or unexported fields
}
BaseRule provides common functionality
func (*BaseRule) Action ¶
func (r *BaseRule) Action() RuleAction
type BinaryRule ¶ added in v0.2.3
func (*BinaryRule) Match ¶ added in v0.2.3
func (r *BinaryRule) Match(path string) bool
Match checks if a file is binary using a three-stage approach for optimal performance: 1. Extension check (fastest - O(1) map lookup, no I/O) 2. File size check (fast - single stat call, no content read) 3. Content analysis (slowest - reads file content as last resort)
type EcosystemRule ¶ added in v0.4.1
EcosystemRule detects and excludes lock files based on detected package managers
func (*EcosystemRule) Match ¶ added in v0.4.1
func (er *EcosystemRule) Match(path string) bool
Match checks if a file is a lock file for any detected ecosystem
type ExtensionRule ¶
func (*ExtensionRule) Match ¶
func (r *ExtensionRule) Match(path string) bool
type GeneratedFileRule ¶ added in v0.4.1
func (*GeneratedFileRule) Match ¶ added in v0.4.1
func (r *GeneratedFileRule) Match(path string) bool
type LockFileRule ¶ added in v0.4.1
func (*LockFileRule) Match ¶ added in v0.4.1
func (r *LockFileRule) Match(path string) bool
type PatternRule ¶
func (*PatternRule) Match ¶
func (r *PatternRule) Match(path string) bool
func (*PatternRule) Patterns ¶
func (r *PatternRule) Patterns() []string
type Rule ¶
type Rule interface {
Match(path string) bool
Action() RuleAction
}
Click to show internal directories.
Click to hide internal directories.