devops.cpp.style_rules
C++ rules for mstd devops.
Functions
|
Check if the C++ header file has proper header guards. |
|
Check if the #define for the given macro exists in the lines. |
|
Find the header guard macro in the given lines. |
Classes
Rule to check for proper header guards in C++ header files. |
|
|
Rule to check that a specific key sequence appears only in a given order. |
Exceptions
Custom exception for header guard errors. |
- class devops.cpp.style_rules.CheckKeySeqOrder(key_sequence)[source]
Bases:
RuleRule to check that a specific key sequence appears only in a given order.
- Parameters:
key_sequence (str)
- exception devops.cpp.style_rules.HeaderGuardError[source]
Bases:
ExceptionCustom exception for header guard errors.
- devops.cpp.style_rules.find_define_macro(lines, macro)[source]
Check if the #define for the given macro exists in the lines.
- devops.cpp.style_rules.find_header_guard(lines)[source]
Find the header guard macro in the given lines.
- Parameters:
- Returns:
str – The header guard macro if found.
- Raises:
HeaderGuardError – If the header guard is not properly defined.
- Return type:
- devops.cpp.style_rules.check_header_guards(file_rule_input)[source]
Check if the C++ header file has proper header guards.
- Parameters:
file_rule_input (FileRuleInput) – The input containing the file content and path to check.
- Returns:
ResultType – The result of the header guard check.
- Return type: