All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sonar.l10n.py.rules.python.S1940.html Maven / Gradle / Ivy

There is a newer version: 4.23.0.17664
Show newest version

Why is this an issue?

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

Noncompliant code example

if not a == 2:        # Noncompliant
    b = not i < 10    # Noncompliant

Compliant solution

if a != 2 :
    b = i >= 10




© 2015 - 2024 Weber Informatics LLC | Privacy Policy