common_fs.file_filter¶
- 
class cpp_linter.common_fs.file_filter.FileFilter(ignore_value: str = 
'', extensions: list[str] | None =None, not_ignored: list[str] | None =None, tool_specific_name: str | None =None)[source]¶ A reusable mechanism for parsing and validating file filters.
- Parameters:¶
 - extensions: list[str] | None = 
None¶ A list of file extensions in which to focus.
- ignore_value: str = 
''¶ The user input specified via
--ignoreCLI argument.- not_ignored: list[str] | None = 
None¶ A list of files or paths that will be explicitly not ignored.
- tool_specific_name: str | None = 
None¶ A clang tool name for which the file filter is specifically applied. This only gets used in debug statements.
- extensions: list[str] | None = 
 
- 
parse_submodules(path: str = 
'.gitmodules')[source]¶ Automatically detect submodules from the given relative
path. This will add each submodule to theignoredlist unless already specified asnot_ignored.
- is_file_in_list(ignored: bool, file_name: PurePath) bool[source]¶
 Determine if a file is specified in a list of paths and/or filenames.
- is_source_or_ignored(file_name: str) bool[source]¶
 Exclude undesired files (specified by user input
--extensionsand--ignoreoptions).- Parameters:¶
 - Returns:¶
 Trueif (in order of precedence)file_nameis using one of the specifiedextensionsANDfile_nameis innot_ignoredORfile_nameis not inignored.
Otherwise
False.
- 
class cpp_linter.common_fs.file_filter.TidyFileFilter(ignore_value: str = 
'', extensions: list[str] | None =None, not_ignored: list[str] | None =None)[source]¶ A specialized
FileFilterwhose debug prompts indicate clang-tidy preparation.
- 
class cpp_linter.common_fs.file_filter.FormatFileFilter(ignore_value: str = 
'', extensions: list[str] | None =None, not_ignored: list[str] | None =None)[source]¶ A specialized
FileFilterwhose debug prompts indicate clang-format preparation.