main
1id: nix-boolean-comparison
2message: Don't compare booleans to true/false directly
3severity: warning
4language: Nix
5note: |
6 Use the boolean directly: if $VAR then ...
7 For false: if !$VAR then ...
8rule:
9 any:
10 - pattern: $VAR == true
11 - pattern: $VAR == false
12 - pattern: true == $VAR
13 - pattern: false == $VAR