Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Implement Types Package#237

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
jeongsoolee09 merged 61 commits intomainfromjeongsoolee09/Types
Mar 29, 2023
Merged

Implement Types Package#237

jeongsoolee09 merged 61 commits intomainfromjeongsoolee09/Types
Mar 29, 2023

Conversation

@jeongsoolee09
Copy link
Collaborator

@jeongsoolee09jeongsoolee09 commentedMar 3, 2023
edited
Loading

Description

Implement the Types Package.

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-12-5
    • RULE-7-4
    • INT34-C
    • INT36-C
    • DIR-4-6
  • Queries have been modified for the following rules:

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 ofshared 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 thestyle 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 thestyle 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!)

@github-actions
Copy link

🤖 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

🤖 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

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

RULE                 : INT34-CCOMPILE_ERROR_OUTPUT : SUITE                : CERT-CQUERY                : ExprShiftedbyNegativeOrGreaterPrecisionOperandTEST_DIFFERENCE      : TEST_PASS            : TruePACKAGE              : TypesCOMPILE_PASS         : TrueRULE                 : INT36-CCOMPILE_ERROR_OUTPUT : SUITE                : CERT-CQUERY                : ConvertingAPointerToIntegerOrIntegerToPointerTEST_DIFFERENCE      : TEST_PASS            : TruePACKAGE              : TypesCOMPILE_PASS         : TrueRULE                 : DIR-4-6COMPILE_ERROR_OUTPUT : SUITE                : MISRA-C-2012QUERY                : PlainNumericalTypeUsedOverExplicitTypedefTEST_DIFFERENCE      : --- expected                       +++ actual                       @@ -1,1 +1,1 @@                       -No expected results have yet been specified                       +| test.c:27:5:27:26 | _astronomical_number_t | The type _astronomical_number_t is not a fixed-width numeric type nor an alias to one. |                       [1/1 comp 29.2s eval 1.1s] FAILED(RESULT) /__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql-coding-standards/c/misra/test/rules/DIR-4-6/PlainNumericalTypeUsedOverExplicitTypedef.qlref                       TEST_PASS            : FalsePACKAGE              : TypesCOMPILE_PASS         : TrueRULE                 : RULE-12-5COMPILE_ERROR_OUTPUT : SUITE                : MISRA-C-2012QUERY                : SizeofOperatorUsedOnArrayTypeParamTEST_DIFFERENCE      : TEST_PASS            : TruePACKAGE              : TypesCOMPILE_PASS         : TrueRULE                 : RULE-7-4COMPILE_ERROR_OUTPUT : SUITE                : MISRA-C-2012QUERY                : StringLiteralAssignedToNonConstCharTEST_DIFFERENCE      : TEST_PASS            : TruePACKAGE              : TypesCOMPILE_PASS         : True

@jsinglet
Copy link
Contributor

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

COMPILE_PASS         : TrueQUERY                : VariableWidthIntegerTypesUsedTEST_DIFFERENCE      : TEST_PASS            : TruePACKAGE              : DeclarationsSUITE                : AUTOSARRULE                 : A3-9-1COMPILE_ERROR_OUTPUT :

@jsinglet
Copy link
Contributor

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

RULE                 : A3-9-1QUERY                : VariableWidthIntegerTypesUsedSUITE                : AUTOSARTEST_PASS            : TrueCOMPILE_ERROR_OUTPUT : COMPILE_PASS         : TrueTEST_DIFFERENCE      : PACKAGE              : Declarations

@jsinglet
Copy link
Contributor

🤖 Beep Boop!qcc/cpp/AARCH64LE Matrix Testing for this PR has been completed. See below for the results!

TEST_DIFFERENCE      : COMPILE_PASS         : TrueTEST_PASS            : TrueRULE                 : A3-9-1QUERY                : VariableWidthIntegerTypesUsedCOMPILE_ERROR_OUTPUT : SUITE                : AUTOSARPACKAGE              : Declarations

