On this page
Shared file-walking utilities for linters providing recursive directory traversal with gitignore-aware filtering and extension matching.
#rlsbl.lint.utils
#rlsbl.lint.utils
Shared file-walking utilities for linters providing recursive directory traversal with gitignore-aware filtering and extension matching.
#_split_name_filters
def _split_name_filters(names)(exact names, glob patterns) from a directory-exclusion set.
#walk_source_files
def walk_source_files(project_path: str, extensions: tuple[str, ...], exclude_patterns: list[str], exclude_dirs: list[str] | None=None, *, excluded_dir_names: frozenset[str]=LINTER_EXCLUDED_DIRS) -> list[str]Walk project directory, return source files matching extensions.
Args:
project_path: root of the walk.extensions: filename suffixes to collect.exclude_patterns: fnmatch patterns applied against relative paths.exclude_dirs: directory PATHS (relative to project_path) to skip,
matched by normalized absolute path -- used to exclude sibling workspace project directories.
excluded_dir_names: directory NAMES (or fnmatch patterns) pruned
anywhere in the tree. Defaults to :data:LINTER_EXCLUDED_DIRS, which is what every linter wants; a caller that must visit build and asset directories passes its own narrower set explicitly.
By default (empty exclude_patterns), all files including tests are included.