Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement EssentialTypes #188

Merged
merged 30 commits into from Mar 9, 2023
Merged

Implement EssentialTypes #188

merged 30 commits into from Mar 9, 2023

Conversation

lcartey
Copy link
Collaborator

@lcartey lcartey commented Feb 13, 2023

Description

This PR adds support for the new EssentialTypes package.

MISRA C 2012 defines its own a type system on top of C that is more restrictive - in order to identify, in particular, implicit conversions which are surprising or undesirable.

  • A MisraExpressions.qll library, which provides some utility definitions from both MISRA and the C Standard to help implement the rules. This includes CodeQL classes and predicates representing:
    • A variety of models of booleans in C, covering both stdbool.h and common hand crafted definitions.
    • Composite operators - as specified by MISRA (essentially + - * / % + -).
    • Composite expressions - any use of a composite operator that is not constant.
    • Operators with the usual arithmetic conversions on operands (as specified by the C Standard 6.3.1.8).
  • A EssentialTypes.qll library, which provides the following key interfaces:
    • EssentialTypeCategory - each essential type is part of an essential type category, which we represent here with a newtype.
    • getEssentialType(Expr e) - gets the essential type of an expression, if any. Essential types are focused on arithmetic and related types - integrals, floats, booleans and enums.
    • getEssentialTypeCategory(Type essentialType) - given an essential type, provides the type category.
    • isAssignmentToEssentialType - use to identify "assignments" to a particular essential type. Note: "assignment" is very broadly defined by Appendix J of MISRA C 2012, and includes function calls, initializers etc.

These utilities are used to implement each of the rules. The implementation of the rules is comparatively straight forward given the library, as mostly it's verifying equality or difference of type categories or essential types.

Change request type

  • Release or process automation (GitHub workflows, internal scripts)
  • Internal documentation
  • External documentation
  • Query files (.ql, .qll, .qls or unit tests)
  • External scripts (analysis report or other code shipped as part of a release)

Rules with added or modified queries

  • No rules added
  • Queries have been added for the following rules:
    • Rule 10.1
    • Rule 10.2
    • Rule 10.3
    • Rule 10.4
    • Rule 10.5
    • Rule 10.6
    • Rule 10.7
    • Rule 10.8
    • Rule 14.1
    • Rule 21.14
    • Rule 21.16
  • Queries have been modified for the following rules:
    • rule number here

Release change checklist

