codeql-coding-standards
codeql-coding-standards copied to clipboard
This repository contains CodeQL queries and libraries which support various Coding Standards.
## Description Fixes #606 omit fp in friend function declarations in template classes ## Change request type - [ ] Release or process automation (GitHub workflows, internal scripts) - [...
## Description additionally moved some libraries to allow for use in shared query Fixes #119 ## Change request type - [ ] Release or process automation (GitHub workflows, internal scripts)...
### Affected rules - `A2-7-3` ### Description Friend functions in template classes do not detect documentation. ### Example ```cpp template class ClassG { private: int x; public: // Documentation friend...
## Description fixes #406 (likely, was unable to replicate - [see note](https://github.com/github/codeql-coding-standards/issues/406#issuecomment-2224361076)) this exclusion was previously [explicitly accepted behaviour](https://github.com/github/codeql-coding-standards/pull/514), however upon another consideration, I think removing those alerts makes sense...
### Affected rules - `A7-1-7` ### Description Macro expansion can cause multiple expressions and statements to appear at the same location. We exclude macro expanded declarations, I think we should...
### Affected rules - A4-7-1 ### Description Changing a class/struct's member value with an arithmetic expression triggers a A4-7-1 warning, despite using an appropriate type guard (example function `false_positive`). I...
### Affected rules - M0-1-9 ### Description When using template type, some irrelevant `M0-1-9` warnings are triggered ### Example ```cpp template void false_positive() { T t; std::cin >> t; //...
### Affected rules - A15-1-3 ### Description When defining a function template which throws an exception, `A15-1-3` warning is triggered, meaning that the exception is not unique. ### Example ```cpp...
### Affected rules - A5-16-1 ### Description CodeQL triggers `A5-16-1` on a plain ternary expression. ### Example ```cpp const auto smallestSet = (setA.size() < setB.size() ? setA : setB); ```
### Affected rules - M0-1-2 - A3-1-5 - A4-5-1 - M0-1-1 ### Description Using lambda expression trigger various side effects alerts. ### Example #### A3-1-5 ```cpp const auto lambda =...