org.sonar.l10n.delphi.rules.community-delphi.RedundantBoolean.html Maven / Gradle / Ivy
Why is this an issue?
Boolean expressions do not have to be explicitly compared to True
or
False
. Doing so adds unnecessary complexity to the statement.
How to fix it
Remove the redundancy in the boolean expression:
if Foo = True then begin
// ...
end;
if Bar = False then begin
// ...
end;
DoSomething(not False);
if Foo then begin
// ...
end;
if not Bar then begin
// ...
end;
DoSomething(True);
© 2015 - 2024 Weber Informatics LLC | Privacy Policy