import { Joinpoint } from "@specs-feup/clava/api/Joinpoints.js"; import MISRARule from "../../MISRARule.js"; import { AnalysisType, MISRATransformationReport } from "../../MISRA.js"; /** * MISRA-C Rule 2.6: A function should not contain unused label declarations. * */ export default class Rule_2_6_UnusedLabels extends MISRARule { /** * 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 represents a function with unused labels. * A tag is considered unused if it is declared but not referenced by any goto statement. * * @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; /** * Removes all unused labels if the provided joinpoint represents a function * * @param $jp - Joinpoint to transform * @returns Report detailing the transformation result */ apply($jp: Joinpoint): MISRATransformationReport; } //# sourceMappingURL=Rule_2_6_UnusedLabels.d.ts.map