import { FileJp, Program } from "@specs-feup/clava/api/Joinpoints.js"; import MISRAContext from "./MISRAContext.js"; export default class MISRATool { #private; static context: MISRAContext; /** * Checks whether the source code complies with MISRA C coding guidelines and reports all violations identified during the analysis * @param startingPoint The AST node from which to start the analysis */ static checkCompliance(startingPoint?: Program | FileJp): void; /** * Transforms the source code to comply with the coding guidelines. * After the transformation, any violations that could not be fixed will be displayed along with their justification. */ static correctViolations(): void; /** * Recursively transforms the AST using a pre-order traversal * * @param $jp AST node from which to start the visit. * @returns Return true if any modification was made (removal, replacement or changes in descendants). Otherwise, returns false. */ private static transformAST; /** * Validates the C standard, creates a MISRA context, and initializes rules. */ private static init; /** * Selects applicable rules according to the analysis type. When not specified, both system and single translation unit rules are selected. */ private static initRules; /** * Checks whether the provided standard version is valid and supported */ private static validateStdVersion; private static getArgValue; /** * Displays standard violations based on execution mode. * - In detection mode, all violations are shown. * - In correction mode, only the remaining violations are displayed * * @param mode execution mode */ private static outputReport; /** * @returns Returns the number of identified violations. */ static getErrorCount(): number; /** * @returns Returns the number of active errors linked to nodes that are still present in the AST after correction. */ static getActiveErrorCount(): number; } //# sourceMappingURL=MISRATool.d.ts.map