We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a080563 commit 0b6f981Copy full SHA for 0b6f981
.semgrep/fold.yml
@@ -0,0 +1,26 @@
1
+rules:
2
+ - id: fold-exists
3
+ patterns:
4
+ - pattern-either:
5
+ - pattern: $D.fold ... false
6
+ - pattern: $D.fold_left ... false
7
+ - pattern: $D.fold_right ... false
8
+ - pattern: fold ... false
9
+ - pattern: fold_left ... false
10
+ - pattern: fold_right ... false
11
+ message: consider replacing fold with exists
12
+ languages: [ocaml]
13
+ severity: WARNING
14
+
15
+ - id: fold-for_all
16
17
18
+ - pattern: $D.fold ... true
19
+ - pattern: $D.fold_left ... true
20
+ - pattern: $D.fold_right ... true
21
+ - pattern: fold ... true
22
+ - pattern: fold_left ... true
23
+ - pattern: fold_right ... true
24
+ message: consider replacing fold with for_all
25
26
0 commit comments