Documentation
¶
Index ¶
Constants ¶
const PolicyVersion = "file-scope-v1"
PolicyVersion is part of consumers' result keys. Change it whenever the default file universe changes, even if the annotation format stays the same.
Variables ¶
This section is empty.
Functions ¶
func DefaultExcludePathSegments ¶ added in v0.0.11
func DefaultExcludePathSegments() []string
DefaultExcludePathSegments returns an owned copy of the system exclusions. These are directory components, never prefix/glob patterns.
func HasExcludedPathSegment ¶ added in v0.0.8
HasExcludedPathSegment reports whether file has any path component that exactly equals one of the given segment names. Backslashes are normalized to slashes; empty components and empty segment entries are ignored.
Types ¶
type LegacyOptions
deprecated
type Options ¶
type Options struct {
Suffix []string // include .go
ExcludeSuffix []string // exclude _test.go
Include []string
Exclude []string
// ExcludePathSegments drops files whose path has any exact path-component
// matching a listed name (e.g. "vendor", "node_modules"). Generic checkers
// use this list verbatim; policy entry points add DefaultExcludePathSegments.
ExcludePathSegments []string
}
func WithDefaultPathSegments ¶ added in v0.0.11
WithDefaultPathSegments preserves caller rules and adds the fixed policy.