What it does
A comparison whose answer is decided before it runs, so the branch it guards is not a branch.
How it helps you
Comparisons that can never match get flagged as bugs.
Tested against itself
29 deliberate breaks, all caught
We change this check on purpose and watch its test fail. Each dot is one of those changes.
Details
| Category | Code quality |
|---|---|
| Checks in this category | 216 |
| ISO/IEC 25010 | Maintainability: modifiability |
| Breaks caught | 29 |