Repository navigation
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Inconsistent fixture paths give wrappers for the same tests different mutex names, allowing concurrent jobs to modify shared compiler-specific files without a shared lock.
6 open issues
Normalize fixture paths before using them as mutex names · New Match rules by original query location, not fixture path · New Prefer directly runnable tests over .testref targets · New Include applicable legacy-owned queries in suite selection · New Run the new regression modules in the tooling workflow · New Document rule-ID mappings and configuration migration · New
8 resolved since last review
Non-edition tags incorrectly satisfy the edition-tag requirement Include all applicable rules in the MISRA-C-2025 supported-rules list Matrix runner skips shared fixtures and requests missing .qlref files Test the shared assert expansion and retain the NDEBUG control Keep the extractor flag in the options directive Test category-based suppression with a local multi-return function SinglePointOfExit wrapper lacks runnable test artifacts Initializer check suppresses header violations across translation units
Review effort: Max (auto)
| if (-not (Test-Path -LiteralPath $expectedFile -PathType Leaf)) { | ||
| throw "Referenced test has no expected results: $expectedFile" | ||
| } | ||
| return (Resolve-Path -LiteralPath $testFile).Path |
| } | ||
|
|
||
| return Join-Path (Join-Path (Join-Path (Join-Path $Language $standardString) "test") "rules") $ruleDir | ||
| return Split-Path -Path (Get-TestFile -RuleObject $RuleObject -Language $Language) -Parent |
Comment on lines
+40
to
+41
| $referenceFile = Join-Path $testDirectory "$queryName.testref" | ||
| if (Test-Path -LiteralPath $referenceFile -PathType Leaf) { |
| # 'AUTOSAR' and MISRA-C-2012, MISRA-C++-2023 and CERT-C | ||
| [Parameter(Mandatory, ParameterSetName = 'Suite')] | ||
| [ValidateSet("CERT-C++", "AUTOSAR", "MISRA-C-2012", "CERT-C", "MISRA-C++-2023")] | ||
| [ValidateSet("CERT-C++", "AUTOSAR", "MISRA-C-2012", "MISRA-C-2025", "CERT-C", "MISRA-C++-2023")] |
| @@ -0,0 +1,116 @@ | |||
| import csv | |||
Comment on lines
+1
to
+2
| - Default MISRA C suites now target MISRA C:2025; support remains incomplete. | ||
| Explicit 2023 and 2012 suites retain their guideline sets and query IDs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
This PR updates the project to support the development of MISRA C:2025 queries while retaining support for older editions.
Seven different categories of guideline changes are identified. For each category, this PR provides one complete end-to-end implementation with tests.
The remaining guideline work is tracked in
rules-misra-c-2025.csv.Implemented Examples By Category
testreffiles.__assert_fail, using the standard-library model. Add tests for enabled assertions, NDEBUG-disabled assertions, and unrelated non-returning calls. Existing banned-function checks remain unchanged.static-parameter prohibition from current suites. Older suites retain the legacy prohibition.The supporting changes update the rule inventory, schema, generators, suites, documentation, release metadata handling, and validation scripts. Unchanged queries keep their existing standard metadata; only new or modified variants use
MISRA-C-2025.Change Request Type
.ql,.qll,.qlsor unit tests)Rules With Added Or Modified Queries
Release change checklist
A change note (development_handbook.md#change-notes) is required for any pull request which modifies:
If you are only adding new rule queries, a change note is not required.
Author: Is a change note required?
🚨🚨🚨
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.
Reviewer: Confirm that either a change note is not required or the change note is required and has been added.
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
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.
Reviewer
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.