Skip to content

Implement MISRA23 Import rules #591

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

Merged
merged 16 commits into from
Jul 23, 2024
Merged

Implement MISRA23 Import rules #591

merged 16 commits into from
Jul 23, 2024

Conversation

mbaluda
Copy link
Contributor

@mbaluda mbaluda commented May 16, 2024

Description

Implements Import rules for MISRA23.
Includes 21 rules that are imports of an already existing shared query.

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:
    Import rules:
    • DIR-5-7-2
    • RULE-6-2-1
    • RULE-6-4-1
    • RULE-6-8-1
    • RULE-8-2-3
    • RULE-9-4-1
    • RULE-9-6-3
    • RULE-9-6-4
    • RULE-9-6-5
    • RULE-11-3-2
    • RULE-18-3-3
    • RULE-19-0-3
    • RULE-19-1-3
    • RULE-19-2-3
    • RULE-19-3-1
    • RULE-19-3-5
    • RULE-21-6-5
    • RULE-25-5-2
    • RULE-25-5-3
    • RULE-28-6-3
    • RULE-30-0-2
  • 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!)

@mbaluda mbaluda changed the title Mbaluda/import misra23 Implement MISRA23 Import rules May 16, 2024
@mbaluda mbaluda marked this pull request as ready for review June 19, 2024 22:46
@mbaluda mbaluda changed the base branch from main to initial-misra-cpp-2023-support June 19, 2024 22:49
@mbaluda mbaluda requested a review from lcartey June 19, 2024 22:55
Base automatically changed from initial-misra-cpp-2023-support to main July 23, 2024 13:05
@lcartey lcartey enabled auto-merge July 23, 2024 20:04
@lcartey lcartey added this pull request to the merge queue Jul 23, 2024
Merged via the queue into main with commit 7af46a5 Jul 23, 2024
23 checks passed
@lcartey lcartey deleted the mbaluda/importMisra23 branch July 23, 2024 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants