Protected
contextMISRA context for error tracking and rule transformations state
Readonly
ruleIDUnique identifier for the MISRA rule.
Protected
logMISRAErrorLogs a MISRA-C rule violation error
The joinpoint where the violation occurred
Description of the violation
Protected
logMISRAWarningLogs a warning from automatic MISRA-C correction, which may change the program's behavior
The joinpoint where the correction was applied
Description of the warning
Checks if the given joinpoint is a switch statement with less than two clauses
Joinpoint to analyze
[logErrors=false] - Whether to log errors if a violation is detected
Returns true if the joinpoint violates the rule, false otherwise
Transforms a switch statement with less than two clauses into equivalent statement(s), only if there is no conditional break. If a conditional break is present, no transformation is performed and an error is generated.
Joinpoint to transform
Report detailing the transformation result
MISRA Rule 16.6: Every switch statement shall have at least two switch-clauses.