Documentation
¶
Overview ¶
Package pathfilter excludes vendor, third-party, and generated files from analysis. It uses enry as the foundation for vendor detection and adds supplementary generated-file name patterns that enry does not cover.
A Filter is immutable after construction and safe for concurrent use.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Filter ¶
type Filter struct {
// contains filtered or unexported fields
}
Filter determines whether a file should be excluded from analysis. It combines enry vendor detection with generated-file name patterns.
func (*Filter) IsExcluded ¶
IsExcluded reports whether the given path should be excluded from analysis. This performs path-only checks (no file content needed).
func (*Filter) IsExcludedWithContent ¶
IsExcludedWithContent performs path-only checks first, then inspects the first line of content for generated-file markers (e.g., "DO NOT EDIT").
func (*Filter) IsGeneratedContent ¶
IsGeneratedContent checks file content for generated-file header markers.
func (*Filter) IsGeneratedPath ¶
IsGeneratedPath checks suffix and filename-prefix rules only (no enry.IsVendor). This allows callers to distinguish vendor files from generated files.