devops.cpp
Package defining C++ check rules.
- devops.cpp.add_license_header(file, header_to_add, *, dry_run=False)[source]
Add the license header to the file content if it’s missing.
- Parameters:
- Returns:
bool – True if the license header was added, False if it was already present.
- Raises:
DevOpsFileNotFoundError – If the header file does not exist.
- Return type:
- devops.cpp.build_cpp_rules(config=CppConfig(style_checks=True, license_header_check=True, license_header=None, check_only_staged_files=False, header_guards_according_to_filepath=False))[source]
Build and return the list of C++ rules based on the global configuration.
- devops.cpp.filter_buggy_cpp(files)[source]
Filter out known buggy C++ header files from a list of files.
- devops.cpp.run_cpp_checks(rules, config=CppConfig(style_checks=True, license_header_check=True, license_header=None, check_only_staged_files=False, header_guards_according_to_filepath=False), dirs=None)[source]
Run C++ checks based on the provided rules.
Returns immediately after encountering the first file with errors.
Modules
Module for filtering known buggy C++ header files. |
|
Module to build C++ rules based on global configuration. |
|
C++ checks module. |
|
Module to check for license headers in C++ files. |
|
C++ rules for mstd devops. |