/
string.yaml
39 lines (39 loc) · 1.01 KB
/
string.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
rules:
- id: ocamllint-str-first-chars
pattern: String.sub $S 0 $N
message: Use instead `Str.first_chars`
languages: [ocaml]
severity: WARNING
metadata:
category: best-practice
technology:
- ocaml
- id: ocamllint-str-string-after
pattern: String.sub $S $N (String.length $S - $N)
message: Use instead `Str.string_after`
languages: [ocaml]
severity: WARNING
metadata:
category: best-practice
technology:
- ocaml
- id: ocamllint-str-last-chars
pattern: String.sub $S (String.length $S - $N) $N
message: Use instead `Str.last_chars`
languages: [ocaml]
severity: WARNING
metadata:
category: best-practice
technology:
- ocaml
- id: ocamllint-useless-sprintf
pattern-either:
- pattern: Printf.sprintf "..."
- pattern: Printf.sprintf "%s" $S
message: Useless sprintf
languages: [ocaml]
severity: WARNING
metadata:
category: best-practice
technology:
- ocaml