`A2-7-3`: documented type alias to template instantiation considered undocumented
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Inspect UndocumentedUserDefinedType.ql and reproduce the report with the provided C++ type-alias and template example under AUTOSAR A2-7-3. Trace why the documented alias to template_type is reported, then verify that the query no longer reports a2_7_3_fp_alias while still detecting genuinely undocumented user-defined types.
Written by the indexing model from the issue text.
Description
Affected rules
- A2-7-3
Description
A documented type alias where type-id is a template results in a missing documentation false positive. If the rhs of the (documented) alias declaration does not involve a template, then there is no alert.
Example
/// @brief Template type template_type description.
///
/// @tparam template parameter T.
template<typename T> struct template_type {};
/// @brief Alias to int a_documented_alias.
using a_documented_alias = int;
/// @brief Alias a2_7_3_fp_alias to instantiated template_type with int template parameter.
using a2_7_3_fp_alias = template_type<int>;
Running query UndocumentedUserDefinedType.ql, AUTOSAR A2-7-3, will evaluate to
| declaration of a2_7_3_fp_alias | Declaration entry for user-defined type a2_7_3_fp_alias is missing documentation. |
- Dominant language
- CodeQL
- Stars
- 227
- Forks
- 82
- Avg merge
- 6d 7h
- Merged PRs (30d)
- 9
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from github/codeql-coding-standards
-
false positive/false negative Stardard-MISRA-C++
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
github/codeql-coding-standards#1172 ·
-
Difficulty-Low false positive/false negative false-negative Impact-Low Standard-MISRA-C
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty-Medium false positive/false negative false-positive Impact-Medium Standard-CERT-C
Difficulty 4/5 3-5 days Newbie friendliness 48/100
github/codeql-coding-standards#1200 ·
-
`RULE-0-0-1`: "unreachable statement" false positives due to over-pruning of the control-flow graph Openfalse positive/false negative
Difficulty 4/5 3-5 days Newbie friendliness 48/100
github/codeql-coding-standards#1190 ·
-
false positive/false negative
Difficulty 3/5 1-2 days Newbie friendliness 65/100
github/codeql-coding-standards#1175 ·
All issues in github/codeql-coding-standards
Similar issues
-
ZCode 3.14.3 に対応する Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
supermomonga/zcode-acp#24 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
learningequality/ricecooker#747 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
KhronosGroup/glTF-Blender-IO#2769 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100