import { Joinpoint } from "@specs-feup/clava/api/Joinpoints.js"; import MISRARule from "../../MISRARule.js"; import MISRAContext from "../../MISRAContext.js"; import { MISRATransformationReport } from "../../MISRA.js"; /** * MISRA Rule 20.2: The ', " or \ characters and the /* or // character sequences shall not occur in a header filename */ export default class Rule_20_2_InvalidHeaderFileName extends MISRARule { constructor(context: MISRAContext); /** * Checks if the given joinpoint is a header file whose name includes invalid characters. * * @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; /** * Renames a header file to ensure it contains only valid characters and updates all related includes accordingly. * * @param $jp - Joinpoint to transform * @returns Report detailing the transformation result */ transform($jp: Joinpoint): MISRATransformationReport; /** * Finds all include joinpoints that reference a specific header file * * @param headerFileJp - The header file joinpoint * @returns List of matching include statements */ private getMatchingIncludes; /** * Computes the full path to the header file based on the include statement * * @param includeJp The include joinpoint * @returns Resolved path to the header file */ private getHeaderFilePath; /** * Updates the provided include joinpoints to reference the new header file name * * @param includesOfHeader List of include joinpoints to update * @param newFilename The new filename for the header file */ private updateIncludes; /** * Computes the new include path with the updated header file name * * @param includeJp - Original include statement * @param newHeaderFileName - New header file name * @returns The updated include path */ private getNewIncludeName; } //# sourceMappingURL=Rule_20_2_InvalidHeaderFileName.d.ts.map