github / github/codeql

LGTM.com - false positive cs/constant-condition

Open
#6,306 2 comments 0 reactions 0 assignees View on GitHub
C# false-positive
Dominant language
CodeQL
Stars
10.1k
Forks
2.1k
Avg merge
2d 15h
Merged PRs (30d)
141

Description

Conditions including `true && ...` are falsely reported as always returning true.

While I admit including extra `true` statements is a bit redundant, it can help minimise git diffs when long conditionals are split over multiple lines.

https://lgtm.com/projects/g/rkm/lgtm-constant-conditional-test

Thanks!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.