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 Concurrency9 package #819

Merged
merged 8 commits into from
Mar 27, 2025

Conversation

MichaelRFairhurst
Copy link
Contributor

@MichaelRFairhurst MichaelRFairhurst commented Dec 11, 2024

Description

Implement Concurrency9 package on top of Concurrency8.

Break apart Concurrency.qll.

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:
    • DIR-5-1
    • RULE-22-14
    • RULE-22-15
    • RULE-22-17
    • RULE-22-18
    • RULE-22-19
    • RULE-22-20
  • 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!)

@lcartey lcartey requested review from nicolaswill and removed request for lcartey January 24, 2025 16:56
Base automatically changed from michaelrfairhurst/implement-concurrency8-package to main February 15, 2025 18:23
@MichaelRFairhurst MichaelRFairhurst force-pushed the michaelrfairhurst/implement-concurrency9-package branch from 3e3ea7d to 713c675 Compare February 18, 2025 22:02
@MichaelRFairhurst MichaelRFairhurst marked this pull request as ready for review February 18, 2025 22:02
@Copilot Copilot bot review requested due to automatic review settings February 18, 2025 22:02
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 54 out of 54 changed files in this pull request and generated no comments.

Tip: Copilot code review supports C#, Go, Java, JavaScript, Markdown, Python, Ruby and TypeScript, with more languages coming soon. Learn more

@MichaelRFairhurst MichaelRFairhurst changed the title Implement Concurrency9 package on top of Concurrency8 work Implement Concurrency9 package Feb 19, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 35 out of 55 changed files in this pull request and generated no comments.

Files not reviewed (20)
  • c/common/src/codingstandards/c/SubObjects.qll: Language not supported
  • c/common/src/codingstandards/c/initialization/GlobalInitializationAnalysis.qll: Language not supported
  • c/common/test/includes/standard-library/stdlib.h: Language not supported
  • c/misra/src/rules/DIR-5-1/PossibleDataRaceBetweenThreads.ql: Language not supported
  • c/misra/src/rules/RULE-22-14/MutexNotInitializedBeforeUse.ql: Language not supported
  • c/misra/src/rules/RULE-22-15/ThreadResourceDisposedBeforeThreadsJoined.ql: Language not supported
  • c/misra/src/rules/RULE-22-17/InvalidOperationOnUnlockedMutex.ql: Language not supported
  • c/misra/src/rules/RULE-22-18/NonRecursiveMutexRecursivelyLocked.ql: Language not supported
  • c/misra/src/rules/RULE-22-18/NonRecursiveMutexRecursivelyLockedAudit.ql: Language not supported
  • c/misra/src/rules/RULE-22-19/ConditionVariableUsedWithMultipleMutexes.ql: Language not supported
  • c/misra/src/rules/RULE-22-20/ThreadStorageNotInitializedBeforeUse.ql: Language not supported
  • c/misra/src/rules/RULE-22-20/ThreadStoragePointerInitializedInsideThread.ql: Language not supported
  • c/misra/test/rules/DIR-5-1/PossibleDataRaceBetweenThreads.expected: Language not supported
  • c/misra/test/rules/DIR-5-1/PossibleDataRaceBetweenThreads.qlref: Language not supported
  • c/misra/test/rules/DIR-5-1/test.c: Language not supported
  • c/misra/test/rules/RULE-22-15/ThreadResourceDisposedBeforeThreadsJoined.expected: Language not supported
  • c/misra/test/rules/RULE-22-15/ThreadResourceDisposedBeforeThreadsJoined.qlref: Language not supported
  • c/misra/test/rules/RULE-22-15/test.c: Language not supported
  • c/misra/test/rules/RULE-22-17/InvalidOperationOnUnlockedMutex.expected: Language not supported
  • c/misra/test/rules/RULE-22-17/InvalidOperationOnUnlockedMutex.qlref: Language not supported

Tip: Copilot code review supports C#, Go, Java, JavaScript, Markdown, Python, Ruby and TypeScript, with more languages coming soon. Learn more

@MichaelRFairhurst
Copy link
Contributor Author

Apologies @nicolaswill, didn't realize this was red. Fixed CI/CD!

@nicolaswill
Copy link
Contributor

This is really great work... I love how the libraries are rather modular and reusable.

I've made some comments that are for the most part minor. I've verified the functionality based on your test-cases and thought of some small edge-cases... while I'm sure there are more (mainly in terms of false negatives), the rest LGTM.

Happy to merge once the smaller fixes are addressed.

@MichaelRFairhurst
Copy link
Contributor Author

Thank you Nick! This is ready for re-review!

Copy link
Contributor

@nicolaswill nicolaswill left a comment

Choose a reason for hiding this comment

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

I missed a small typo in my previous review. Otherwise, LGTM!

@nicolaswill nicolaswill enabled auto-merge March 27, 2025 17:36
@nicolaswill nicolaswill added this pull request to the merge queue Mar 27, 2025
Merged via the queue into main with commit 1ead46d Mar 27, 2025
25 checks passed
@nicolaswill nicolaswill deleted the michaelrfairhurst/implement-concurrency9-package branch March 27, 2025 22:36
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