Skip to content

New Rule: no inversion of boolean checks #44

Closed
@silviomarghitola

Description

@silviomarghitola

Language Usage / Control Structures / CASE ...
Avoid inverting boolean checks

from SonarQube

Boolean checks should not be inverted

It is needlessly complex to invert the result of a boolean comparison. The opposite comparison should be made instead.

Noncompliant Code Example

IF NOT x <> y THEN
  -- ...
END IF;

Compliant Solution

IF x = y THEN
  -- ...
END IF;

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions