A0-1-1: Fix useless assignment false positive on constexpr array size#732
Conversation
|
Hello @lcartey, I looked for unit tests analogous to the one updated in #690, in this case for A0-1-1 "useless assignment", in contrast with M0-1-9 "no dead code", but couldn't find any already existing. I run locally the (153) tests in Does it make sense to add explicit coverage for A0-1-1? |
|
Hi @fjatWbyT! Thanks for the PR. The test cases for The tests live in a common directory when one query implementation is shared by multiple rules - for example, where an AUTOSAR and CERT C++ rule cover the same issue. |
|
Aaah, it is clear now. Thank you very much for the explanation. I will update the PR with extra coverage for this case in that file. |
Description
Addresses false positive like the one in #690 in another AUTOSAR ule.
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.