Skip to content

A3-1-5: Down grade to an "audit" query. #853

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 4 commits into from
Feb 10, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions change_notes/2025-02-06-a3-1-5-audit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- `A3-1-5` - `NonTrivalNonTemplateFunctionDefinedInsideClassDefinition.ql`:
- Mark this as an `audit` query. As a consequence, it will no longer be run as part of the default query suite for AUTOSAR. It can still be run as part of the `autosar-audit.qls` query suite. The query has been downgraded because the rule allows for functions to be declared in the class body if they were "intended" to be inlined, and that developer intention cannot be determined automatically from the code.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* @precision very-high
* @problem.severity recommendation
* @tags external/autosar/id/a3-1-5
* external/autosar/audit
* external/autosar/allocated-target/design
* external/autosar/enforcement/partially-automated
* external/autosar/obligation/required
Expand Down
4 changes: 3 additions & 1 deletion rule_packages/cpp/Classes.json
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@
"precision": "very-high",
"severity": "recommendation",
"short_name": "NonTrivialNonTemplateFunctionDefinedInsideClassDefinition",
"tags": []
"tags": [
"external/autosar/audit"
]
}
],
"title": "A function definition shall only be placed in a class definition if (1) the function is intended to be inlined (2) it is a member function template (3) it is a member function of a class template."
Expand Down
Loading