Skip to main content

Module filter

Module filter 

Source
Expand description

File selection: extension whitelist + directory blacklist double gate.

Both gates always apply. An extension must be whitelisted AND the path must not hit an excluded directory name, prefix rule, or glob — this is what protects dep/, binaries, and build outputs from modification.

Structs§

FilterConfig
Compiled, effective filter configuration. The fields are the post-normalization output of FilterConfig::build (lowercased, validated, compiled) — constructing them by hand bypasses that normalization, so always go through build.
FilterOptions
Raw filter inputs, normalized by FilterConfig::build.
Glob
A compiled --exclude-glob pattern.

Constants§

DEFAULT_EXCLUDE_DIRS
Directory names excluded by default, matched case-insensitively on the directory name itself.
DEFAULT_EXCLUDE_PREFIXES
Directory-name prefixes excluded by default (OutputFile* / OutputFiles*).
DEFAULT_EXTENSIONS
Default extension whitelist (source code + config/data + docs).
MSBUILD_EXTENSIONS
Opt-in MSBuild / Visual Studio extensions (--include-msbuild). VS re-saves these with a BOM, so they stay off the default whitelist.
RC_EXTENSIONS
Opt-in resource-script extensions (--include-rc). rc.exe has limited UTF-8 support, so these stay off the default whitelist.

Functions§

extension_of
Lowercased file extension of path (foo.PNG → png); None when the file has no extension.