@jsinglet
Copy link
Contributor

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

QUERY                : ExprShiftedbyNegativeOrGreaterPrecisionOperandTEST_PASS            : TrueTEST_DIFFERENCE      : RULE                 : INT34-CCOMPILE_ERROR_OUTPUT : PACKAGE              : Types1SUITE                : CERT-CCOMPILE_PASS         : TrueQUERY                : ConvertingAPointerToIntegerOrIntegerToPointerTEST_PASS            : TrueTEST_DIFFERENCE      : RULE                 : INT36-CCOMPILE_ERROR_OUTPUT : PACKAGE              : Types1SUITE                : CERT-CCOMPILE_PASS         : TrueQUERY                : PlainNumericalTypeUsedOverExplicitTypedefTEST_PASS            : TrueTEST_DIFFERENCE      : RULE                 : DIR-4-6COMPILE_ERROR_OUTPUT : PACKAGE              : Types1SUITE                : MISRA-C-2012COMPILE_PASS         : TrueQUERY                : SizeofOperatorUsedOnArrayTypeParamTEST_PASS            : TrueTEST_DIFFERENCE      : RULE                 : RULE-12-5COMPILE_ERROR_OUTPUT : PACKAGE              : Types1SUITE                : MISRA-C-2012COMPILE_PASS         : TrueQUERY                : StringLiteralAssignedToNonConstCharTEST_PASS            : TrueTEST_DIFFERENCE      : RULE                 : RULE-7-4COMPILE_ERROR_OUTPUT : PACKAGE              : Types1SUITE                : MISRA-C-2012COMPILE_PASS         : True

@jsinglet
Copy link
Contributor

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

COMPILE_ERROR_OUTPUT : TEST_PASS            : TrueCOMPILE_PASS         : TrueRULE                 : INT34-CSUITE                : CERT-CTEST_DIFFERENCE      : QUERY                : ExprShiftedbyNegativeOrGreaterPrecisionOperandPACKAGE              : Types1COMPILE_ERROR_OUTPUT : TEST_PASS            : TrueCOMPILE_PASS         : TrueRULE                 : INT36-CSUITE                : CERT-CTEST_DIFFERENCE      : QUERY                : ConvertingAPointerToIntegerOrIntegerToPointerPACKAGE              : Types1COMPILE_ERROR_OUTPUT : TEST_PASS            : TrueCOMPILE_PASS         : TrueRULE                 : DIR-4-6SUITE                : MISRA-C-2012TEST_DIFFERENCE      : QUERY                : PlainNumericalTypeUsedOverExplicitTypedefPACKAGE              : Types1COMPILE_ERROR_OUTPUT : TEST_PASS            : TrueCOMPILE_PASS         : TrueRULE                 : RULE-12-5SUITE                : MISRA-C-2012TEST_DIFFERENCE      : QUERY                : SizeofOperatorUsedOnArrayTypeParamPACKAGE              : Types1COMPILE_ERROR_OUTPUT : TEST_PASS            : TrueCOMPILE_PASS         : TrueRULE                 : RULE-7-4SUITE                : MISRA-C-2012TEST_DIFFERENCE      : QUERY                : StringLiteralAssignedToNonConstCharPACKAGE              : Types1

@jsinglet
Copy link
Contributor

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

