SPeCS Packages Documentation
    Preparing search index...

    Tracks MISRA-C violations during the analysis and/or transformation of the code. Also generates unique variable and function names.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    storage: Map<string, MISRATransformationResults> = ...

    Accessors

    • get config(): Map<string, any> | undefined

      Returns the user-provided configuration that assists in violation correction, if provided. Otherwise, returns undefined.

      Returns Map<string, any> | undefined

    • set config(configFilePath: string): void

      Loads the JSON config file and transforms it into an internal Map representation. If the file does not exist, logs an error and exits the process.

      Parameters

      • configFilePath: string

      Returns void

    Methods

    • Registers a new violation of the standard

      Parameters

      • ruleID: string

        Identifier of the violated rule

      • $jp: Joinpoint

        Joinpoint where the error was detected

      • message: string

        Description of the error

      Returns void

    • Returns the type of transformation applied by the specified rule to the given AST node. If no transformation was recorded, returns undefined.

      Parameters

      • ruleID: string

        Identifier of the violated rule

      • $jp: Joinpoint

        AST node

      Returns MISRATransformationType | undefined

      The type of transformation applied, or undefined if none was recorded.

    • Displays violations linked to nodes that are still present in the AST after correction.

      Returns void

    • Displays all violations found in the source code.

      Returns void