codeql-coding-standards
codeql-coding-standards copied to clipboard
This repository contains CodeQL queries and libraries which support various Coding Standards.
### Affected rules - `A16-2-2` ### Description Types that only appear in template parameters or template arguments are not currently considered when determining whether an include is useless. We should...
### Affected rules - `A2-10-1` ### Description `A2-10-1` states "An identifier declared in an inner scope shall not hide an identifier declared in an outer scope.". The existing query looks...
### Affected rules - `A2-7-3` ### Description `using` declarations within functions do not detect colocated documentation. ### Example ```cpp #include template void foo(Integer i) { /// documentation using unsigned_integer =...
### Affected rules - cpp/autosar/signed-char-and-unsigned-char-type-shall-only-be-used-for-the-storage-and-use-of-numeric-values ### Description The implementation incorrectly implements the identification of numeric values. Characters will have type `char` while numeric values will be promoted to `int` or...
### Affected rules - cpp/autosar/non-trivial-non-template-function-defined-inside-class-definition - cpp/autosar/trivial-or-template-function-defined-outside-class-definition ### Description See [discussion](https://forum.misra.org.uk/archive/index.php?thread-1588.html) for the two interpretations and the intend of MISRA. This requires removing of `trivial-or-template-function-defined-outside-class-definition` and solely look at the...
### Affected rules - cpp/autosar/function-missing-constexpr ### Description The query alerts on a move constructor declaration outside the class body. Per `[dcl.constexpr]` paragraph 1, a `constexpr` shall only be applied to...
### Affected rules - cpp/autosar/variable-width-integer-types-used ### Description Template instantiations store the template argument after type definitions have been resolved. This results in argument types with variable width integer types even...
Hey Folks Excellent project! I've been using it extensively. Now that [MISRA C++ 2023](https://misra.org.uk/misra-cpp2023-released-including-hardcopy/) has been released, I'm wondering what the timeline is for incorporating those changes into the repo?...
### Affected rules - `RULE-11-1` - `RULE-11-4` - `RULE-11-5` - `RULE-11-6` ### Description According to MISRA C 2012 8.11 zero is a null pointer constant, and so should not be...
### Affected rules - `A7-1-7` ### Description In a template class or template function we may report the same logical expression in multiple template instantiations. ### Example ```cpp template class...