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

### Affected rules - `A4-7-1` ### Description Typical increment by one in for loops cannot lead to overflow or wrap-around because the number of iterations isn't large enough. The example...

Difficulty-High
Impact-Medium
false positive/false negative
Standard-AUTOSAR

### Affected rules - `A2-10-5` ### Description Variable template defined with an specialization is alerted as identifier reuse. ### Example ```cpp template extern constexpr bool x = false; template extern...

Difficulty-Low
Impact-Low
user-report
false positive/false negative

### Affected rules - `A4-7-1` ### Description Decrement cannot lead to wrap-around since the container is checked for emptiness. ### Example ```cpp class container { bool empty() { return num_items_...

Difficulty-High
Impact-Medium
false positive/false negative
Standard-AUTOSAR

### Affected rules - `DCL53-CPP` ### Description `LocalConstructorInitializedObjectHidesIdentifier.ql` currently identifies variable declarations that call a constructor and hide an outer scope variable. However, this does not fully capture the cases...

Difficulty-Medium
Impact-Low
false positive/false negative

### Affected rules - `A12-8-6` ### Description Compiler generated special functions are not always flagged by this rule, because the extractor does not always generate them. In CodeQL CLI `v2.16.6`...

Difficulty-Medium
Impact-Medium
false positive/false negative

### Affected rules - `RULE-8-13` ### Description Should we flag variables generated from macro expansions as missing const? Some considerations: * Should we flag the macro itself, as that's where...

Difficulty-High
Impact-Low
false positive/false negative
Standard-MISRA-C

The query doesn't currently report what type of side effect is highlighted. This can make it difficult to identify why correct results are reported, as some side-effects aren't that obvious,...

enhancement
Standard-MISRA-C

### Affected rules - `A27-0-4` - `A18-1-1` ### Description Alerts of both rules are triggered even if no C-style array or string is directly used. It may also be relevant...

false positive/false negative
Standard-AUTOSAR

### Affected rules - `A20-8-5`: `cpp/autosar/make-unique-not-used-to-construct-object-owned-by-unique-ptr` > Rule A20-8-5 (required, implementation, automated) > std::make_unique shall be used to construct objects owned by > std::unique_ptr. - `A20-8-6`: `cpp/autosar/make-shared-not-used-to-construct-object-owned-by-shared-ptr` > Rule A20-8-6...

Difficulty-Low
Impact-Low
user-report
false positive/false negative
Standard-AUTOSAR

### Affected rules - `A5-16-1`: `cpp/autosar/ternary-conditional-operator-used-as-sub-expression` > Rule A5-16-1 (required, implementation, automated) > The ternary conditional operator shall not be used as a sub-expression. ### Description When initializing a **string**...

Difficulty-Low
Impact-Medium
user-report
false positive/false negative
Standard-AUTOSAR