TEST_PASS            : TruePACKAGE              : Types1QUERY                : ExprShiftedbyNegativeOrGreaterPrecisionOperandCOMPILE_ERROR_OUTPUT : SUITE                : CERT-CRULE                 : INT34-CTEST_DIFFERENCE      : COMPILE_PASS         : TrueTEST_PASS            : TruePACKAGE              : Types1QUERY                : ConvertingAPointerToIntegerOrIntegerToPointerCOMPILE_ERROR_OUTPUT : SUITE                : CERT-CRULE                 : INT36-CTEST_DIFFERENCE      : COMPILE_PASS         : TrueTEST_PASS            : TruePACKAGE              : Types1QUERY                : PlainNumericalTypeUsedOverExplicitTypedefCOMPILE_ERROR_OUTPUT : SUITE                : MISRA-C-2012RULE                 : DIR-4-6TEST_DIFFERENCE      : COMPILE_PASS         : TrueTEST_PASS            : TruePACKAGE              : Types1QUERY                : SizeofOperatorUsedOnArrayTypeParamCOMPILE_ERROR_OUTPUT : SUITE                : MISRA-C-2012RULE                 : RULE-12-5TEST_DIFFERENCE      : COMPILE_PASS         : TrueTEST_PASS            : TruePACKAGE              : Types1QUERY                : StringLiteralAssignedToNonConstCharCOMPILE_ERROR_OUTPUT : SUITE                : MISRA-C-2012RULE                 : RULE-7-4TEST_DIFFERENCE      : COMPILE_PASS         : True

@jsinglet
Copy link
Contributor

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

@jsinglet
Copy link
Contributor

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

TEST_PASS            : TrueCOMPILE_ERROR_OUTPUT : RULE                 : INT34-CTEST_DIFFERENCE      : QUERY                : ExprShiftedbyNegativeOrGreaterPrecisionOperandSUITE                : CERT-CCOMPILE_PASS         : TruePACKAGE              : Types1TEST_PASS            : TrueCOMPILE_ERROR_OUTPUT : RULE                 : INT36-CTEST_DIFFERENCE      : QUERY                : ConvertingAPointerToIntegerOrIntegerToPointerSUITE                : CERT-CCOMPILE_PASS         : TruePACKAGE              : Types1TEST_PASS            : TrueCOMPILE_ERROR_OUTPUT : RULE                 : DIR-4-6TEST_DIFFERENCE      : QUERY                : PlainNumericalTypeUsedOverExplicitTypedefSUITE                : MISRA-C-2012COMPILE_PASS         : TruePACKAGE              : Types1TEST_PASS            : TrueCOMPILE_ERROR_OUTPUT : RULE                 : RULE-12-5TEST_DIFFERENCE      : QUERY                : SizeofOperatorUsedOnArrayTypeParamSUITE                : MISRA-C-2012COMPILE_PASS         : TruePACKAGE              : Types1TEST_PASS            : TrueCOMPILE_ERROR_OUTPUT : RULE                 : RULE-7-4TEST_DIFFERENCE      : QUERY                : StringLiteralAssignedToNonConstCharSUITE                : MISRA-C-2012COMPILE_PASS         : TruePACKAGE              : Types1

@jsinglet
Copy link
Contributor

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

@lcartey
Copy link
Contributor

/test-performance

@github-actions
Copy link

🏁 Beep Boop! Performance testing for this PR has been initiated. Please check back later for results. Note that the query package generation step must complete before testing will start so it might be a minute.

💡 If you do not hear back from me please check my status!I will report even if I fail!

jeongsoolee09and others added7 commitsMarch 28, 2023 11:40
If the expression is explicitly converted to a larger type, the shifthappens on the larger type.
 * Include uncertainty in the alert message (e.g. "may") * Report upper bound if relevant.
Recursively identify typedefs that are to the built in  numeric types,but do not use the size alias.
@lcarteylcartey dismissedrvermeulen’sstale reviewMarch 29, 2023 10:34

Comments addressed.

@jeongsoolee09jeongsoolee09 added this pull request to themerge queueMar 29, 2023
Merged via the queue intomain with commit6628857Mar 29, 2023
@jeongsoolee09jeongsoolee09 deleted the jeongsoolee09/Types branchMarch 29, 2023 12:20
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@rvermeulenrvermeulenrvermeulen left review comments

+1 more reviewer

@lcarteylcarteylcartey approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

@jeongsoolee09jeongsoolee09

Labels

None yet

Projects

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@jeongsoolee09@jsinglet@lcartey@rvermeulen

[8]ページ先頭

©2009-2025 Movatter.jp