codeql-coding-standards icon indicating copy to clipboard operation
codeql-coding-standards copied to clipboard

This repository contains CodeQL queries and libraries which support various Coding Standards.

Results 202 codeql-coding-standards issues
Sort by recently updated
recently updated
newest added

The comments for this test all indicate the first three data structures are classes, while they are clearly structs. https://github.com/github/codeql-coding-standards/blob/bc70b044f71eed50f07a298b69949b7f6c98807b/cpp/autosar/test/rules/A0-1-1/test.cpp#L2

enhancement
Standard-AUTOSAR

There should be a test where the side-effecting and no-side effecting functions are in a different translation unit: https://github.com/github/codeql-coding-standards/blob/9a23abab13bbf3a075dd5f4c1372b93bfcb211e4/cpp/autosar/test/rules/M0-1-9/test.cpp#L1 What is the expected behavior in such as case?

Standard-AUTOSAR

The user manual describes how to use the CLI to run the coding standards queries. However, it would be useful to add a how to get started section to the...

enhancement

### Affected rules - A7-1-2 ### Description False positive reported for the following test case. In the example, below, `a712` must be `constexpr` for `value` to be declared `constexpr`. However,...

false positive/false negative

You should add a test for MO-1-2 for a infinite loop that breaks after testing a volatile-qualified object, even if that object is not modified within the loop. This loop...

Standard-AUTOSAR

### Affected rules - cpp/cert/container-access-without-range-check-cert ### Description The rule warns about the vector container which is resized after delectation. ``` Access of container of type Payload does not ensure that...

Difficulty-Medium
Impact-Low
user-report
false positive/false negative
Stardard-CERT-C++

### Affected rules - cpp/cert/range-check-string-element-access ### Description The rule hits on a fixed string length. The provided code snippet shows a simple 16-base converter yet the rule states ``` Access...

false positive/false negative

I have this code snippet ``` #include #include #include #include int main() { std::set std_section_names; std_section_names.insert(".text"); std_section_names.insert(".itext"); // ---- std::map pe_attr = { {"instructionsCount", 0.0}, }; return 0; } ```...

Stardard-CERT-C++

solve issue discussed [here](https://github.com/github/codeql-coding-standards/pull/39#discussion_r945685947)

enhancement
Standard-MISRA-C

Currently we have a [library](https://github.com/github/codeql-coding-standards/blob/main/cpp/common/src/codingstandards/cpp/Naming.qll) for Cpp14 specific naming, but would benefit from creating a set of C99 specific names to avoid any false positives of standard expansions that occurred....

enhancement
Standard-MISRA-C
Standard-CERT-C