import { Joinpoint } from "@specs-feup/clava/api/Joinpoints.js"; import MISRARule from "../../MISRARule.js"; import { AnalysisType, MISRATransformationReport } from "../../MISRA.js"; /** * MISRA-C Rule 16.6: Every switch statement shall have at least two switch-clauses. */ export default class Rule_16_6_SwitchMinTwoClauses extends MISRARule { /** * A positive integer starting from 1 that indicates the rule's priority, determining the order in which rules are applied. */ readonly priority = 5; /** * Scope of analysis */ readonly analysisType = AnalysisType.SINGLE_TRANSLATION_UNIT; /** * @returns Rule identifier according to MISRA-C:2012 */ get name(): string; /** * Checks if the given joinpoint is a switch statement with less than two clauses * @param $jp - Joinpoint to analyze * @param logErrors - [logErrors=false] - Whether to log errors if a violation is detected * @returns Returns true if the joinpoint violates the rule, false otherwise */ match($jp: Joinpoint, logErrors?: boolean): boolean; /** * 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. * * @param $jp - Joinpoint to transform * @returns Report detailing the transformation result */ apply($jp: Joinpoint): MISRATransformationReport; } //# sourceMappingURL=Rule_16_6_SwitchMinTwoClauses.d.ts.map