/
clojure.clj
48 lines (42 loc) · 2.17 KB
/
clojure.clj
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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Configs to disable warnings in clojure.core, version 1.6.0
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(disable-warning
{:linter :redefd-vars
:if-inside-macroexpansion-of #{'clojure.core/defonce 'clojure.core/defmulti}
:within-depth 2
:reason "defonce, defmulti expand to code with multiple def's for the same Var."})
(disable-warning
{:linter :suspicious-expression
;; specifically, those detected in function suspicious-macro-invocations
:for-macro 'clojure.core/let
:if-inside-macroexpansion-of #{'clojure.core/when-first}
:within-depth 6
:reason "when-first with an empty body is warned about, so warning about let with an empty body in its macroexpansion is redundant."})
(disable-warning
{:linter :suspicious-expression
;; specifically, those detected in function suspicious-macro-invocations
:for-macro 'clojure.core/let
:if-inside-macroexpansion-of #{'clojure.core/when-let}
:within-depth 6
:reason "when-let with an empty body is warned about, so warning about let with an empty body in its macroexpansion is redundant."})
(disable-warning
{:linter :suspicious-expression
;; specifically, those detected in function suspicious-macro-invocations
:for-macro 'clojure.core/let
:if-inside-macroexpansion-of #{'clojure.core/when-some}
:within-depth 3
:reason "when-some with an empty body is warned about, so warning about let with an empty body in its macroexpansion is redundant."})
(disable-warning
{:linter :suspicious-expression
:for-macro 'clojure.core/and
:if-inside-macroexpansion-of #{'clojure.spec/every 'clojure.spec.alpha/every
'clojure.spec/and 'clojure.spec.alpha/and
'clojure.spec/keys 'clojure.spec.alpha/keys}
:within-depth 6
:reason "clojure.spec's macros `keys`, `every`, and `and` often contain `clojure.core/and` invocations with only one argument."})
(disable-warning
{:linter :constant-test
:if-inside-macroexpansion-of #{'clojure.core/cond-> 'clojure.core/cond->>}
:within-depth 2
:reason "Allow cond-> and cond->> to have constant tests without warning"})