-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdunolint
More file actions
108 lines (98 loc) · 1.85 KB
/
Copy pathdunolint
File metadata and controls
108 lines (98 loc) · 1.85 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
(lang dunolint 1.0)
;; Everything is instrumented
(rule
(enforce
(dune
(instrumentation
(backend bisect_ppx)))))
;; Test lib naming
(rule
(cond
((path
(glob test/volgo-base/**))
(enforce
(dune
(library
(and
(not
(has_field public_name))
(has_field inline_tests)
(package
(equals volgo-base-tests))
(name
(equals volgo_base_test)))))))
((path
(glob test/toplevel/**))
(enforce
(dune
(library
(and
(not
(has_field public_name))
(has_field inline_tests)
(package
(equals volgo-dev))
(name
(equals volgo_toplevel_test)))))))
((path
(or
(glob test/**)
(glob example/**)))
(enforce
(dune
(library
(and
(not
(has_field public_name))
(has_field inline_tests)
(package
(equals volgo-tests))
(name
(is_suffix _test)))))))))
;; Configure the ppx_js_style linter
(rule
(enforce
(dune
(lint
(pps
(and
(pp ppx_js_style)
(flag
(name -allow-let-operators)
(param none)
(applies_to
(pp ppx_js_style)))
(flag
(name -check-doc-comments)
(param none)
(applies_to
(pp ppx_js_style)))))))))
;; Configure ppx flags
(rule
(cond
((dune
(preprocess
(pps
(or
(pp ppx_hash)))))
(enforce
(dune
(preprocess
(pps
(flag
(name -unused-code-warnings)
(param
(equals force))
(applies_to driver)))))))))
;; With the exception of one library we made a deliberate effort not to depend
;; on ppx except in tests. Let's enforce this going forward.
(rule
(cond
((path
(glob src/volgo-base/*))
return)
((path
(glob src/**))
(enforce
(dune
(preprocess no_preprocessing))))))