@specs-feup/clava-misra 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitignore +8 -0
- package/README.md +53 -19
- package/dist/MISRA.d.ts +28 -10
- package/dist/MISRA.d.ts.map +1 -1
- package/dist/MISRA.js +30 -10
- package/dist/MISRA.js.map +1 -1
- package/dist/MISRAContext.d.ts +65 -11
- package/dist/MISRAContext.d.ts.map +1 -1
- package/dist/MISRAContext.js +131 -35
- package/dist/MISRAContext.js.map +1 -1
- package/dist/MISRARule.d.ts +38 -25
- package/dist/MISRARule.d.ts.map +1 -1
- package/dist/MISRARule.js +40 -18
- package/dist/MISRARule.js.map +1 -1
- package/dist/MISRATool.d.ts +39 -5
- package/dist/MISRATool.d.ts.map +1 -1
- package/dist/MISRATool.js +102 -46
- package/dist/MISRATool.js.map +1 -1
- package/dist/StandardGuideline.d.ts +22 -0
- package/dist/StandardGuideline.d.ts.map +1 -0
- package/dist/StandardGuideline.js +12 -0
- package/dist/StandardGuideline.js.map +1 -0
- package/dist/ast-visitor/Context.d.ts +11 -0
- package/dist/ast-visitor/Context.d.ts.map +1 -0
- package/dist/ast-visitor/Context.js +15 -0
- package/dist/ast-visitor/Context.js.map +1 -0
- package/dist/ast-visitor/Visit.d.ts +23 -0
- package/dist/ast-visitor/Visit.d.ts.map +1 -0
- package/dist/ast-visitor/Visit.js +18 -0
- package/dist/ast-visitor/Visit.js.map +1 -0
- package/dist/ast-visitor/VisitWithContext.d.ts +32 -0
- package/dist/ast-visitor/VisitWithContext.d.ts.map +1 -0
- package/dist/ast-visitor/VisitWithContext.js +26 -0
- package/dist/ast-visitor/VisitWithContext.js.map +1 -0
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/rules/Section13_SideEffects/Rule_13_6_SafeSizeOfOperand.d.ts +27 -0
- package/dist/rules/Section13_SideEffects/Rule_13_6_SafeSizeOfOperand.d.ts.map +1 -0
- package/dist/rules/Section13_SideEffects/Rule_13_6_SafeSizeOfOperand.js +98 -0
- package/dist/rules/Section13_SideEffects/Rule_13_6_SafeSizeOfOperand.js.map +1 -0
- package/dist/rules/Section16_SwitchStatements/Rule_16_2_TopLevelSwitch.d.ts +45 -6
- package/dist/rules/Section16_SwitchStatements/Rule_16_2_TopLevelSwitch.d.ts.map +1 -1
- package/dist/rules/Section16_SwitchStatements/Rule_16_2_TopLevelSwitch.js +91 -8
- package/dist/rules/Section16_SwitchStatements/Rule_16_2_TopLevelSwitch.js.map +1 -1
- package/dist/rules/Section16_SwitchStatements/Rule_16_3_UnconditionalBreak.d.ts +15 -5
- package/dist/rules/Section16_SwitchStatements/Rule_16_3_UnconditionalBreak.d.ts.map +1 -1
- package/dist/rules/Section16_SwitchStatements/Rule_16_3_UnconditionalBreak.js +20 -6
- package/dist/rules/Section16_SwitchStatements/Rule_16_3_UnconditionalBreak.js.map +1 -1
- package/dist/rules/Section16_SwitchStatements/Rule_16_4_SwitchHasDefault.d.ts +11 -5
- package/dist/rules/Section16_SwitchStatements/Rule_16_4_SwitchHasDefault.d.ts.map +1 -1
- package/dist/rules/Section16_SwitchStatements/Rule_16_4_SwitchHasDefault.js +13 -10
- package/dist/rules/Section16_SwitchStatements/Rule_16_4_SwitchHasDefault.js.map +1 -1
- package/dist/rules/Section16_SwitchStatements/Rule_16_5_DefaultFirstOrLast.d.ts +11 -6
- package/dist/rules/Section16_SwitchStatements/Rule_16_5_DefaultFirstOrLast.d.ts.map +1 -1
- package/dist/rules/Section16_SwitchStatements/Rule_16_5_DefaultFirstOrLast.js +19 -11
- package/dist/rules/Section16_SwitchStatements/Rule_16_5_DefaultFirstOrLast.js.map +1 -1
- package/dist/rules/Section16_SwitchStatements/Rule_16_6_SwitchMinTwoClauses.d.ts +15 -5
- package/dist/rules/Section16_SwitchStatements/Rule_16_6_SwitchMinTwoClauses.d.ts.map +1 -1
- package/dist/rules/Section16_SwitchStatements/Rule_16_6_SwitchMinTwoClauses.js +24 -10
- package/dist/rules/Section16_SwitchStatements/Rule_16_6_SwitchMinTwoClauses.js.map +1 -1
- package/dist/rules/Section16_SwitchStatements/Rule_16_7_NonBooleanSwitchCondition.d.ts +22 -6
- package/dist/rules/Section16_SwitchStatements/Rule_16_7_NonBooleanSwitchCondition.d.ts.map +1 -1
- package/dist/rules/Section16_SwitchStatements/Rule_16_7_NonBooleanSwitchCondition.js +37 -10
- package/dist/rules/Section16_SwitchStatements/Rule_16_7_NonBooleanSwitchCondition.js.map +1 -1
- package/dist/rules/Section17_Functions/Rule_17_3_ImplicitFunction.d.ts +66 -0
- package/dist/rules/Section17_Functions/Rule_17_3_ImplicitFunction.d.ts.map +1 -0
- package/dist/rules/Section17_Functions/Rule_17_3_ImplicitFunction.js +209 -0
- package/dist/rules/Section17_Functions/Rule_17_3_ImplicitFunction.js.map +1 -0
- package/dist/rules/Section17_Functions/Rule_17_4_NonVoidReturn.d.ts +37 -12
- package/dist/rules/Section17_Functions/Rule_17_4_NonVoidReturn.d.ts.map +1 -1
- package/dist/rules/Section17_Functions/Rule_17_4_NonVoidReturn.js +112 -39
- package/dist/rules/Section17_Functions/Rule_17_4_NonVoidReturn.js.map +1 -1
- package/dist/rules/Section17_Functions/Rule_17_6_StaticArraySizeParam.d.ts +15 -5
- package/dist/rules/Section17_Functions/Rule_17_6_StaticArraySizeParam.d.ts.map +1 -1
- package/dist/rules/Section17_Functions/Rule_17_6_StaticArraySizeParam.js +21 -7
- package/dist/rules/Section17_Functions/Rule_17_6_StaticArraySizeParam.js.map +1 -1
- package/dist/rules/Section17_Functions/Rule_17_7_UnusedReturnValue.d.ts +11 -6
- package/dist/rules/Section17_Functions/Rule_17_7_UnusedReturnValue.d.ts.map +1 -1
- package/dist/rules/Section17_Functions/Rule_17_7_UnusedReturnValue.js +17 -8
- package/dist/rules/Section17_Functions/Rule_17_7_UnusedReturnValue.js.map +1 -1
- package/dist/rules/Section21-StandardLibraries/DisallowedStdLibFunctionRule.d.ts +105 -0
- package/dist/rules/Section21-StandardLibraries/DisallowedStdLibFunctionRule.d.ts.map +1 -0
- package/dist/rules/Section21-StandardLibraries/DisallowedStdLibFunctionRule.js +258 -0
- package/dist/rules/Section21-StandardLibraries/DisallowedStdLibFunctionRule.js.map +1 -0
- package/dist/rules/Section21-StandardLibraries/Rule_21_10_NoTimeDateFunctions.d.ts +25 -0
- package/dist/rules/Section21-StandardLibraries/Rule_21_10_NoTimeDateFunctions.d.ts.map +1 -0
- package/dist/rules/Section21-StandardLibraries/Rule_21_10_NoTimeDateFunctions.js +27 -0
- package/dist/rules/Section21-StandardLibraries/Rule_21_10_NoTimeDateFunctions.js.map +1 -0
- package/dist/rules/Section21-StandardLibraries/Rule_21_11_NoTgmathFunctions.d.ts +29 -0
- package/dist/rules/Section21-StandardLibraries/Rule_21_11_NoTgmathFunctions.d.ts.map +1 -0
- package/dist/rules/Section21-StandardLibraries/Rule_21_11_NoTgmathFunctions.js +31 -0
- package/dist/rules/Section21-StandardLibraries/Rule_21_11_NoTgmathFunctions.js.map +1 -0
- package/dist/rules/Section21-StandardLibraries/Rule_21_3_NoDynamicMemory.d.ts +25 -0
- package/dist/rules/Section21-StandardLibraries/Rule_21_3_NoDynamicMemory.d.ts.map +1 -0
- package/dist/rules/Section21-StandardLibraries/Rule_21_3_NoDynamicMemory.js +27 -0
- package/dist/rules/Section21-StandardLibraries/Rule_21_3_NoDynamicMemory.js.map +1 -0
- package/dist/rules/Section21-StandardLibraries/Rule_21_6_NoStdIOFunctions.d.ts +25 -0
- package/dist/rules/Section21-StandardLibraries/Rule_21_6_NoStdIOFunctions.d.ts.map +1 -0
- package/dist/rules/Section21-StandardLibraries/Rule_21_6_NoStdIOFunctions.js +27 -0
- package/dist/rules/Section21-StandardLibraries/Rule_21_6_NoStdIOFunctions.js.map +1 -0
- package/dist/rules/Section21-StandardLibraries/Rule_21_7_NoNumericStringConversions.d.ts +25 -0
- package/dist/rules/Section21-StandardLibraries/Rule_21_7_NoNumericStringConversions.d.ts.map +1 -0
- package/dist/rules/Section21-StandardLibraries/Rule_21_7_NoNumericStringConversions.js +27 -0
- package/dist/rules/Section21-StandardLibraries/Rule_21_7_NoNumericStringConversions.js.map +1 -0
- package/dist/rules/Section21-StandardLibraries/Rule_21_8_NoProcessControlFunctions.d.ts +30 -0
- package/dist/rules/Section21-StandardLibraries/Rule_21_8_NoProcessControlFunctions.d.ts.map +1 -0
- package/dist/rules/Section21-StandardLibraries/Rule_21_8_NoProcessControlFunctions.js +32 -0
- package/dist/rules/Section21-StandardLibraries/Rule_21_8_NoProcessControlFunctions.js.map +1 -0
- package/dist/rules/Section21-StandardLibraries/Rule_21_9_NoGenericSearchOrSort.d.ts +25 -0
- package/dist/rules/Section21-StandardLibraries/Rule_21_9_NoGenericSearchOrSort.d.ts.map +1 -0
- package/dist/rules/Section21-StandardLibraries/Rule_21_9_NoGenericSearchOrSort.js +27 -0
- package/dist/rules/Section21-StandardLibraries/Rule_21_9_NoGenericSearchOrSort.js.map +1 -0
- package/dist/rules/Section2_UnusedCode/Rule_2_3_UnusedTypeDecl.d.ts +6 -14
- package/dist/rules/Section2_UnusedCode/Rule_2_3_UnusedTypeDecl.d.ts.map +1 -1
- package/dist/rules/Section2_UnusedCode/Rule_2_3_UnusedTypeDecl.js +17 -27
- package/dist/rules/Section2_UnusedCode/Rule_2_3_UnusedTypeDecl.js.map +1 -1
- package/dist/rules/Section2_UnusedCode/Rule_2_4_UnusedTagDecl.d.ts +13 -7
- package/dist/rules/Section2_UnusedCode/Rule_2_4_UnusedTagDecl.d.ts.map +1 -1
- package/dist/rules/Section2_UnusedCode/Rule_2_4_UnusedTagDecl.js +31 -17
- package/dist/rules/Section2_UnusedCode/Rule_2_4_UnusedTagDecl.js.map +1 -1
- package/dist/rules/Section2_UnusedCode/Rule_2_6_UnusedLabels.d.ts +26 -7
- package/dist/rules/Section2_UnusedCode/Rule_2_6_UnusedLabels.d.ts.map +1 -1
- package/dist/rules/Section2_UnusedCode/Rule_2_6_UnusedLabels.js +32 -14
- package/dist/rules/Section2_UnusedCode/Rule_2_6_UnusedLabels.js.map +1 -1
- package/dist/rules/Section2_UnusedCode/Rule_2_7_UnusedParameters.d.ts +48 -6
- package/dist/rules/Section2_UnusedCode/Rule_2_7_UnusedParameters.d.ts.map +1 -1
- package/dist/rules/Section2_UnusedCode/Rule_2_7_UnusedParameters.js +84 -34
- package/dist/rules/Section2_UnusedCode/Rule_2_7_UnusedParameters.js.map +1 -1
- package/dist/rules/Section3_Comments/Rule_3_1_CommentSequences.d.ts +24 -5
- package/dist/rules/Section3_Comments/Rule_3_1_CommentSequences.d.ts.map +1 -1
- package/dist/rules/Section3_Comments/Rule_3_1_CommentSequences.js +27 -7
- package/dist/rules/Section3_Comments/Rule_3_1_CommentSequences.js.map +1 -1
- package/dist/rules/Section5_Identifiers/IdentifierRenameRule.d.ts +46 -0
- package/dist/rules/Section5_Identifiers/IdentifierRenameRule.d.ts.map +1 -0
- package/dist/rules/Section5_Identifiers/IdentifierRenameRule.js +40 -0
- package/dist/rules/Section5_Identifiers/IdentifierRenameRule.js.map +1 -0
- package/dist/rules/Section5_Identifiers/Rule_5_1_DistinctExternalIdentifiers.d.ts +25 -0
- package/dist/rules/Section5_Identifiers/Rule_5_1_DistinctExternalIdentifiers.d.ts.map +1 -0
- package/dist/rules/Section5_Identifiers/Rule_5_1_DistinctExternalIdentifiers.js +46 -0
- package/dist/rules/Section5_Identifiers/Rule_5_1_DistinctExternalIdentifiers.js.map +1 -0
- package/dist/rules/Section5_Identifiers/Rule_5_6_UniqueTypedefNames.d.ts +26 -0
- package/dist/rules/Section5_Identifiers/Rule_5_6_UniqueTypedefNames.d.ts.map +1 -0
- package/dist/rules/Section5_Identifiers/Rule_5_6_UniqueTypedefNames.js +54 -0
- package/dist/rules/Section5_Identifiers/Rule_5_6_UniqueTypedefNames.js.map +1 -0
- package/dist/rules/Section5_Identifiers/Rule_5_7_UniqueTagNames.d.ts +27 -0
- package/dist/rules/Section5_Identifiers/Rule_5_7_UniqueTagNames.d.ts.map +1 -0
- package/dist/rules/Section5_Identifiers/Rule_5_7_UniqueTagNames.js +55 -0
- package/dist/rules/Section5_Identifiers/Rule_5_7_UniqueTagNames.js.map +1 -0
- package/dist/rules/Section5_Identifiers/Rule_5_8_UniqueExternalLinkIdentifiers.d.ts +24 -0
- package/dist/rules/Section5_Identifiers/Rule_5_8_UniqueExternalLinkIdentifiers.d.ts.map +1 -0
- package/dist/rules/Section5_Identifiers/Rule_5_8_UniqueExternalLinkIdentifiers.js +42 -0
- package/dist/rules/Section5_Identifiers/Rule_5_8_UniqueExternalLinkIdentifiers.js.map +1 -0
- package/dist/rules/Section5_Identifiers/Rule_5_9_UniqueInternalLinkIdentifiers.d.ts +24 -0
- package/dist/rules/Section5_Identifiers/Rule_5_9_UniqueInternalLinkIdentifiers.d.ts.map +1 -0
- package/dist/rules/Section5_Identifiers/Rule_5_9_UniqueInternalLinkIdentifiers.js +42 -0
- package/dist/rules/Section5_Identifiers/Rule_5_9_UniqueInternalLinkIdentifiers.js.map +1 -0
- package/dist/rules/Section8_DeclarationsAndDefinitions/Rule_8_6_SingleExternalDefinition.d.ts +35 -0
- package/dist/rules/Section8_DeclarationsAndDefinitions/Rule_8_6_SingleExternalDefinition.d.ts.map +1 -0
- package/dist/rules/Section8_DeclarationsAndDefinitions/Rule_8_6_SingleExternalDefinition.js +98 -0
- package/dist/rules/Section8_DeclarationsAndDefinitions/Rule_8_6_SingleExternalDefinition.js.map +1 -0
- package/dist/rules/Section8_DeclarationsAndDefinitions/Rule_8_7_RestrictExternalLinkage.d.ts +35 -0
- package/dist/rules/Section8_DeclarationsAndDefinitions/Rule_8_7_RestrictExternalLinkage.d.ts.map +1 -0
- package/dist/rules/Section8_DeclarationsAndDefinitions/Rule_8_7_RestrictExternalLinkage.js +76 -0
- package/dist/rules/Section8_DeclarationsAndDefinitions/Rule_8_7_RestrictExternalLinkage.js.map +1 -0
- package/dist/rules/Section8_DeclarationsAndDefinitions/Rule_8_9_BlockScopeDefinition.d.ts +32 -0
- package/dist/rules/Section8_DeclarationsAndDefinitions/Rule_8_9_BlockScopeDefinition.d.ts.map +1 -0
- package/dist/rules/Section8_DeclarationsAndDefinitions/Rule_8_9_BlockScopeDefinition.js +57 -0
- package/dist/rules/Section8_DeclarationsAndDefinitions/Rule_8_9_BlockScopeDefinition.js.map +1 -0
- package/dist/rules/UserConfigurableRule.d.ts +55 -0
- package/dist/rules/UserConfigurableRule.d.ts.map +1 -0
- package/dist/rules/UserConfigurableRule.js +16 -0
- package/dist/rules/UserConfigurableRule.js.map +1 -0
- package/dist/rules/index.d.ts +11 -18
- package/dist/rules/index.d.ts.map +1 -1
- package/dist/rules/index.js +47 -7
- package/dist/rules/index.js.map +1 -1
- package/dist/tests/Section17_Functions/misra_config.json +10 -0
- package/dist/tests/Section21-StandardLibraries/misra_config.json +88 -0
- package/dist/tests/Section21-StandardLibraries/problematic_misra_config.json +19 -0
- package/dist/tests/utils.d.ts +6 -3
- package/dist/tests/utils.d.ts.map +1 -1
- package/dist/tests/utils.js +33 -7
- package/dist/tests/utils.js.map +1 -1
- package/dist/utils/CallUtils.d.ts +15 -0
- package/dist/utils/CallUtils.d.ts.map +1 -0
- package/dist/utils/CallUtils.js +34 -0
- package/dist/utils/CallUtils.js.map +1 -0
- package/dist/utils/CommentUtils.d.ts +21 -0
- package/dist/utils/CommentUtils.d.ts.map +1 -0
- package/dist/utils/CommentUtils.js +27 -0
- package/dist/utils/CommentUtils.js.map +1 -0
- package/dist/utils/FileUtils.d.ts +51 -0
- package/dist/utils/FileUtils.d.ts.map +1 -0
- package/dist/utils/FileUtils.js +121 -0
- package/dist/utils/FileUtils.js.map +1 -0
- package/dist/utils/FunctionUtils.d.ts +25 -0
- package/dist/utils/FunctionUtils.d.ts.map +1 -0
- package/dist/utils/FunctionUtils.js +65 -0
- package/dist/utils/FunctionUtils.js.map +1 -0
- package/dist/utils/IdentifierUtils.d.ts +14 -0
- package/dist/utils/IdentifierUtils.d.ts.map +1 -0
- package/dist/utils/IdentifierUtils.js +87 -0
- package/dist/utils/IdentifierUtils.js.map +1 -0
- package/dist/utils/JoinpointUtils.d.ts +19 -0
- package/dist/utils/JoinpointUtils.d.ts.map +1 -0
- package/dist/utils/JoinpointUtils.js +46 -0
- package/dist/utils/JoinpointUtils.js.map +1 -0
- package/dist/utils/ProgramUtils.d.ts +14 -0
- package/dist/utils/ProgramUtils.d.ts.map +1 -0
- package/dist/utils/ProgramUtils.js +72 -0
- package/dist/utils/ProgramUtils.js.map +1 -0
- package/dist/utils/SwitchUtils.d.ts +21 -0
- package/dist/utils/SwitchUtils.d.ts.map +1 -0
- package/dist/utils/SwitchUtils.js +47 -0
- package/dist/utils/SwitchUtils.js.map +1 -0
- package/dist/utils/TypeDeclUtils.d.ts +35 -0
- package/dist/utils/TypeDeclUtils.d.ts.map +1 -0
- package/dist/utils/TypeDeclUtils.js +78 -0
- package/dist/utils/TypeDeclUtils.js.map +1 -0
- package/dist/utils/VarUtils.d.ts +19 -0
- package/dist/utils/VarUtils.d.ts.map +1 -0
- package/dist/utils/VarUtils.js +59 -0
- package/dist/utils/VarUtils.js.map +1 -0
- package/package.json +16 -6
- package/src/MISRA.ts +33 -17
- package/src/MISRAContext.ts +128 -30
- package/src/MISRARule.ts +61 -29
- package/src/MISRATool.ts +108 -42
- package/src/StandardGuideline.ts +23 -0
- package/src/ast-visitor/Context.ts +16 -0
- package/src/ast-visitor/Visit.ts +26 -0
- package/src/ast-visitor/VisitWithContext.ts +42 -0
- package/src/main.ts +1 -1
- package/src/rules/Section13_SideEffects/Rule_13_6_SafeSizeOfOperand.ts +114 -0
- package/src/rules/Section16_SwitchStatements/Rule_16_2_TopLevelSwitch.ts +103 -13
- package/src/rules/Section16_SwitchStatements/Rule_16_3_UnconditionalBreak.ts +24 -10
- package/src/rules/Section16_SwitchStatements/Rule_16_4_SwitchHasDefault.ts +17 -8
- package/src/rules/Section16_SwitchStatements/Rule_16_5_DefaultFirstOrLast.ts +20 -12
- package/src/rules/Section16_SwitchStatements/Rule_16_6_SwitchMinTwoClauses.ts +23 -12
- package/src/rules/Section16_SwitchStatements/Rule_16_7_NonBooleanSwitchCondition.ts +44 -13
- package/src/rules/Section17_Functions/Rule_17_3_ImplicitFunction.ts +153 -104
- package/src/rules/Section17_Functions/Rule_17_4_NonVoidReturn.ts +114 -44
- package/src/rules/Section17_Functions/Rule_17_6_StaticArraySizeParam.ts +27 -10
- package/src/rules/Section17_Functions/Rule_17_7_UnusedReturnValue.ts +20 -12
- package/src/rules/Section21-StandardLibraries/DisallowedStdLibFunctionRule.ts +317 -0
- package/src/rules/Section21-StandardLibraries/Rule_21_10_NoTimeDateFunctions.ts +30 -0
- package/src/rules/Section21-StandardLibraries/Rule_21_11_NoTgmathFunctions.ts +35 -0
- package/src/rules/Section21-StandardLibraries/Rule_21_3_NoDynamicMemory.ts +30 -0
- package/src/rules/Section21-StandardLibraries/Rule_21_6_NoStdIOFunctions.ts +30 -0
- package/src/rules/Section21-StandardLibraries/Rule_21_7_NoNumericStringConversions.ts +29 -0
- package/src/rules/Section21-StandardLibraries/Rule_21_8_NoProcessControlFunctions.ts +36 -0
- package/src/rules/Section21-StandardLibraries/Rule_21_9_NoGenericSearchOrSort.ts +30 -0
- package/src/rules/Section2_UnusedCode/Rule_2_3_UnusedTypeDecl.ts +14 -29
- package/src/rules/Section2_UnusedCode/Rule_2_4_UnusedTagDecl.ts +33 -19
- package/src/rules/Section2_UnusedCode/Rule_2_6_UnusedLabels.ts +33 -20
- package/src/rules/Section2_UnusedCode/Rule_2_7_UnusedParameters.ts +90 -45
- package/src/rules/Section3_Comments/Rule_3_1_CommentSequences.ts +27 -8
- package/src/rules/Section5_Identifiers/IdentifierRenameRule.ts +63 -0
- package/src/rules/Section5_Identifiers/Rule_5_1_DistinctExternalIdentifiers.ts +52 -0
- package/src/rules/Section5_Identifiers/Rule_5_6_UniqueTypedefNames.ts +62 -0
- package/src/rules/Section5_Identifiers/Rule_5_7_UniqueTagNames.ts +61 -0
- package/src/rules/Section5_Identifiers/Rule_5_8_UniqueExternalLinkIdentifiers.ts +47 -0
- package/src/rules/Section5_Identifiers/Rule_5_9_UniqueInternalLinkIdentifiers.ts +47 -0
- package/src/rules/Section8_DeclarationsAndDefinitions/Rule_8_6_SingleExternalDefinition.ts +118 -0
- package/src/rules/Section8_DeclarationsAndDefinitions/Rule_8_7_RestrictExternalLinkage.ts +89 -0
- package/src/rules/Section8_DeclarationsAndDefinitions/Rule_8_9_BlockScopeDefinition.ts +65 -0
- package/src/rules/UserConfigurableRule.ts +60 -0
- package/src/rules/index.ts +45 -7
- package/src/tests/Section13_SideEffects/Rule_13_6_SafeSizeOfOperand.test.ts +114 -0
- package/src/tests/Section16_SwitchStatements/Rule_16_2_TopLevelSwitch.test.ts +7 -5
- package/src/tests/Section16_SwitchStatements/Rule_16_3_UnconditionalBreak.test.ts +40 -13
- package/src/tests/Section16_SwitchStatements/Rule_16_4_SwitchHasDefault.test.ts +10 -12
- package/src/tests/Section16_SwitchStatements/Rule_16_5_DefaultFirstOrLast.test.ts +5 -5
- package/src/tests/Section16_SwitchStatements/Rule_16_6_SwitchMinTwoClauses.test.ts +5 -5
- package/src/tests/Section16_SwitchStatements/Rule_16_7_NonBooleanSwitchCondition.test.ts +5 -5
- package/src/tests/Section17_Functions/Rule_17_3_ImplicitFunctions.test.ts +68 -40
- package/src/tests/Section17_Functions/Rule_17_3_ImplicitFunctions_MissingConfig.test.ts +98 -0
- package/src/tests/Section17_Functions/Rule_17_3_ImplicitFunctions_ProblematicConfig.test.ts +71 -0
- package/src/tests/Section17_Functions/Rule_17_4_NonVoidReturn.test.ts +103 -49
- package/src/tests/Section17_Functions/Rule_17_4_NonVoidReturn_MissingConfig.test.ts +7 -7
- package/src/tests/Section17_Functions/Rule_17_6_StaticArraySizeParam.test.ts +36 -7
- package/src/tests/Section17_Functions/Rule_17_7_UnusedReturnValue.test.ts +25 -21
- package/src/tests/Section17_Functions/misra_config.json +4 -3
- package/src/tests/Section21-StandardLibraries/Rule_21_10_NoTimeDateFunctions.test.ts +62 -0
- package/src/tests/Section21-StandardLibraries/Rule_21_11_NoTgmathFunctions.test.ts +67 -0
- package/src/tests/Section21-StandardLibraries/Rule_21_3_NoDynamicMemory.test.ts +84 -0
- package/src/tests/Section21-StandardLibraries/Rule_21_3_NoDynamicMemory_MissingConfig.test.ts +33 -0
- package/src/tests/Section21-StandardLibraries/Rule_21_3_NoDynamicMemory_ProblematicConfig.test.ts +71 -0
- package/src/tests/Section21-StandardLibraries/Rule_21_6_NoStdIOFunctions.test.ts +63 -0
- package/src/tests/Section21-StandardLibraries/Rule_21_7_NoNumericStringConversions.test.ts +91 -0
- package/src/tests/Section21-StandardLibraries/Rule_21_8_NoProcessControlFunctions.test.ts +65 -0
- package/src/tests/Section21-StandardLibraries/Rule_21_9_NoGenericSearchOrSort.test.ts +89 -0
- package/src/tests/Section21-StandardLibraries/misra_config.json +88 -0
- package/src/tests/Section21-StandardLibraries/problematic_misra_config.json +19 -0
- package/src/tests/Section2_UnusedCode/Rule_2_3_UnusedTypeDecl.test.ts +148 -113
- package/src/tests/Section2_UnusedCode/Rule_2_4_UnusedTagDecl.test.ts +243 -163
- package/src/tests/Section2_UnusedCode/Rule_2_6_UnusedLabels.test.ts +32 -20
- package/src/tests/Section2_UnusedCode/Rule_2_7_UnusedParameters.test.ts +36 -30
- package/src/tests/Section3_Comments/Rule_3_1_CommentSequences.test.ts +37 -8
- package/src/tests/Section5_Identifiers/Rule_5_1_DistinctExternalIdentifiers.test.ts +78 -0
- package/src/tests/Section5_Identifiers/Rule_5_6_UniqueTypedefNames.test.ts +120 -0
- package/src/tests/Section5_Identifiers/Rule_5_7_UniqueTagNames.test.ts +51 -0
- package/src/tests/Section5_Identifiers/Rule_5_8_UniqueExternalLinkIdentifiers.test.ts +73 -0
- package/src/tests/Section5_Identifiers/Rule_5_9_UniqueInternalLinkIdentifiers.test.ts +97 -0
- package/src/tests/Section8_DeclarationsAndDefinitions/Rule_8_6_SingleExternalDefinition.test.ts +160 -0
- package/src/tests/Section8_DeclarationsAndDefinitions/Rule_8_7_RestrictExternalLinkage.test.ts +46 -0
- package/src/tests/Section8_DeclarationsAndDefinitions/Rule_8_9_BlockScopeDefinition.test.ts +69 -0
- package/src/tests/utils.ts +32 -7
- package/src/utils/CallUtils.ts +40 -0
- package/src/utils/CommentUtils.ts +29 -0
- package/src/utils/FileUtils.ts +141 -0
- package/src/utils/FunctionUtils.ts +75 -0
- package/src/utils/IdentifierUtils.ts +94 -0
- package/src/utils/JoinpointUtils.ts +53 -0
- package/src/utils/ProgramUtils.ts +83 -0
- package/src/utils/SwitchUtils.ts +52 -0
- package/src/utils/TypeDeclUtils.ts +89 -0
- package/src/utils/VarUtils.ts +70 -0
- package/tsconfig.json +2 -1
- package/src/rules/Section20-PreprocessingDirectives/Rule_20_2_InvalidHeaderFileName.ts +0 -120
- package/src/rules/Section3_Comments/Rule_3_2_LineSplicing.ts +0 -36
- package/src/utils/utils.ts +0 -280
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import { Joinpoint } from "@specs-feup/clava/api/Joinpoints.js";
|
|
2
2
|
import MISRARule from "../../MISRARule.js";
|
|
3
|
-
import
|
|
4
|
-
import { MISRATransformationReport } from "../../MISRA.js";
|
|
3
|
+
import { AnalysisType, MISRATransformationReport } from "../../MISRA.js";
|
|
5
4
|
/**
|
|
6
|
-
* MISRA Rule 17.7: The value returned by a function having non-void return type shall be
|
|
7
|
-
used
|
|
5
|
+
* MISRA-C Rule 17.7: The value returned by a function having non-void return type shall be used
|
|
8
6
|
*/
|
|
9
7
|
export default class Rule_17_7_UnusedReturnValue extends MISRARule {
|
|
10
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Scope of analysis
|
|
10
|
+
*/
|
|
11
|
+
readonly analysisType = AnalysisType.SINGLE_TRANSLATION_UNIT;
|
|
12
|
+
/**
|
|
13
|
+
* @returns Rule identifier according to MISRA-C:2012
|
|
14
|
+
*/
|
|
15
|
+
get name(): string;
|
|
11
16
|
/**
|
|
12
17
|
* Checks if the given joinpoint represents a non-void function call with an unused return value.
|
|
13
18
|
*
|
|
@@ -23,6 +28,6 @@ export default class Rule_17_7_UnusedReturnValue extends MISRARule {
|
|
|
23
28
|
* @param $jp - Joinpoint to transform
|
|
24
29
|
* @returns Report detailing the transformation result
|
|
25
30
|
*/
|
|
26
|
-
|
|
31
|
+
apply($jp: Joinpoint): MISRATransformationReport;
|
|
27
32
|
}
|
|
28
33
|
//# sourceMappingURL=Rule_17_7_UnusedReturnValue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Rule_17_7_UnusedReturnValue.d.ts","sourceRoot":"","sources":["../../../src/rules/Section17_Functions/Rule_17_7_UnusedReturnValue.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Rule_17_7_UnusedReturnValue.d.ts","sourceRoot":"","sources":["../../../src/rules/Section17_Functions/Rule_17_7_UnusedReturnValue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqC,SAAS,EAAE,MAAM,qCAAqC,CAAC;AACnG,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,yBAAyB,EAA2B,MAAM,gBAAgB,CAAC;AAElG;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,2BAA4B,SAAQ,SAAS;IAC9D;;OAEG;IACH,QAAQ,CAAC,YAAY,wCAAwC;IAE7D;;OAEG;IACH,IAAa,IAAI,IAAI,MAAM,CAE1B;IAED;;;;;;OAMG;IACH,KAAK,CAAC,GAAG,EAAE,SAAS,EAAE,SAAS,GAAE,OAAe,GAAG,OAAO;IAW1D;;;;;;OAMG;IACH,KAAK,CAAC,GAAG,EAAE,SAAS,GAAG,yBAAyB;CAUnD"}
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
import { BuiltinType, Call, ExprStmt } from "@specs-feup/clava/api/Joinpoints.js";
|
|
2
2
|
import MISRARule from "../../MISRARule.js";
|
|
3
3
|
import ClavaJoinPoints from "@specs-feup/clava/api/clava/ClavaJoinPoints.js";
|
|
4
|
-
import { MISRATransformationReport, MISRATransformationType } from "../../MISRA.js";
|
|
4
|
+
import { AnalysisType, MISRATransformationReport, MISRATransformationType } from "../../MISRA.js";
|
|
5
5
|
/**
|
|
6
|
-
* MISRA Rule 17.7: The value returned by a function having non-void return type shall be
|
|
7
|
-
used
|
|
6
|
+
* MISRA-C Rule 17.7: The value returned by a function having non-void return type shall be used
|
|
8
7
|
*/
|
|
9
8
|
export default class Rule_17_7_UnusedReturnValue extends MISRARule {
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Scope of analysis
|
|
11
|
+
*/
|
|
12
|
+
analysisType = AnalysisType.SINGLE_TRANSLATION_UNIT;
|
|
13
|
+
/**
|
|
14
|
+
* @returns Rule identifier according to MISRA-C:2012
|
|
15
|
+
*/
|
|
16
|
+
get name() {
|
|
17
|
+
return "17.7";
|
|
12
18
|
}
|
|
13
19
|
/**
|
|
14
20
|
* Checks if the given joinpoint represents a non-void function call with an unused return value.
|
|
@@ -34,11 +40,14 @@ export default class Rule_17_7_UnusedReturnValue extends MISRARule {
|
|
|
34
40
|
* @param $jp - Joinpoint to transform
|
|
35
41
|
* @returns Report detailing the transformation result
|
|
36
42
|
*/
|
|
37
|
-
|
|
43
|
+
apply($jp) {
|
|
38
44
|
if (!this.match($jp))
|
|
39
45
|
return new MISRATransformationReport(MISRATransformationType.NoChange);
|
|
40
|
-
const
|
|
41
|
-
|
|
46
|
+
const callJp = $jp;
|
|
47
|
+
const castJp = ClavaJoinPoints.cStyleCast(ClavaJoinPoints.type("void"), callJp);
|
|
48
|
+
const newJp = $jp.replaceWith(castJp);
|
|
49
|
+
newJp.subExpr.replaceWith($jp);
|
|
50
|
+
return new MISRATransformationReport(MISRATransformationType.Replacement, newJp);
|
|
42
51
|
}
|
|
43
52
|
}
|
|
44
53
|
//# sourceMappingURL=Rule_17_7_UnusedReturnValue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Rule_17_7_UnusedReturnValue.js","sourceRoot":"","sources":["../../../src/rules/Section17_Functions/Rule_17_7_UnusedReturnValue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,IAAI,
|
|
1
|
+
{"version":3,"file":"Rule_17_7_UnusedReturnValue.js","sourceRoot":"","sources":["../../../src/rules/Section17_Functions/Rule_17_7_UnusedReturnValue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,IAAI,EAAQ,QAAQ,EAAa,MAAM,qCAAqC,CAAC;AACnG,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,eAAe,MAAM,gDAAgD,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAElG;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,2BAA4B,SAAQ,SAAS;IAC9D;;OAEG;IACM,YAAY,GAAG,YAAY,CAAC,uBAAuB,CAAC;IAE7D;;OAEG;IACH,IAAa,IAAI;QACb,OAAO,MAAM,CAAC;IAClB,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,GAAc,EAAE,YAAqB,KAAK;QAC5C,IAAI,CAAC,CAAC,GAAG,YAAY,IAAI,CAAC;YAAE,OAAO,KAAK,CAAC;QAEzC,IAAI,GAAG,CAAC,UAAU,YAAY,WAAW,IAAI,GAAG,CAAC,UAAU,CAAC,MAAM;YAAE,OAAO,KAAK,CAAC;QAEjF,IAAI,GAAG,CAAC,MAAM,YAAY,QAAQ,IAAI,SAAS,EAAE,CAAC;YAC9C,IAAI,CAAC,aAAa,CAAC,GAAG,EAAC,mBAAmB,GAAG,CAAC,SAAS,mEAAmE,CAAC,CAAC;QAChI,CAAC;QACD,OAAO,GAAG,CAAC,MAAM,YAAY,QAAQ,CAAC;IAC1C,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,GAAc;QAChB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC;YAChB,OAAO,IAAI,yBAAyB,CAAC,uBAAuB,CAAC,QAAQ,CAAC,CAAC;QAE3E,MAAM,MAAM,GAAG,GAAW,CAAC;QAC3B,MAAM,MAAM,GAAI,eAAe,CAAC,UAAU,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC;QACjF,MAAM,KAAK,GAAG,GAAG,CAAC,WAAW,CAAC,MAAM,CAAS,CAAC;QAC9C,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QAC/B,OAAO,IAAI,yBAAyB,CAAC,uBAAuB,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;IACrF,CAAC;CACJ"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { Call, Joinpoint, FileJp } from "@specs-feup/clava/api/Joinpoints.js";
|
|
2
|
+
import { AnalysisType, MISRATransformationReport } from "../../MISRA.js";
|
|
3
|
+
import UserConfigurableRule from "../UserConfigurableRule.js";
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* Abstract base class for MISRA-C rules that prohibit the use of function of a standard library.
|
|
7
|
+
*
|
|
8
|
+
* Need to implement/define:
|
|
9
|
+
* - analysisType
|
|
10
|
+
* - standardLibrary
|
|
11
|
+
* - invalidFunctions
|
|
12
|
+
* - name()
|
|
13
|
+
*/
|
|
14
|
+
export default abstract class DisallowedStdLibFunctionRule extends UserConfigurableRule {
|
|
15
|
+
/**
|
|
16
|
+
* A positive integer starting from 1 that indicates the rule's priority, determining the order in which rules are applied.
|
|
17
|
+
*/
|
|
18
|
+
readonly priority = 1;
|
|
19
|
+
/**
|
|
20
|
+
* A map that keeps track of invalid usages found in each file.
|
|
21
|
+
*/
|
|
22
|
+
protected invalidFiles: Map<FileJp, Call[]>;
|
|
23
|
+
/**
|
|
24
|
+
* The name of the standard library
|
|
25
|
+
*/
|
|
26
|
+
protected abstract standardLibrary: string;
|
|
27
|
+
/**
|
|
28
|
+
* Names of functions from {@link standardLibrary} that are forbidden.
|
|
29
|
+
* If the set is empty, all functions from {@link standardLibrary} are forbidden.
|
|
30
|
+
*/
|
|
31
|
+
protected abstract invalidFunctions: Set<string>;
|
|
32
|
+
/**
|
|
33
|
+
* Calls that could not be resolved and their respective error message, stored to prevent repeated attempts of correction after rebuild.
|
|
34
|
+
*/
|
|
35
|
+
protected unresolvedCalls: Map<string, string>;
|
|
36
|
+
/**
|
|
37
|
+
* Files where headers were kept because other library features are still used.
|
|
38
|
+
*/
|
|
39
|
+
protected filesWithRetainedHeaders: Set<string>;
|
|
40
|
+
/**
|
|
41
|
+
* Specifies the scope of analysis: single unit or entire system.
|
|
42
|
+
*/
|
|
43
|
+
abstract readonly analysisType: AnalysisType;
|
|
44
|
+
/**
|
|
45
|
+
* @returns Rule identifier according to MISRA-C:2012
|
|
46
|
+
*/
|
|
47
|
+
abstract get name(): string;
|
|
48
|
+
/**
|
|
49
|
+
* Checks if all functions of the library are forbidden
|
|
50
|
+
*/
|
|
51
|
+
private isLibraryFullyDisallowed;
|
|
52
|
+
/**
|
|
53
|
+
* Logs a MISRA error when the entire library is disallowed and
|
|
54
|
+
* records the file to track headers that must be retained.
|
|
55
|
+
*
|
|
56
|
+
* @param fileJp - The file in which the disallowed include was found.
|
|
57
|
+
*/
|
|
58
|
+
private logDisallowedInclude;
|
|
59
|
+
/**
|
|
60
|
+
* Logs a MISRA error for a disallowed function call and records
|
|
61
|
+
* the call along with its error message to avoid repeated attempts
|
|
62
|
+
*
|
|
63
|
+
* @param callJp - The disallowed function call
|
|
64
|
+
* @param msg - Description of the violation
|
|
65
|
+
*/
|
|
66
|
+
private logDisallowedCall;
|
|
67
|
+
/**
|
|
68
|
+
* Returns the prefix to be used for error messages related to the given joinpoint
|
|
69
|
+
*
|
|
70
|
+
* @param $jp - Joinpoint where the violation was detected
|
|
71
|
+
* @returns Returns a prefix to prepend to error messages if no configuration is specified or if the configuration does not contain a fix for this violation
|
|
72
|
+
*/
|
|
73
|
+
protected getErrorMsgPrefix(callJp: Call): string;
|
|
74
|
+
/**
|
|
75
|
+
* Retrieves a fix for the given joinpoint using the provided configuration file
|
|
76
|
+
* @param $jp - Joinpoint where the violation was detected
|
|
77
|
+
* @return The fix retrieved from the configuration for the violation, or `undefined` if no applicable fix is found.
|
|
78
|
+
*/
|
|
79
|
+
protected getFixFromConfig(callJp: Call): Map<string, string> | undefined;
|
|
80
|
+
/**
|
|
81
|
+
*
|
|
82
|
+
* @param $jp - Joinpoint to analyze
|
|
83
|
+
* @param logErrors - [logErrors=false] - Whether to log errors if a violation is detected
|
|
84
|
+
* @returns Returns true if the joinpoint violates the rule, false otherwise
|
|
85
|
+
*/
|
|
86
|
+
match($jp: Joinpoint, logErrors?: boolean): boolean;
|
|
87
|
+
/**
|
|
88
|
+
*
|
|
89
|
+
* @param $jp - Joinpoint to transform
|
|
90
|
+
* @returns Report detailing the transformation result
|
|
91
|
+
*/
|
|
92
|
+
apply($jp: Joinpoint): MISRATransformationReport;
|
|
93
|
+
private solveDisallowedFunctions;
|
|
94
|
+
private solveDisallowedFunctionCall;
|
|
95
|
+
private getExternFunctionDeclIds;
|
|
96
|
+
/**
|
|
97
|
+
* Removes the standard library include if it is fully disallowed and all invalid calls were fixed.
|
|
98
|
+
* If the file is invalid after include removal because other library features are still being used (e.g.: typedefs), the include is re-added.
|
|
99
|
+
*
|
|
100
|
+
* @param fileJp The file to modify
|
|
101
|
+
* @param fixedAllCalls Flag to indicate whether all calls were fixed
|
|
102
|
+
*/
|
|
103
|
+
private removeInclude;
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=DisallowedStdLibFunctionRule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DisallowedStdLibFunctionRule.d.ts","sourceRoot":"","sources":["../../../src/rules/Section21-StandardLibraries/DisallowedStdLibFunctionRule.ts"],"names":[],"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D;;;;OAIG;IACH,KAAK,CAAC,GAAG,EAAE,SAAS,GAAG,yBAAyB;IAkBhD,OAAO,CAAC,wBAAwB;IAoBhC,OAAO,CAAC,2BAA2B;IA0DnC,OAAO,CAAC,wBAAwB;IAQhC;;;;;;OAMG;IACH,OAAO,CAAC,aAAa;CAoBxB"}
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import { Program, Include } from "@specs-feup/clava/api/Joinpoints.js";
|
|
2
|
+
import { MISRATransformationReport, MISRATransformationType } from "../../MISRA.js";
|
|
3
|
+
import Query from "@specs-feup/lara/api/weaver/Query.js";
|
|
4
|
+
import { addExternFunctionDecl, findFilesReferencingHeader, getCallsToLibrary, getExternFunctionDecls, isValidFile } from "../../utils/FileUtils.js";
|
|
5
|
+
import { findFunctionDef } from "../../utils/FunctionUtils.js";
|
|
6
|
+
import UserConfigurableRule from "../UserConfigurableRule.js";
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* Abstract base class for MISRA-C rules that prohibit the use of function of a standard library.
|
|
10
|
+
*
|
|
11
|
+
* Need to implement/define:
|
|
12
|
+
* - analysisType
|
|
13
|
+
* - standardLibrary
|
|
14
|
+
* - invalidFunctions
|
|
15
|
+
* - name()
|
|
16
|
+
*/
|
|
17
|
+
export default class DisallowedStdLibFunctionRule extends UserConfigurableRule {
|
|
18
|
+
/**
|
|
19
|
+
* A positive integer starting from 1 that indicates the rule's priority, determining the order in which rules are applied.
|
|
20
|
+
*/
|
|
21
|
+
priority = 1;
|
|
22
|
+
/**
|
|
23
|
+
* A map that keeps track of invalid usages found in each file.
|
|
24
|
+
*/
|
|
25
|
+
invalidFiles = new Map();
|
|
26
|
+
/**
|
|
27
|
+
* Calls that could not be resolved and their respective error message, stored to prevent repeated attempts of correction after rebuild.
|
|
28
|
+
*/
|
|
29
|
+
unresolvedCalls = new Map();
|
|
30
|
+
/**
|
|
31
|
+
* Files where headers were kept because other library features are still used.
|
|
32
|
+
*/
|
|
33
|
+
filesWithRetainedHeaders = new Set();
|
|
34
|
+
/**
|
|
35
|
+
* Checks if all functions of the library are forbidden
|
|
36
|
+
*/
|
|
37
|
+
isLibraryFullyDisallowed() {
|
|
38
|
+
return this.invalidFunctions.size === 0;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Logs a MISRA error when the entire library is disallowed and
|
|
42
|
+
* records the file to track headers that must be retained.
|
|
43
|
+
*
|
|
44
|
+
* @param fileJp - The file in which the disallowed include was found.
|
|
45
|
+
*/
|
|
46
|
+
logDisallowedInclude(fileJp) {
|
|
47
|
+
if (!this.isLibraryFullyDisallowed()) { // Only specific functions are forbidden
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
const includeJp = Query.searchFrom(fileJp, Include, { name: this.standardLibrary }).get()[0];
|
|
51
|
+
this.logMISRAError(includeJp, `The system header file <${includeJp.name}> shall not be used.`);
|
|
52
|
+
this.context.addRuleResult(this.ruleID, includeJp, MISRATransformationType.NoChange);
|
|
53
|
+
if (!this.filesWithRetainedHeaders.has(fileJp.name)) {
|
|
54
|
+
this.filesWithRetainedHeaders.add(fileJp.name);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Logs a MISRA error for a disallowed function call and records
|
|
59
|
+
* the call along with its error message to avoid repeated attempts
|
|
60
|
+
*
|
|
61
|
+
* @param callJp - The disallowed function call
|
|
62
|
+
* @param msg - Description of the violation
|
|
63
|
+
*/
|
|
64
|
+
logDisallowedCall(callJp, msg) {
|
|
65
|
+
this.logMISRAError(callJp, msg);
|
|
66
|
+
this.context.addRuleResult(this.ruleID, callJp, MISRATransformationType.NoChange);
|
|
67
|
+
if (!this.unresolvedCalls.has(callJp.name)) {
|
|
68
|
+
this.unresolvedCalls.set(callJp.name, msg);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Returns the prefix to be used for error messages related to the given joinpoint
|
|
73
|
+
*
|
|
74
|
+
* @param $jp - Joinpoint where the violation was detected
|
|
75
|
+
* @returns Returns a prefix to prepend to error messages if no configuration is specified or if the configuration does not contain a fix for this violation
|
|
76
|
+
*/
|
|
77
|
+
getErrorMsgPrefix(callJp) {
|
|
78
|
+
return `Function '${callJp.name}' of <${this.standardLibrary}> shall not be used.`;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Retrieves a fix for the given joinpoint using the provided configuration file
|
|
82
|
+
* @param $jp - Joinpoint where the violation was detected
|
|
83
|
+
* @return The fix retrieved from the configuration for the violation, or `undefined` if no applicable fix is found.
|
|
84
|
+
*/
|
|
85
|
+
getFixFromConfig(callJp) {
|
|
86
|
+
const errorMsgPrefix = this.getErrorMsgPrefix(callJp);
|
|
87
|
+
if (!this.context.config) {
|
|
88
|
+
this.logDisallowedCall(callJp, `${errorMsgPrefix} Extern not added due to missing config file.`);
|
|
89
|
+
return undefined;
|
|
90
|
+
}
|
|
91
|
+
let configFix = this.context.config.get("disallowedFunctions");
|
|
92
|
+
if (!configFix) {
|
|
93
|
+
this.logDisallowedCall(callJp, `${errorMsgPrefix} Extern was not added as \'disallowedFunctions\' is not defined in the configuration file.`);
|
|
94
|
+
return undefined;
|
|
95
|
+
}
|
|
96
|
+
if (!configFix[this.standardLibrary]) {
|
|
97
|
+
this.logDisallowedCall(callJp, `${errorMsgPrefix} Couldn't add extern due to missing configuration for standard library <${this.standardLibrary}>.`);
|
|
98
|
+
return undefined;
|
|
99
|
+
}
|
|
100
|
+
if (!configFix[this.standardLibrary][callJp.name]) {
|
|
101
|
+
this.logDisallowedCall(callJp, `${errorMsgPrefix} Couldn't add extern due to missing configuration for function \'${callJp.name}\' of standard library <${this.standardLibrary}>.`);
|
|
102
|
+
return undefined;
|
|
103
|
+
}
|
|
104
|
+
const location = configFix[this.standardLibrary][callJp.name]["location"];
|
|
105
|
+
const replacement_func = configFix[this.standardLibrary][callJp.name]["replacement"];
|
|
106
|
+
if (location === undefined || replacement_func === undefined) {
|
|
107
|
+
this.logDisallowedCall(callJp, `${errorMsgPrefix} Couldn't add extern due to incomplete configuration for function \'${callJp.name}\' of standard library <${this.standardLibrary}>.`);
|
|
108
|
+
return undefined;
|
|
109
|
+
}
|
|
110
|
+
return new Map([
|
|
111
|
+
["function", replacement_func],
|
|
112
|
+
["location", location]
|
|
113
|
+
]);
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
*
|
|
117
|
+
* @param $jp - Joinpoint to analyze
|
|
118
|
+
* @param logErrors - [logErrors=false] - Whether to log errors if a violation is detected
|
|
119
|
+
* @returns Returns true if the joinpoint violates the rule, false otherwise
|
|
120
|
+
*/
|
|
121
|
+
match($jp, logErrors = false) {
|
|
122
|
+
if (!($jp instanceof Program && this.appliesToCurrentStandard()))
|
|
123
|
+
return false;
|
|
124
|
+
this.invalidFiles = new Map();
|
|
125
|
+
const referencingFiles = findFilesReferencingHeader(this.standardLibrary);
|
|
126
|
+
let nonCompliant = false;
|
|
127
|
+
for (const fileJp of referencingFiles) {
|
|
128
|
+
const invalidCalls = getCallsToLibrary(fileJp, this.standardLibrary, this.invalidFunctions);
|
|
129
|
+
if (invalidCalls.length > 0 || this.isLibraryFullyDisallowed()) {
|
|
130
|
+
this.invalidFiles.set(fileJp, invalidCalls);
|
|
131
|
+
nonCompliant = true;
|
|
132
|
+
}
|
|
133
|
+
if (logErrors) {
|
|
134
|
+
invalidCalls.forEach(callJp => this.logMISRAError(callJp, this.getErrorMsgPrefix(callJp)));
|
|
135
|
+
this.logDisallowedInclude(fileJp);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
return nonCompliant;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
*
|
|
142
|
+
* @param $jp - Joinpoint to transform
|
|
143
|
+
* @returns Report detailing the transformation result
|
|
144
|
+
*/
|
|
145
|
+
apply($jp) {
|
|
146
|
+
if (!this.match($jp))
|
|
147
|
+
return new MISRATransformationReport(MISRATransformationType.NoChange);
|
|
148
|
+
let changedDescendant = false;
|
|
149
|
+
for (const [fileJp, invalidCalls] of this.invalidFiles) {
|
|
150
|
+
if (this.solveDisallowedFunctions(fileJp, invalidCalls)) {
|
|
151
|
+
changedDescendant = true;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
// Rebuild AST if any file changed
|
|
155
|
+
if (changedDescendant) {
|
|
156
|
+
this.rebuildProgram();
|
|
157
|
+
return new MISRATransformationReport(MISRATransformationType.Replacement, Query.root());
|
|
158
|
+
}
|
|
159
|
+
return new MISRATransformationReport(MISRATransformationType.NoChange);
|
|
160
|
+
}
|
|
161
|
+
solveDisallowedFunctions(fileJp, invalidCalls) {
|
|
162
|
+
let externFunctions = this.getExternFunctionDeclIds(fileJp);
|
|
163
|
+
let changedFile = false;
|
|
164
|
+
let solvedCallsCount = 0;
|
|
165
|
+
let solvedCalls = new Map();
|
|
166
|
+
for (const callJp of invalidCalls) {
|
|
167
|
+
if (this.solveDisallowedFunctionCall(callJp, fileJp, externFunctions, solvedCalls)) {
|
|
168
|
+
changedFile = true;
|
|
169
|
+
solvedCallsCount++;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
// Try to remove the include
|
|
173
|
+
const fixedAllCalls = solvedCallsCount === invalidCalls.length;
|
|
174
|
+
this.removeInclude(fileJp, fixedAllCalls);
|
|
175
|
+
return changedFile;
|
|
176
|
+
}
|
|
177
|
+
solveDisallowedFunctionCall(callJp, fileJp, externFunctions, solvedCalls) {
|
|
178
|
+
if (solvedCalls.has(callJp.name)) {
|
|
179
|
+
callJp.setName(solvedCalls.get(callJp.name));
|
|
180
|
+
return true;
|
|
181
|
+
}
|
|
182
|
+
// Skip call if previous AST visit marked it as unfixable
|
|
183
|
+
if (this.context.getRuleResult(this.ruleID, callJp) === MISRATransformationType.NoChange) {
|
|
184
|
+
return false;
|
|
185
|
+
}
|
|
186
|
+
// Skip call if previous visits, before rebuild, marked it as unfixable
|
|
187
|
+
if (this.unresolvedCalls.has(callJp.name)) {
|
|
188
|
+
this.logDisallowedCall(callJp, this.unresolvedCalls.get(callJp.name));
|
|
189
|
+
}
|
|
190
|
+
const errorMsgPrefix = this.getErrorMsgPrefix(callJp);
|
|
191
|
+
const configFix = this.getFixFromConfig(callJp);
|
|
192
|
+
// Skip if config file was not specified or provides an invalid fix
|
|
193
|
+
if (!configFix) {
|
|
194
|
+
return false;
|
|
195
|
+
}
|
|
196
|
+
const [location, replacement_func] = [configFix.get("location"), configFix.get("function")];
|
|
197
|
+
const functionDef = findFunctionDef(replacement_func, location);
|
|
198
|
+
// Skip if specified function doesn't exist
|
|
199
|
+
if (!functionDef) {
|
|
200
|
+
this.logDisallowedCall(callJp, `${errorMsgPrefix} Provided file \'${location}\' does not have function definition.`);
|
|
201
|
+
return false;
|
|
202
|
+
}
|
|
203
|
+
// Skip if specified function doesn't have external linkage
|
|
204
|
+
let externDecl;
|
|
205
|
+
if (!externFunctions.has(functionDef.astId)) {
|
|
206
|
+
externDecl = addExternFunctionDecl(fileJp, functionDef);
|
|
207
|
+
if (externDecl === undefined) {
|
|
208
|
+
this.logDisallowedCall(callJp, `${errorMsgPrefix} Provided definition at \'${location}\' does not have external linkage.`);
|
|
209
|
+
return false;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
const previousCallName = callJp.name;
|
|
213
|
+
callJp.setName(functionDef.name);
|
|
214
|
+
if (isValidFile(fileJp)) {
|
|
215
|
+
externFunctions.add(functionDef.astId);
|
|
216
|
+
solvedCalls.set(previousCallName, functionDef.name);
|
|
217
|
+
return true;
|
|
218
|
+
}
|
|
219
|
+
else { // If file does not compile, remove added external declaration and mark call as unfixable
|
|
220
|
+
externDecl?.detach();
|
|
221
|
+
callJp.setName(previousCallName);
|
|
222
|
+
this.logDisallowedCall(callJp, `${errorMsgPrefix} Provided definition at \'${location}\' does not fix the violation.`);
|
|
223
|
+
return false;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
getExternFunctionDeclIds(fileJp) {
|
|
227
|
+
return new Set(getExternFunctionDecls(fileJp)
|
|
228
|
+
.filter((funcJp) => funcJp.definitionJp !== undefined)
|
|
229
|
+
.map((funcJp) => funcJp.definitionJp.astId));
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Removes the standard library include if it is fully disallowed and all invalid calls were fixed.
|
|
233
|
+
* If the file is invalid after include removal because other library features are still being used (e.g.: typedefs), the include is re-added.
|
|
234
|
+
*
|
|
235
|
+
* @param fileJp The file to modify
|
|
236
|
+
* @param fixedAllCalls Flag to indicate whether all calls were fixed
|
|
237
|
+
*/
|
|
238
|
+
removeInclude(fileJp, fixedAllCalls) {
|
|
239
|
+
if (!this.isLibraryFullyDisallowed())
|
|
240
|
+
return;
|
|
241
|
+
const includeJp = Query.searchFrom(fileJp, Include, { name: this.standardLibrary }).get()[0];
|
|
242
|
+
const ruleResult = this.context.getRuleResult(this.ruleID, includeJp);
|
|
243
|
+
if (ruleResult !== undefined)
|
|
244
|
+
return;
|
|
245
|
+
if (this.filesWithRetainedHeaders.has(fileJp.name) || !fixedAllCalls) { // Keep include and log MISRA error
|
|
246
|
+
this.logDisallowedInclude(fileJp);
|
|
247
|
+
}
|
|
248
|
+
else {
|
|
249
|
+
includeJp.detach();
|
|
250
|
+
// Re-add include and log error if any other library features are still referenced
|
|
251
|
+
if (!isValidFile(fileJp)) {
|
|
252
|
+
fileJp.addInclude(this.standardLibrary, true);
|
|
253
|
+
this.logDisallowedInclude(fileJp);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
//# sourceMappingURL=DisallowedStdLibFunctionRule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DisallowedStdLibFunctionRule.js","sourceRoot":"","sources":["../../../src/rules/Section21-StandardLibraries/DisallowedStdLibFunctionRule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,OAAO,EAAU,OAAO,EAAE,MAAM,qCAAqC,CAAC;AAChG,OAAO,EAAgB,yBAAyB,EAAE,uBAAuB,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AAO,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;QAEtE,IAAI,UAAU,KAAK,SAAS;YAAE,OAAO;QAErC,IAAI,IAAI,CAAC,wBAAwB,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC,oCAAoC;YACxG,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC;QACtC,CAAC;aAAM,CAAC;YACJ,SAAS,CAAC,MAAM,EAAE,CAAC;YAEnB,kFAAkF;YAClF,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,CAAC;gBACvB,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC;gBAC9C,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC;YACtC,CAAC;QACL,CAAC;IACL,CAAC;CACJ"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { AnalysisType } from "../../MISRA.js";
|
|
2
|
+
import DisallowedStdLibFunctionRule from "./DisallowedStdLibFunctionRule.js";
|
|
3
|
+
/**
|
|
4
|
+
* MISRA-C Rule 21.10: The Standard Library time and date functions shall not be used
|
|
5
|
+
*/
|
|
6
|
+
export default class Rule_21_10_NoTimeDateFunctions extends DisallowedStdLibFunctionRule {
|
|
7
|
+
/**
|
|
8
|
+
* The name of the standard library
|
|
9
|
+
*/
|
|
10
|
+
protected standardLibrary: string;
|
|
11
|
+
/**
|
|
12
|
+
* Names of functions from {@link standardLibrary} that are forbidden.
|
|
13
|
+
* If the set is empty, all functions from {@link standardLibrary} are forbidden.
|
|
14
|
+
*/
|
|
15
|
+
protected invalidFunctions: Set<string>;
|
|
16
|
+
/**
|
|
17
|
+
* Scope of analysis
|
|
18
|
+
*/
|
|
19
|
+
readonly analysisType = AnalysisType.SINGLE_TRANSLATION_UNIT;
|
|
20
|
+
/**
|
|
21
|
+
* @returns Rule identifier according to MISRA-C:2012
|
|
22
|
+
*/
|
|
23
|
+
get name(): string;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=Rule_21_10_NoTimeDateFunctions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Rule_21_10_NoTimeDateFunctions.d.ts","sourceRoot":"","sources":["../../../src/rules/Section21-StandardLibraries/Rule_21_10_NoTimeDateFunctions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,4BAA4B,MAAM,mCAAmC,CAAC;AAE7E;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,8BAA+B,SAAQ,4BAA4B;IACpF;;OAEG;IACH,SAAS,CAAC,eAAe,SAAY;IAErC;;;OAGG;IACH,SAAS,CAAC,gBAAgB,cAAqB;IAE/C;;OAEG;IACH,QAAQ,CAAC,YAAY,wCAAwC;IAE7D;;OAEG;IACH,IAAa,IAAI,IAAI,MAAM,CAE1B;CACJ"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { AnalysisType } from "../../MISRA.js";
|
|
2
|
+
import DisallowedStdLibFunctionRule from "./DisallowedStdLibFunctionRule.js";
|
|
3
|
+
/**
|
|
4
|
+
* MISRA-C Rule 21.10: The Standard Library time and date functions shall not be used
|
|
5
|
+
*/
|
|
6
|
+
export default class Rule_21_10_NoTimeDateFunctions extends DisallowedStdLibFunctionRule {
|
|
7
|
+
/**
|
|
8
|
+
* The name of the standard library
|
|
9
|
+
*/
|
|
10
|
+
standardLibrary = "time.h";
|
|
11
|
+
/**
|
|
12
|
+
* Names of functions from {@link standardLibrary} that are forbidden.
|
|
13
|
+
* If the set is empty, all functions from {@link standardLibrary} are forbidden.
|
|
14
|
+
*/
|
|
15
|
+
invalidFunctions = new Set();
|
|
16
|
+
/**
|
|
17
|
+
* Scope of analysis
|
|
18
|
+
*/
|
|
19
|
+
analysisType = AnalysisType.SINGLE_TRANSLATION_UNIT;
|
|
20
|
+
/**
|
|
21
|
+
* @returns Rule identifier according to MISRA-C:2012
|
|
22
|
+
*/
|
|
23
|
+
get name() {
|
|
24
|
+
return "21.10";
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=Rule_21_10_NoTimeDateFunctions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Rule_21_10_NoTimeDateFunctions.js","sourceRoot":"","sources":["../../../src/rules/Section21-StandardLibraries/Rule_21_10_NoTimeDateFunctions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,4BAA4B,MAAM,mCAAmC,CAAC;AAE7E;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,8BAA+B,SAAQ,4BAA4B;IACpF;;OAEG;IACO,eAAe,GAAG,QAAQ,CAAC;IAErC;;;OAGG;IACO,gBAAgB,GAAG,IAAI,GAAG,EAAU,CAAC;IAE/C;;OAEG;IACM,YAAY,GAAG,YAAY,CAAC,uBAAuB,CAAC;IAE7D;;OAEG;IACH,IAAa,IAAI;QACb,OAAO,OAAO,CAAC;IACnB,CAAC;CACJ"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { AnalysisType } from "../../MISRA.js";
|
|
2
|
+
import DisallowedStdLibFunctionRule from "./DisallowedStdLibFunctionRule.js";
|
|
3
|
+
/**
|
|
4
|
+
* MISRA-C Rule 21.11: The standard header file <tgmath.h> shall not be used
|
|
5
|
+
*/
|
|
6
|
+
export default class Rule_21_11_NoTgmathFunctions extends DisallowedStdLibFunctionRule {
|
|
7
|
+
/**
|
|
8
|
+
* The name of the standard library
|
|
9
|
+
*/
|
|
10
|
+
protected standardLibrary: string;
|
|
11
|
+
/**
|
|
12
|
+
* Names of functions from {@link standardLibrary} that are forbidden.
|
|
13
|
+
* If the set is empty, all functions from {@link standardLibrary} are forbidden.
|
|
14
|
+
*/
|
|
15
|
+
protected invalidFunctions: Set<string>;
|
|
16
|
+
/**
|
|
17
|
+
* Standards to which this rule applies to
|
|
18
|
+
*/
|
|
19
|
+
protected readonly appliesTo: Set<string>;
|
|
20
|
+
/**
|
|
21
|
+
* Scope of analysis
|
|
22
|
+
*/
|
|
23
|
+
readonly analysisType = AnalysisType.SINGLE_TRANSLATION_UNIT;
|
|
24
|
+
/**
|
|
25
|
+
* @returns Rule identifier according to MISRA-C:2012
|
|
26
|
+
*/
|
|
27
|
+
get name(): string;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=Rule_21_11_NoTgmathFunctions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Rule_21_11_NoTgmathFunctions.d.ts","sourceRoot":"","sources":["../../../src/rules/Section21-StandardLibraries/Rule_21_11_NoTgmathFunctions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,4BAA4B,MAAM,mCAAmC,CAAC;AAE7E;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,4BAA6B,SAAQ,4BAA4B;IAClF;;OAEG;IACH,SAAS,CAAC,eAAe,SAAc;IAEvC;;;OAGG;IACH,SAAS,CAAC,gBAAgB,cAAqB;IAE/C;;OAEG;IACH,mBAA4B,SAAS,cAA2B;IAEhE;;OAEG;IACH,QAAQ,CAAC,YAAY,wCAAwC;IAE7D;;OAEG;IACH,IAAa,IAAI,IAAI,MAAM,CAE1B;CACJ"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { AnalysisType } from "../../MISRA.js";
|
|
2
|
+
import DisallowedStdLibFunctionRule from "./DisallowedStdLibFunctionRule.js";
|
|
3
|
+
/**
|
|
4
|
+
* MISRA-C Rule 21.11: The standard header file <tgmath.h> shall not be used
|
|
5
|
+
*/
|
|
6
|
+
export default class Rule_21_11_NoTgmathFunctions extends DisallowedStdLibFunctionRule {
|
|
7
|
+
/**
|
|
8
|
+
* The name of the standard library
|
|
9
|
+
*/
|
|
10
|
+
standardLibrary = "tgmath.h";
|
|
11
|
+
/**
|
|
12
|
+
* Names of functions from {@link standardLibrary} that are forbidden.
|
|
13
|
+
* If the set is empty, all functions from {@link standardLibrary} are forbidden.
|
|
14
|
+
*/
|
|
15
|
+
invalidFunctions = new Set();
|
|
16
|
+
/**
|
|
17
|
+
* Standards to which this rule applies to
|
|
18
|
+
*/
|
|
19
|
+
appliesTo = new Set(["c99", "c11"]);
|
|
20
|
+
/**
|
|
21
|
+
* Scope of analysis
|
|
22
|
+
*/
|
|
23
|
+
analysisType = AnalysisType.SINGLE_TRANSLATION_UNIT;
|
|
24
|
+
/**
|
|
25
|
+
* @returns Rule identifier according to MISRA-C:2012
|
|
26
|
+
*/
|
|
27
|
+
get name() {
|
|
28
|
+
return "21.11";
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=Rule_21_11_NoTgmathFunctions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Rule_21_11_NoTgmathFunctions.js","sourceRoot":"","sources":["../../../src/rules/Section21-StandardLibraries/Rule_21_11_NoTgmathFunctions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,4BAA4B,MAAM,mCAAmC,CAAC;AAE7E;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,4BAA6B,SAAQ,4BAA4B;IAClF;;OAEG;IACO,eAAe,GAAG,UAAU,CAAC;IAEvC;;;OAGG;IACO,gBAAgB,GAAG,IAAI,GAAG,EAAU,CAAC;IAE/C;;OAEG;IACyB,SAAS,GAAG,IAAI,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;IAEhE;;OAEG;IACM,YAAY,GAAG,YAAY,CAAC,uBAAuB,CAAC;IAE7D;;OAEG;IACH,IAAa,IAAI;QACb,OAAO,OAAO,CAAC;IACnB,CAAC;CACJ"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { AnalysisType } from "../../MISRA.js";
|
|
2
|
+
import DisallowedStdLibFunctionRule from "./DisallowedStdLibFunctionRule.js";
|
|
3
|
+
/**
|
|
4
|
+
* MISRA-C Rule 21.3: The memory allocation and deallocation functions of <stdlib.h> shall not be used
|
|
5
|
+
*/
|
|
6
|
+
export default class Rule_21_3_NoDynamicMemory extends DisallowedStdLibFunctionRule {
|
|
7
|
+
/**
|
|
8
|
+
* The name of the standard library
|
|
9
|
+
*/
|
|
10
|
+
protected standardLibrary: string;
|
|
11
|
+
/**
|
|
12
|
+
* Names of functions from {@link standardLibrary} that are forbidden.
|
|
13
|
+
* If the set is empty, all functions from {@link standardLibrary} are forbidden.
|
|
14
|
+
*/
|
|
15
|
+
protected invalidFunctions: Set<string>;
|
|
16
|
+
/**
|
|
17
|
+
* Scope of analysis
|
|
18
|
+
*/
|
|
19
|
+
readonly analysisType = AnalysisType.SINGLE_TRANSLATION_UNIT;
|
|
20
|
+
/**
|
|
21
|
+
* @returns Rule identifier according to MISRA-C:2012
|
|
22
|
+
*/
|
|
23
|
+
get name(): string;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=Rule_21_3_NoDynamicMemory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Rule_21_3_NoDynamicMemory.d.ts","sourceRoot":"","sources":["../../../src/rules/Section21-StandardLibraries/Rule_21_3_NoDynamicMemory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,4BAA4B,MAAM,mCAAmC,CAAC;AAE7E;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,yBAA0B,SAAQ,4BAA4B;IAC/E;;OAEG;IACH,SAAS,CAAC,eAAe,SAAc;IAEvC;;;OAGG;IACH,SAAS,CAAC,gBAAgB,cAAqE;IAE/F;;OAEG;IACH,QAAQ,CAAC,YAAY,wCAAwC;IAE7D;;OAEG;IACH,IAAa,IAAI,IAAI,MAAM,CAE1B;CACJ"}
|