github / codeql-coding-standards

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

`RULE-10-1`: Handle missing unary operations #691

Closed lcartey closed 2 months ago

lcartey commented 2 months ago

Affected rules

Description

We are missing unary operations:

Example

~1; // NON_COMPLIANT[FALSE_NEGATIVE] - the ~ operator is not currently supported
bool x = false;
!x && true; // COMPLIANT[FALSE_POSITIVE] - !x should have essential type bool and so should be permitted