github / codeql-coding-standards

This repository contains CodeQL queries and libraries which support various Coding Standards.
MIT License
129 stars 59 forks source link

`RULE-2-2`: Should only report operations, permit void casts #716

Closed lcartey closed 1 month ago

lcartey commented 2 months ago

Affected rules

Description

Rule 2.2 for MISRA C is restricted to operations, however the query currently reports statements.

Example

(void) 0; // COMPLIANT

if (true) { // COMPLIANT - not operation
}