A change note (development_handbook.md#change-notes) is required for any pull request which modifies:

  • The structure or layout of the release artifacts.
  • The evaluation performance (memory, execution time) of an existing query.
  • The results of an existing query in any circumstance.

If you are only adding new rule queries, a change note is not required.

Author: Is a change note required?

  • Yes
  • No

🚨🚨🚨
Reviewer: Confirm that format of shared queries (not the .qll file, the
.ql file that imports it) is valid by running them within VS Code.

  • Confirmed

Reviewer: Confirm that either a change note is not required or the change note is required and has been added.

  • Confirmed

Query development review checklist

For PRs that add new queries or modify existing queries, the following checklist should be completed by both the author and reviewer:

Author

  • Have all the relevant rule package description files been checked in?
  • Have you verified that the metadata properties of each new query is set appropriately?
  • Do all the unit tests contain both "COMPLIANT" and "NON_COMPLIANT" cases?
  • Are the alert messages properly formatted and consistent with the style guide?
  • Have you run the queries on OpenPilot and verified that the performance and results are acceptable?
    As a rule of thumb, predicates specific to the query should take no more than 1 minute, and for simple queries be under 10 seconds. If this is not the case, this should be highlighted and agreed in the code review process.
  • Does the query have an appropriate level of in-query comments/documentation?
  • Have you considered/identified possible edge cases?
  • Does the query not reinvent features in the standard library?
  • Can the query be simplified further (not golfed!)

Reviewer

  • Have all the relevant rule package description files been checked in?
  • Have you verified that the metadata properties of each new query is set appropriately?
  • Do all the unit tests contain both "COMPLIANT" and "NON_COMPLIANT" cases?
  • Are the alert messages properly formatted and consistent with the style guide?
  • Have you run the queries on OpenPilot and verified that the performance and results are acceptable?
    As a rule of thumb, predicates specific to the query should take no more than 1 minute, and for simple queries be under 10 seconds. If this is not the case, this should be highlighted and agreed in the code review process.
  • Does the query have an appropriate level of in-query comments/documentation?
  • Have you considered/identified possible edge cases?
  • Does the query not reinvent features in the standard library?
  • Can the query be simplified further (not golfed!)

Update the rules.csv to identify a new package dealing with the
"essential" types identified by MISRA C 2012.
The essential types rules refer to a number of shared MISRA definitions
which have been represented in this utility module.
This module calculates and reports the essential type of each given
expression in the program, as defined in the MISRA C:2012 standard.

The essential type for an expression is calculated based on the AST
type of the expression. Where it differs from the standard type,
the calculation is overridden to implement the MISRA definition.

Various utility methods related to essential types are included.
Adds queries to identify operators where the operands are of an
inappropriate essential type, according to the MISRA specified rules.
Adds a query that detects inappropriate addition or subtraction
operations on operands of essentially character type.
Adds a query that finds "assignments", as defined by MISRA C 2012, to
incompatible essential types.
Adds a query that finds operands to operators with the usual arithmetic
conversions that are incompatible.
Adds a query that identifies explicit casts to an inappropriate
essential type, according to the conditions set by MISRA C 2012.
Adds a query which identifies "assignments" (as defined by MISRA C 2012)
from composite expressions to objects of a wider essential type.
Adds a query which identifies implicit conversions of composite
expressions that cause it to be casted to a wider essential type.
Adds a query to check for inappropriate casts of composite expressions
to wider essential types.
When computing EssentialTypeCategories, ensure we resolve any typedefs
first.
Adds a query that finds loop counters which are essentially floating
type.
Ensure when calculating the essential type category, we strip the type
specifiers, otherwise we will not match the correct type category.
Adds a query to find uses of memcmp with pointer types which are
prohibited by MISRA C.
@lcartey
Copy link
Collaborator Author

lcartey commented Feb 14, 2023

Updated with final two rules, improved metadata and addressing some bugs related to typedefs and specifiers. Moving out of draft.

@lcartey lcartey marked this pull request as ready for review February 14, 2023 14:12
This query looks for use of memcmp, but previously it would not have
worked if the user was using C++ and specified std::memcmp.

Although this rule is targeted at C, it is one that a user might enable
for C++ and expect to work.
Adds a query to detect the use of memcmp to compare null-terminated
strings, using global data flow from hard-coded string literals or
array literals.
@lcartey
Copy link
Collaborator Author

lcartey commented Feb 15, 2023

Updated to add Rule 21.14, which also refers to essential types.

Copy link
Contributor

@jsinglet jsinglet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't find anything to pick on here -- great work Luke! I think you just have a failing unit test to take care of.

@jsinglet
Copy link
Contributor

jsinglet commented Mar 8, 2023

🤖 Beep Boop! Matrix Testing for this PR has been completed. If no reports were posted it means this PR does not contain things that need matrix testing!

The computation of essential type category was incorrect when the type
was a typedef of a boolean.
@github-actions
Copy link

github-actions bot commented Mar 8, 2023

🤖 Beep Boop! Matrix Testing for this PR has been initiated. Please check back later for results.

💡 If you do not hear back from me please check my status! I will report even if this PR does not contain files eligible for matrix testing.

Compiler testing showed that the switch cases were not valid as they
required a statement. Added breaks to satisfy this condition.
@github-actions
Copy link

github-actions bot commented Mar 8, 2023

🤖 Beep Boop! Matrix Testing for this PR has been initiated. Please check back later for results.

💡 If you do not hear back from me please check my status! I will report even if this PR does not contain files eligible for matrix testing.

@jsinglet
Copy link
Contributor

jsinglet commented Mar 8, 2023

🤖 Beep Boop! clang/cpp/x86_64 Matrix Testing for this PR has been completed but I didn't find anything to test!

@jsinglet
Copy link
Contributor

jsinglet commented Mar 8, 2023

🤖 Beep Boop! gcc/cpp/x86_64 Matrix Testing for this PR has been completed but I didn't find anything to test!

@jsinglet
Copy link
Contributor

jsinglet commented Mar 8, 2023

🤖 Beep Boop! clang/c/x86_64 Matrix Testing for this PR has been completed. See below for the results!


QUERY                : PointerTypeOnLogicalOperator
PACKAGE              : EssentialTypes
COMPILE_PASS         : True
COMPILE_ERROR_OUTPUT : 
TEST_DIFFERENCE      : 
SUITE                : MISRA-C-2012
RULE                 : RULE-10-1
TEST_PASS            : True

QUERY                : OperandsOfAnInappropriateEssentialType
PACKAGE              : EssentialTypes
COMPILE_PASS         : True
COMPILE_ERROR_OUTPUT : 
TEST_DIFFERENCE      : 
SUITE                : MISRA-C-2012
RULE                 : RULE-10-1
TEST_PASS            : True

QUERY                : AdditionSubtractionOnEssentiallyCharType
PACKAGE              : EssentialTypes
COMPILE_PASS         : True
COMPILE_ERROR_OUTPUT : 
TEST_DIFFERENCE      : 
SUITE                : MISRA-C-2012
RULE                 : RULE-10-2
TEST_PASS            : True

QUERY                : AssignmentOfIncompatibleEssentialType
PACKAGE              : EssentialTypes
COMPILE_PASS         : False
COMPILE_ERROR_OUTPUT : [2023-03-08 23:30:55] [build-stderr] /__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql-coding-standards/c/misra/test/rules/RULE-10-3/test.c:119:7: warning: implicit conversion from 'long' to 'unsigned int' changes value from 4294967296 to 0 [-Wconstant-conversion]
                       [2023-03-08 23:30:55] [build-stderr]   u = 4294967296; // NON_COMPLIANT - cannot be stored in an int, so exception
                       [2023-03-08 23:30:55] [build-stderr]     ~ ^~~~~~~~~~
                       [2023-03-08 23:30:55] [build-stderr] /__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql-coding-standards/c/misra/test/rules/RULE-10-3/test.c:129:3: warning: switch condition has boolean value [-Wswitch-bool]
                       [2023-03-08 23:30:55] [build-stderr]   switch (b) {
                       [2023-03-08 23:30:55] [build-stderr]   ^       ~
                       [2023-03-08 23:30:55] [build-stderr] /__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql-coding-standards/c/misra/test/rules/RULE-10-3/test.c:133:28: error: label at end of compound statement: expected statement
                       [2023-03-08 23:30:55] [build-stderr]   case ((unsigned int)200): // NON_COMPLIANT
                       [2023-03-08 23:30:55] [build-stderr]                            ^
                       [2023-03-08 23:30:55] [build-stderr]                             ;
                       [2023-03-08 23:30:55] [build-stderr] /__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql-coding-standards/c/misra/test/rules/RULE-10-3/test.c:133:8: warning: overflow converting case value to switch condition type (200 to 0) [-Wswitch]
                       [2023-03-08 23:30:55] [build-stderr]   case ((unsigned int)200): // NON_COMPLIANT
                       [2023-03-08 23:30:55] [build-stderr]        ^
                       [2023-03-08 23:30:55] [build-stderr] /__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql-coding-standards/c/misra/test/rules/RULE-10-3/test.c:132:8: warning: overflow converting case value to switch condition type (100 to 0) [-Wswitch]
                       [2023-03-08 23:30:55] [build-stderr]   case 100:                 // NON_COMPLIANT
                       [2023-03-08 23:30:55] [build-stderr]        ^
                       [2023-03-08 23:30:55] [build-stderr] /__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql-coding-standards/c/misra/test/rules/RULE-10-3/test.c:141:28: error: label at end of compound statement: expected statement
                       [2023-03-08 23:30:55] [build-stderr]   case ((unsigned int)200): // NON_COMPLIANT
                       [2023-03-08 23:30:55] [build-stderr]                            ^
                       [2023-03-08 23:30:55] [build-stderr]                             ;
                       [2023-03-08 23:30:55] [build-stderr] /__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql-coding-standards/c/misra/test/rules/RULE-10-3/test.c:140:8: warning: case value not in enumerated type 'enum E1' [-Wswitch]
                       [2023-03-08 23:30:55] [build-stderr]   case 100:                 // NON_COMPLIANT
                       [2023-03-08 23:30:55] [build-stderr]        ^
                       [2023-03-08 23:30:55] [build-stderr] /__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql-coding-standards/c/misra/test/rules/RULE-10-3/test.c:141:8: warning: case value not in enumerated type 'enum E1' [-Wswitch]
                       [2023-03-08 23:30:55] [build-stderr]   case ((unsigned int)200): // NON_COMPLIANT
                       [2023-03-08 23:30:55] [build-stderr]        ^
                       [2023-03-08 23:30:55] [build-stderr] /__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql-coding-standards/c/misra/test/rules/RULE-10-3/test.c:137:11: warning: enumeration value 'C' not handled in switch [-Wswitch]
                       [2023-03-08 23:30:55] [build-stderr]   switch (e1) {
                       [2023-03-08 23:30:55] [build-stderr]           ^
                       [2023-03-08 23:30:55] [build-stderr] /__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql-coding-standards/c/misra/test/rules/RULE-10-3/test.c:149:28: error: label at end of compound statement: expected statement
                       [2023-03-08 23:30:55] [build-stderr]   case ((unsigned int)200): // NON_COMPLIANT
                       [2023-03-08 23:30:55] [build-stderr]                            ^
                       [2023-03-08 23:30:55] [build-stderr]                             ;
                       [2023-03-08 23:30:55] [build-stderr] /__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql-coding-standards/c/misra/test/rules/RULE-10-3/test.c:157:28: error: label at end of compound statement: expected statement
                       [2023-03-08 23:30:55] [build-stderr]   case ((unsigned int)200): // COMPLIANT - by exception 1
                       [2023-03-08 23:30:55] [build-stderr]                            ^
                       [2023-03-08 23:30:55] [build-stderr]                             ;
                       [2023-03-08 23:30:55] [build-stderr] 7 warnings and 4 errors generated.
                       [2023-03-08 23:30:55] [ERROR] Spawned process exited abnormally (code 1; tried to run: [/__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql/tools/linux64/preload_tracer, clang, -fsyntax-only, -std=c11, /__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql-coding-standards/c/misra/test/rules/RULE-10-3/test.c])
                       
TEST_DIFFERENCE      : 
SUITE                : MISRA-C-2012
RULE                 : RULE-10-3
TEST_PASS            : False

QUERY                : OperandsWithMismatchedEssentialTypeCategory
PACKAGE              : EssentialTypes
COMPILE_PASS         : True
COMPILE_ERROR_OUTPUT : 
TEST_DIFFERENCE      : 
SUITE                : MISRA-C-2012
RULE                 : RULE-10-4
TEST_PASS            : True

QUERY                : InappropriateEssentialTypeCast
PACKAGE              : EssentialTypes
COMPILE_PASS         : True
COMPILE_ERROR_OUTPUT : 
TEST_DIFFERENCE      : 
SUITE                : MISRA-C-2012
RULE                 : RULE-10-5
TEST_PASS            : True

QUERY                : AssignmentToWiderEssentialType
PACKAGE              : EssentialTypes
COMPILE_PASS         : True
COMPILE_ERROR_OUTPUT : 
TEST_DIFFERENCE      : 
SUITE                : MISRA-C-2012
RULE                 : RULE-10-6
TEST_PASS            : True

QUERY                : ImplicitConversionOfCompositeExpression
PACKAGE              : EssentialTypes
COMPILE_PASS         : True
COMPILE_ERROR_OUTPUT : 
TEST_DIFFERENCE      : 
SUITE                : MISRA-C-2012
RULE                 : RULE-10-7
TEST_PASS            : True

QUERY                : InappropriateCastOfCompositeExpression
PACKAGE              : EssentialTypes
COMPILE_PASS         : True
COMPILE_ERROR_OUTPUT : 
TEST_DIFFERENCE      : 
SUITE                : MISRA-C-2012
RULE                 : RULE-10-8
TEST_PASS            : True

QUERY                : LoopOverEssentiallyFloatType
PACKAGE              : EssentialTypes
COMPILE_PASS         : True
COMPILE_ERROR_OUTPUT : 
TEST_DIFFERENCE      : 
SUITE                : MISRA-C-2012
RULE                 : RULE-14-1
TEST_PASS            : True

QUERY                : MemcmpUsedToCompareNullTerminatedStrings
PACKAGE              : EssentialTypes
COMPILE_PASS         : True
COMPILE_ERROR_OUTPUT : 
TEST_DIFFERENCE      : 
SUITE                : MISRA-C-2012
RULE                 : RULE-21-14
TEST_PASS            : True

QUERY                : DefineAndUndefUsedOnReservedIdentifierOrMacroName
PACKAGE              : Preprocessor4
COMPILE_PASS         : False
COMPILE_ERROR_OUTPUT : [2023-03-08 23:34:17] [build-stderr] /__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql-coding-standards/c/misra/test/rules/RULE-21-1/test.c:4:9: error: 'defined' cannot be used as a macro name
                       [2023-03-08 23:34:17] [build-stderr] #define defined // NON_COMPLIANT
                       [2023-03-08 23:34:17] [build-stderr]         ^
                       [2023-03-08 23:34:17] [build-stderr] 1 error generated.
                       [2023-03-08 23:34:17] [ERROR] Spawned process exited abnormally (code 1; tried to run: [/__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql/tools/linux64/preload_tracer, clang, -fsyntax-only, -std=c11, /__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql-coding-standards/c/misra/test/rules/RULE-21-1/test.c])
                       
TEST_DIFFERENCE      : 
SUITE                : MISRA-C-2012
RULE                 : RULE-21-1
TEST_PASS            : False

QUERY                : MemcmpOnInappropriateEssentialTypeArgs
PACKAGE              : EssentialTypes
COMPILE_PASS         : True
COMPILE_ERROR_OUTPUT : 
TEST_DIFFERENCE      : 
SUITE                : MISRA-C-2012
RULE                 : RULE-21-16
TEST_PASS            : True


@jsinglet
Copy link
Contributor

jsinglet commented Mar 8, 2023

🤖 Beep Boop! gcc/cpp/x86_64 Matrix Testing for this PR has been completed but I didn't find anything to test!

@jsinglet
Copy link
Contributor

jsinglet commented Mar 8, 2023

🤖 Beep Boop! clang/cpp/x86_64 Matrix Testing for this PR has been completed but I didn't find anything to test!

@jsinglet
Copy link
Contributor

jsinglet commented Mar 8, 2023

🤖 Beep Boop! gcc/c/x86_64 Matrix Testing for this PR has been completed. See below for the results!


SUITE                : MISRA-C-2012
QUERY                : PointerTypeOnLogicalOperator
TEST_DIFFERENCE      : 
COMPILE_ERROR_OUTPUT : 
PACKAGE              : EssentialTypes
RULE                 : RULE-10-1
TEST_PASS            : True
COMPILE_PASS         : True

SUITE                : MISRA-C-2012
QUERY                : OperandsOfAnInappropriateEssentialType
TEST_DIFFERENCE      : 
COMPILE_ERROR_OUTPUT : 
PACKAGE              : EssentialTypes
RULE                 : RULE-10-1
TEST_PASS            : True
COMPILE_PASS         : True

SUITE                : MISRA-C-2012
QUERY                : AdditionSubtractionOnEssentiallyCharType
TEST_DIFFERENCE      : 
COMPILE_ERROR_OUTPUT : 
PACKAGE              : EssentialTypes
RULE                 : RULE-10-2
TEST_PASS            : True
COMPILE_PASS         : True

SUITE                : MISRA-C-2012
QUERY                : AssignmentOfIncompatibleEssentialType
TEST_DIFFERENCE      : 
COMPILE_ERROR_OUTPUT : [2023-03-08 23:32:38] [build-stderr] /__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql-coding-standards/c/misra/test/rules/RULE-10-3/test.c: In function 'testException1':
                       [2023-03-08 23:32:38] [build-stderr] /__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql-coding-standards/c/misra/test/rules/RULE-10-3/test.c:119:7: warning: unsigned conversion from 'long int' to 'unsigned int' changes value from '4294967296' to '0' [-Woverflow]
                       [2023-03-08 23:32:38] [build-stderr]    u = 4294967296; // NON_COMPLIANT - cannot be stored in an int, so exception
                       [2023-03-08 23:32:38] [build-stderr]        ^~~~~~~~~~
                       [2023-03-08 23:32:38] [build-stderr] /__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql-coding-standards/c/misra/test/rules/RULE-10-3/test.c: In function 'testSwitchCase':
                       [2023-03-08 23:32:38] [build-stderr] /__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql-coding-standards/c/misra/test/rules/RULE-10-3/test.c:132:3: warning: case label value exceeds maximum value for type
                       [2023-03-08 23:32:38] [build-stderr]    case 100:                 // NON_COMPLIANT
                       [2023-03-08 23:32:38] [build-stderr]    ^~~~
                       [2023-03-08 23:32:38] [build-stderr] /__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql-coding-standards/c/misra/test/rules/RULE-10-3/test.c:133:3: warning: case label value exceeds maximum value for type
                       [2023-03-08 23:32:38] [build-stderr]    case ((unsigned int)200): // NON_COMPLIANT
                       [2023-03-08 23:32:38] [build-stderr]    ^~~~
                       [2023-03-08 23:32:38] [build-stderr] /__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql-coding-standards/c/misra/test/rules/RULE-10-3/test.c:133:8: error: label at end of compound statement
                       [2023-03-08 23:32:38] [build-stderr]    case ((unsigned int)200): // NON_COMPLIANT
                       [2023-03-08 23:32:38] [build-stderr]         ^
                       [2023-03-08 23:32:38] [build-stderr] /__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql-coding-standards/c/misra/test/rules/RULE-10-3/test.c:129:3: warning: switch condition has boolean value [-Wswitch-bool]
                       [2023-03-08 23:32:38] [build-stderr]    switch (b) {
                       [2023-03-08 23:32:38] [build-stderr]    ^~~~~~
                       [2023-03-08 23:32:38] [build-stderr] /__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql-coding-standards/c/misra/test/rules/RULE-10-3/test.c:141:8: error: label at end of compound statement
                       [2023-03-08 23:32:38] [build-stderr]    case ((unsigned int)200): // NON_COMPLIANT
                       [2023-03-08 23:32:38] [build-stderr]         ^
                       [2023-03-08 23:32:38] [build-stderr] /__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql-coding-standards/c/misra/test/rules/RULE-10-3/test.c:149:8: error: label at end of compound statement
                       [2023-03-08 23:32:38] [build-stderr]    case ((unsigned int)200): // NON_COMPLIANT
                       [2023-03-08 23:32:38] [build-stderr]         ^
                       [2023-03-08 23:32:38] [build-stderr] /__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql-coding-standards/c/misra/test/rules/RULE-10-3/test.c:157:8: error: label at end of compound statement
                       [2023-03-08 23:32:38] [build-stderr]    case ((unsigned int)200): // COMPLIANT - by exception 1
                       [2023-03-08 23:32:38] [build-stderr]         ^
                       [2023-03-08 23:32:39] [ERROR] Spawned process exited abnormally (code 1; tried to run: [/__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql/tools/linux64/preload_tracer, gcc, -fsyntax-only, -std=c11, /__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql-coding-standards/c/misra/test/rules/RULE-10-3/test.c])
                       
PACKAGE              : EssentialTypes
RULE                 : RULE-10-3
TEST_PASS            : False
COMPILE_PASS         : False

SUITE                : MISRA-C-2012
QUERY                : OperandsWithMismatchedEssentialTypeCategory
TEST_DIFFERENCE      : 
COMPILE_ERROR_OUTPUT : 
PACKAGE              : EssentialTypes
RULE                 : RULE-10-4
TEST_PASS            : True
COMPILE_PASS         : True

SUITE                : MISRA-C-2012
QUERY                : InappropriateEssentialTypeCast
TEST_DIFFERENCE      : 
COMPILE_ERROR_OUTPUT : 
PACKAGE              : EssentialTypes
RULE                 : RULE-10-5
TEST_PASS            : True
COMPILE_PASS         : True

SUITE                : MISRA-C-2012
QUERY                : AssignmentToWiderEssentialType
TEST_DIFFERENCE      : 
COMPILE_ERROR_OUTPUT : 
PACKAGE              : EssentialTypes
RULE                 : RULE-10-6
TEST_PASS            : True
COMPILE_PASS         : True

SUITE                : MISRA-C-2012
QUERY                : ImplicitConversionOfCompositeExpression
TEST_DIFFERENCE      : 
COMPILE_ERROR_OUTPUT : 
PACKAGE              : EssentialTypes
RULE                 : RULE-10-7
TEST_PASS            : True
COMPILE_PASS         : True

SUITE                : MISRA-C-2012
QUERY                : InappropriateCastOfCompositeExpression
TEST_DIFFERENCE      : 
COMPILE_ERROR_OUTPUT : 
PACKAGE              : EssentialTypes
RULE                 : RULE-10-8
TEST_PASS            : True
COMPILE_PASS         : True

SUITE                : MISRA-C-2012
QUERY                : LoopOverEssentiallyFloatType
TEST_DIFFERENCE      : 
COMPILE_ERROR_OUTPUT : 
PACKAGE              : EssentialTypes
RULE                 : RULE-14-1
TEST_PASS            : True
COMPILE_PASS         : True

SUITE                : MISRA-C-2012
QUERY                : MemcmpUsedToCompareNullTerminatedStrings
TEST_DIFFERENCE      : 
COMPILE_ERROR_OUTPUT : 
PACKAGE              : EssentialTypes
RULE                 : RULE-21-14
TEST_PASS            : True
COMPILE_PASS         : True

SUITE                : MISRA-C-2012
QUERY                : DefineAndUndefUsedOnReservedIdentifierOrMacroName
TEST_DIFFERENCE      : 
COMPILE_ERROR_OUTPUT : [2023-03-08 23:36:10] [build-stderr] /__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql-coding-standards/c/misra/test/rules/RULE-21-1/test.c:4:9: error: "defined" cannot be used as a macro name
                       [2023-03-08 23:36:10] [build-stderr]  #define defined // NON_COMPLIANT
                       [2023-03-08 23:36:10] [build-stderr]          ^~~~~~~
                       [2023-03-08 23:36:11] [ERROR] Spawned process exited abnormally (code 1; tried to run: [/__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql/tools/linux64/preload_tracer, gcc, -fsyntax-only, -std=c11, /__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql-coding-standards/c/misra/test/rules/RULE-21-1/test.c])
                       
PACKAGE              : Preprocessor4
RULE                 : RULE-21-1
TEST_PASS            : False
COMPILE_PASS         : False

SUITE                : MISRA-C-2012
QUERY                : MemcmpOnInappropriateEssentialTypeArgs
TEST_DIFFERENCE      : 
COMPILE_ERROR_OUTPUT : 
PACKAGE              : EssentialTypes
RULE                 : RULE-21-16
TEST_PASS            : True
COMPILE_PASS         : True


@jsinglet
Copy link
Contributor

jsinglet commented Mar 8, 2023

🤖 Beep Boop! Matrix Testing for this PR has been completed. If no reports were posted it means this PR does not contain things that need matrix testing!

@jsinglet
Copy link
Contributor

jsinglet commented Mar 8, 2023

🤖 Beep Boop! clang/c/x86_64 Matrix Testing for this PR has been completed. See below for the results!


PACKAGE              : EssentialTypes
TEST_PASS            : True
RULE                 : RULE-10-1
QUERY                : PointerTypeOnLogicalOperator
TEST_DIFFERENCE      : 
SUITE                : MISRA-C-2012
COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True

PACKAGE              : EssentialTypes
TEST_PASS            : True
RULE                 : RULE-10-1
QUERY                : OperandsOfAnInappropriateEssentialType
TEST_DIFFERENCE      : 
SUITE                : MISRA-C-2012
COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True

PACKAGE              : EssentialTypes
TEST_PASS            : True
RULE                 : RULE-10-2
QUERY                : AdditionSubtractionOnEssentiallyCharType
TEST_DIFFERENCE      : 
SUITE                : MISRA-C-2012
COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True

PACKAGE              : EssentialTypes
TEST_PASS            : True
RULE                 : RULE-10-3
QUERY                : AssignmentOfIncompatibleEssentialType
TEST_DIFFERENCE      : 
SUITE                : MISRA-C-2012
COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True

PACKAGE              : EssentialTypes
TEST_PASS            : True
RULE                 : RULE-10-4
QUERY                : OperandsWithMismatchedEssentialTypeCategory
TEST_DIFFERENCE      : 
SUITE                : MISRA-C-2012
COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True

PACKAGE              : EssentialTypes
TEST_PASS            : True
RULE                 : RULE-10-5
QUERY                : InappropriateEssentialTypeCast
TEST_DIFFERENCE      : 
SUITE                : MISRA-C-2012
COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True

PACKAGE              : EssentialTypes
TEST_PASS            : True
RULE                 : RULE-10-6
QUERY                : AssignmentToWiderEssentialType
TEST_DIFFERENCE      : 
SUITE                : MISRA-C-2012
COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True

PACKAGE              : EssentialTypes
TEST_PASS            : True
RULE                 : RULE-10-7
QUERY                : ImplicitConversionOfCompositeExpression
TEST_DIFFERENCE      : 
SUITE                : MISRA-C-2012
COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True

PACKAGE              : EssentialTypes
TEST_PASS            : True
RULE                 : RULE-10-8
QUERY                : InappropriateCastOfCompositeExpression
TEST_DIFFERENCE      : 
SUITE                : MISRA-C-2012
COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True

PACKAGE              : EssentialTypes
TEST_PASS            : True
RULE                 : RULE-14-1
QUERY                : LoopOverEssentiallyFloatType
TEST_DIFFERENCE      : 
SUITE                : MISRA-C-2012
COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True

PACKAGE              : EssentialTypes
TEST_PASS            : True
RULE                 : RULE-21-14
QUERY                : MemcmpUsedToCompareNullTerminatedStrings
TEST_DIFFERENCE      : 
SUITE                : MISRA-C-2012
COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True

PACKAGE              : Preprocessor4
TEST_PASS            : False
RULE                 : RULE-21-1
QUERY                : DefineAndUndefUsedOnReservedIdentifierOrMacroName
TEST_DIFFERENCE      : 
SUITE                : MISRA-C-2012
COMPILE_ERROR_OUTPUT : [2023-03-08 23:38:48] [build-stderr] /__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql-coding-standards/c/misra/test/rules/RULE-21-1/test.c:4:9: error: 'defined' cannot be used as a macro name
                       [2023-03-08 23:38:48] [build-stderr] #define defined // NON_COMPLIANT
                       [2023-03-08 23:38:48] [build-stderr]         ^
                       [2023-03-08 23:38:48] [build-stderr] 1 error generated.
                       [2023-03-08 23:38:48] [ERROR] Spawned process exited abnormally (code 1; tried to run: [/__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql/tools/linux64/preload_tracer, clang, -fsyntax-only, -std=c11, /__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql-coding-standards/c/misra/test/rules/RULE-21-1/test.c])
                       
COMPILE_PASS         : False

PACKAGE              : EssentialTypes
TEST_PASS            : True
RULE                 : RULE-21-16
QUERY                : MemcmpOnInappropriateEssentialTypeArgs
TEST_DIFFERENCE      : 
SUITE                : MISRA-C-2012
COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True


@jsinglet
Copy link
Contributor

jsinglet commented Mar 8, 2023

🤖 Beep Boop! gcc/c/x86_64 Matrix Testing for this PR has been completed. See below for the results!


RULE                 : RULE-10-1
TEST_DIFFERENCE      : 
COMPILE_PASS         : True
COMPILE_ERROR_OUTPUT : 
TEST_PASS            : True
QUERY                : PointerTypeOnLogicalOperator
PACKAGE              : EssentialTypes
SUITE                : MISRA-C-2012

RULE                 : RULE-10-1
TEST_DIFFERENCE      : 
COMPILE_PASS         : True
COMPILE_ERROR_OUTPUT : 
TEST_PASS            : True
QUERY                : OperandsOfAnInappropriateEssentialType
PACKAGE              : EssentialTypes
SUITE                : MISRA-C-2012

RULE                 : RULE-10-2
TEST_DIFFERENCE      : 
COMPILE_PASS         : True
COMPILE_ERROR_OUTPUT : 
TEST_PASS            : True
QUERY                : AdditionSubtractionOnEssentiallyCharType
PACKAGE              : EssentialTypes
SUITE                : MISRA-C-2012

RULE                 : RULE-10-3
TEST_DIFFERENCE      : 
COMPILE_PASS         : True
COMPILE_ERROR_OUTPUT : 
TEST_PASS            : True
QUERY                : AssignmentOfIncompatibleEssentialType
PACKAGE              : EssentialTypes
SUITE                : MISRA-C-2012

RULE                 : RULE-10-4
TEST_DIFFERENCE      : 
COMPILE_PASS         : True
COMPILE_ERROR_OUTPUT : 
TEST_PASS            : True
QUERY                : OperandsWithMismatchedEssentialTypeCategory
PACKAGE              : EssentialTypes
SUITE                : MISRA-C-2012

RULE                 : RULE-10-5
TEST_DIFFERENCE      : 
COMPILE_PASS         : True
COMPILE_ERROR_OUTPUT : 
TEST_PASS            : True
QUERY                : InappropriateEssentialTypeCast
PACKAGE              : EssentialTypes
SUITE                : MISRA-C-2012

RULE                 : RULE-10-6
TEST_DIFFERENCE      : 
COMPILE_PASS         : True
COMPILE_ERROR_OUTPUT : 
TEST_PASS            : True
QUERY                : AssignmentToWiderEssentialType
PACKAGE              : EssentialTypes
SUITE                : MISRA-C-2012

RULE                 : RULE-10-7
TEST_DIFFERENCE      : 
COMPILE_PASS         : True
COMPILE_ERROR_OUTPUT : 
TEST_PASS            : True
QUERY                : ImplicitConversionOfCompositeExpression
PACKAGE              : EssentialTypes
SUITE                : MISRA-C-2012

RULE                 : RULE-10-8
TEST_DIFFERENCE      : 
COMPILE_PASS         : True
COMPILE_ERROR_OUTPUT : 
TEST_PASS            : True
QUERY                : InappropriateCastOfCompositeExpression
PACKAGE              : EssentialTypes
SUITE                : MISRA-C-2012

RULE                 : RULE-14-1
TEST_DIFFERENCE      : 
COMPILE_PASS         : True
COMPILE_ERROR_OUTPUT : 
TEST_PASS            : True
QUERY                : LoopOverEssentiallyFloatType
PACKAGE              : EssentialTypes
SUITE                : MISRA-C-2012

RULE                 : RULE-21-14
TEST_DIFFERENCE      : 
COMPILE_PASS         : True
COMPILE_ERROR_OUTPUT : 
TEST_PASS            : True
QUERY                : MemcmpUsedToCompareNullTerminatedStrings
PACKAGE              : EssentialTypes
SUITE                : MISRA-C-2012

RULE                 : RULE-21-1
TEST_DIFFERENCE      : 
COMPILE_PASS         : False
COMPILE_ERROR_OUTPUT : [2023-03-08 23:38:50] [build-stderr] /__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql-coding-standards/c/misra/test/rules/RULE-21-1/test.c:4:9: error: "defined" cannot be used as a macro name
                       [2023-03-08 23:38:50] [build-stderr]  #define defined // NON_COMPLIANT
                       [2023-03-08 23:38:50] [build-stderr]          ^~~~~~~
                       [2023-03-08 23:38:50] [ERROR] Spawned process exited abnormally (code 1; tried to run: [/__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql/tools/linux64/preload_tracer, gcc, -fsyntax-only, -std=c11, /__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql-coding-standards/c/misra/test/rules/RULE-21-1/test.c])
                       
TEST_PASS            : False
QUERY                : DefineAndUndefUsedOnReservedIdentifierOrMacroName
PACKAGE              : Preprocessor4
SUITE                : MISRA-C-2012

RULE                 : RULE-21-16
TEST_DIFFERENCE      : 
COMPILE_PASS         : True
COMPILE_ERROR_OUTPUT : 
TEST_PASS            : True
QUERY                : MemcmpOnInappropriateEssentialTypeArgs
PACKAGE              : EssentialTypes
SUITE                : MISRA-C-2012


@jsinglet
Copy link
Contributor

jsinglet commented Mar 8, 2023

🤖 Beep Boop! Matrix Testing for this PR has been completed. If no reports were posted it means this PR does not contain things that need matrix testing!

@lcartey lcartey enabled auto-merge March 9, 2023 00:00
@lcartey lcartey disabled auto-merge March 9, 2023 00:00
@github-actions
Copy link

github-actions bot commented Mar 9, 2023

🤖 Beep Boop! Matrix Testing for this PR has been initiated. Please check back later for results.

💡 If you do not hear back from me please check my status! I will report even if this PR does not contain files eligible for matrix testing.

@lcartey lcartey enabled auto-merge March 9, 2023 00:00
@jsinglet
Copy link
Contributor

jsinglet commented Mar 9, 2023

🤖 Beep Boop! clang/cpp/x86_64 Matrix Testing for this PR has been completed but I didn't find anything to test!

@jsinglet
Copy link
Contributor

jsinglet commented Mar 9, 2023

🤖 Beep Boop! gcc/cpp/x86_64 Matrix Testing for this PR has been completed but I didn't find anything to test!

@jsinglet
Copy link
Contributor

jsinglet commented Mar 9, 2023

🤖 Beep Boop! gcc/c/x86_64 Matrix Testing for this PR has been completed. See below for the results!


COMPILE_PASS         : True
QUERY                : PointerTypeOnLogicalOperator
COMPILE_ERROR_OUTPUT : 
SUITE                : MISRA-C-2012
TEST_PASS            : True
TEST_DIFFERENCE      : 
RULE                 : RULE-10-1
PACKAGE              : EssentialTypes

COMPILE_PASS         : True
QUERY                : OperandsOfAnInappropriateEssentialType
COMPILE_ERROR_OUTPUT : 
SUITE                : MISRA-C-2012
TEST_PASS            : True
TEST_DIFFERENCE      : 
RULE                 : RULE-10-1
PACKAGE              : EssentialTypes

COMPILE_PASS         : True
QUERY                : AdditionSubtractionOnEssentiallyCharType
COMPILE_ERROR_OUTPUT : 
SUITE                : MISRA-C-2012
TEST_PASS            : True
TEST_DIFFERENCE      : 
RULE                 : RULE-10-2
PACKAGE              : EssentialTypes

COMPILE_PASS         : True
QUERY                : AssignmentOfIncompatibleEssentialType
COMPILE_ERROR_OUTPUT : 
SUITE                : MISRA-C-2012
TEST_PASS            : True
TEST_DIFFERENCE      : 
RULE                 : RULE-10-3
PACKAGE              : EssentialTypes

COMPILE_PASS         : True
QUERY                : OperandsWithMismatchedEssentialTypeCategory
COMPILE_ERROR_OUTPUT : 
SUITE                : MISRA-C-2012
TEST_PASS            : True
TEST_DIFFERENCE      : 
RULE                 : RULE-10-4
PACKAGE              : EssentialTypes

COMPILE_PASS         : True
QUERY                : InappropriateEssentialTypeCast
COMPILE_ERROR_OUTPUT : 
SUITE                : MISRA-C-2012
TEST_PASS            : True
TEST_DIFFERENCE      : 
RULE                 : RULE-10-5
PACKAGE              : EssentialTypes

COMPILE_PASS         : True
QUERY                : AssignmentToWiderEssentialType
COMPILE_ERROR_OUTPUT : 
SUITE                : MISRA-C-2012
TEST_PASS            : True
TEST_DIFFERENCE      : 
RULE                 : RULE-10-6
PACKAGE              : EssentialTypes

COMPILE_PASS         : True
QUERY                : ImplicitConversionOfCompositeExpression
COMPILE_ERROR_OUTPUT : 
SUITE                : MISRA-C-2012
TEST_PASS            : True
TEST_DIFFERENCE      : 
RULE                 : RULE-10-7
PACKAGE              : EssentialTypes

COMPILE_PASS         : True
QUERY                : InappropriateCastOfCompositeExpression
COMPILE_ERROR_OUTPUT : 
SUITE                : MISRA-C-2012
TEST_PASS            : True
TEST_DIFFERENCE      : 
RULE                 : RULE-10-8
PACKAGE              : EssentialTypes

COMPILE_PASS         : True
QUERY                : LoopOverEssentiallyFloatType
COMPILE_ERROR_OUTPUT : 
SUITE                : MISRA-C-2012
TEST_PASS            : True
TEST_DIFFERENCE      : 
RULE                 : RULE-14-1
PACKAGE              : EssentialTypes

COMPILE_PASS         : True
QUERY                : MemcmpUsedToCompareNullTerminatedStrings
COMPILE_ERROR_OUTPUT : 
SUITE                : MISRA-C-2012
TEST_PASS            : True
TEST_DIFFERENCE      : 
RULE                 : RULE-21-14
PACKAGE              : EssentialTypes

COMPILE_PASS         : False
QUERY                : DefineAndUndefUsedOnReservedIdentifierOrMacroName
COMPILE_ERROR_OUTPUT : [2023-03-09 00:07:31] [build-stderr] /__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql-coding-standards/c/misra/test/rules/RULE-21-1/test.c:4:9: error: "defined" cannot be used as a macro name
                       [2023-03-09 00:07:31] [build-stderr]  #define defined // NON_COMPLIANT
                       [2023-03-09 00:07:31] [build-stderr]          ^~~~~~~
                       [2023-03-09 00:07:31] [ERROR] Spawned process exited abnormally (code 1; tried to run: [/__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql/tools/linux64/preload_tracer, gcc, -fsyntax-only, -std=c11, /__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql-coding-standards/c/misra/test/rules/RULE-21-1/test.c])
                       
SUITE                : MISRA-C-2012
TEST_PASS            : False
TEST_DIFFERENCE      : 
RULE                 : RULE-21-1
PACKAGE              : Preprocessor4

COMPILE_PASS         : True
QUERY                : MemcmpOnInappropriateEssentialTypeArgs
COMPILE_ERROR_OUTPUT : 
SUITE                : MISRA-C-2012
TEST_PASS            : True
TEST_DIFFERENCE      : 
RULE                 : RULE-21-16
PACKAGE              : EssentialTypes


@jsinglet
Copy link
Contributor

jsinglet commented Mar 9, 2023

🤖 Beep Boop! clang/c/x86_64 Matrix Testing for this PR has been completed. See below for the results!


PACKAGE              : EssentialTypes
SUITE                : MISRA-C-2012
COMPILE_PASS         : True
COMPILE_ERROR_OUTPUT : 
TEST_DIFFERENCE      : 
TEST_PASS            : True
RULE                 : RULE-10-1
QUERY                : PointerTypeOnLogicalOperator

PACKAGE              : EssentialTypes
SUITE                : MISRA-C-2012
COMPILE_PASS         : True
COMPILE_ERROR_OUTPUT : 
TEST_DIFFERENCE      : 
TEST_PASS            : True
RULE                 : RULE-10-1
QUERY                : OperandsOfAnInappropriateEssentialType

PACKAGE              : EssentialTypes
SUITE                : MISRA-C-2012
COMPILE_PASS         : True
COMPILE_ERROR_OUTPUT : 
TEST_DIFFERENCE      : 
TEST_PASS            : True
RULE                 : RULE-10-2
QUERY                : AdditionSubtractionOnEssentiallyCharType

PACKAGE              : EssentialTypes
SUITE                : MISRA-C-2012
COMPILE_PASS         : True
COMPILE_ERROR_OUTPUT : 
TEST_DIFFERENCE      : 
TEST_PASS            : True
RULE                 : RULE-10-3
QUERY                : AssignmentOfIncompatibleEssentialType

PACKAGE              : EssentialTypes
SUITE                : MISRA-C-2012
COMPILE_PASS         : True
COMPILE_ERROR_OUTPUT : 
TEST_DIFFERENCE      : 
TEST_PASS            : True
RULE                 : RULE-10-4
QUERY                : OperandsWithMismatchedEssentialTypeCategory

PACKAGE              : EssentialTypes
SUITE                : MISRA-C-2012
COMPILE_PASS         : True
COMPILE_ERROR_OUTPUT : 
TEST_DIFFERENCE      : 
TEST_PASS            : True
RULE                 : RULE-10-5
QUERY                : InappropriateEssentialTypeCast

PACKAGE              : EssentialTypes
SUITE                : MISRA-C-2012
COMPILE_PASS         : True
COMPILE_ERROR_OUTPUT : 
TEST_DIFFERENCE      : 
TEST_PASS            : True
RULE                 : RULE-10-6
QUERY                : AssignmentToWiderEssentialType

PACKAGE              : EssentialTypes
SUITE                : MISRA-C-2012
COMPILE_PASS         : True
COMPILE_ERROR_OUTPUT : 
TEST_DIFFERENCE      : 
TEST_PASS            : True
RULE                 : RULE-10-7
QUERY                : ImplicitConversionOfCompositeExpression

PACKAGE              : EssentialTypes
SUITE                : MISRA-C-2012
COMPILE_PASS         : True
COMPILE_ERROR_OUTPUT : 
TEST_DIFFERENCE      : 
TEST_PASS            : True
RULE                 : RULE-10-8
QUERY                : InappropriateCastOfCompositeExpression

PACKAGE              : EssentialTypes
SUITE                : MISRA-C-2012
COMPILE_PASS         : True
COMPILE_ERROR_OUTPUT : 
TEST_DIFFERENCE      : 
TEST_PASS            : True
RULE                 : RULE-14-1
QUERY                : LoopOverEssentiallyFloatType

PACKAGE              : EssentialTypes
SUITE                : MISRA-C-2012
COMPILE_PASS         : True
COMPILE_ERROR_OUTPUT : 
TEST_DIFFERENCE      : 
TEST_PASS            : True
RULE                 : RULE-21-14
QUERY                : MemcmpUsedToCompareNullTerminatedStrings

PACKAGE              : Preprocessor4
SUITE                : MISRA-C-2012
COMPILE_PASS         : False
COMPILE_ERROR_OUTPUT : [2023-03-09 00:07:56] [build-stderr] /__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql-coding-standards/c/misra/test/rules/RULE-21-1/test.c:4:9: error: 'defined' cannot be used as a macro name
                       [2023-03-09 00:07:56] [build-stderr] #define defined // NON_COMPLIANT
                       [2023-03-09 00:07:56] [build-stderr]         ^
                       [2023-03-09 00:07:56] [build-stderr] 1 error generated.
                       [2023-03-09 00:07:56] [ERROR] Spawned process exited abnormally (code 1; tried to run: [/__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql/tools/linux64/preload_tracer, clang, -fsyntax-only, -std=c11, /__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql-coding-standards/c/misra/test/rules/RULE-21-1/test.c])
                       
TEST_DIFFERENCE      : 
TEST_PASS            : False
RULE                 : RULE-21-1
QUERY                : DefineAndUndefUsedOnReservedIdentifierOrMacroName

PACKAGE              : EssentialTypes
SUITE                : MISRA-C-2012
COMPILE_PASS         : True
COMPILE_ERROR_OUTPUT : 
TEST_DIFFERENCE      : 
TEST_PASS            : True
RULE                 : RULE-21-16
QUERY                : MemcmpOnInappropriateEssentialTypeArgs


@jsinglet
Copy link
Contributor

jsinglet commented Mar 9, 2023

🤖 Beep Boop! Matrix Testing for this PR has been completed. If no reports were posted it means this PR does not contain things that need matrix testing!

@lcartey lcartey added this pull request to the merge queue Mar 9, 2023
Merged via the queue into main with commit 07a3b16 Mar 9, 2023
@lcartey lcartey deleted the lcartey/essential-types branch March 9, 2023 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants