blob: 488980ddf023934376fc1379c7695ebbdbe03a8a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
### What it does
Checks for boolean expressions that can be written more
concisely.
### Why is this bad?
Readability of boolean expressions suffers from
unnecessary duplication.
### Known problems
Ignores short circuiting behavior of `||` and
`&&`. Ignores `|`, `&` and `^`.
### Example
```
if a && true {}
if !(a == b) {}
```
Use instead:
```
if a {}
if a != b {}
```
|