Module filtering

Module filtering 

Source
Expand description

Provides standalone functions for file filtering logic.

These functions are used by the discovery stage to determine which files should be included in the processing pipeline. They are exposed publicly to allow for their use in other contexts.

Functions§

check_process_last
Checks if a file’s relative path matches any of the -z/--last glob patterns.
is_file_type
Checks if the metadata belongs to a regular file.
is_likely_text
Checks if the file content is likely text-based by reading its head.
is_likely_text_from_buffer
Checks if a byte buffer is likely text-based.
is_lockfile
Checks if a path corresponds to a common lockfile name or path suffix.
passes_extension_filters
Checks if a path passes the include/exclude extension filters defined in Config.
passes_size_filter
Checks if the file’s size is within the configured limit.