Skip to content

Commit db9c2ab

Browse files
committed
[nedap#126] Remove mount/args support
- While potentially handy in some cases, most often the dual (and independent) configuration's for mount can get confusing.
1 parent af13ebb commit db9c2ab

File tree

2 files changed

+3
-30
lines changed

2 files changed

+3
-30
lines changed

src/formatting_stack/mount.clj

+2-12
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,5 @@
1212
(apply format!))
1313
this)
1414

15-
;; Allow parameterless configuring using `mount/start-with-args`.
16-
(mount-up/on-up :formatting-with-mount-args
17-
(fn [_]
18-
(when-let [config (::config (mount/args))]
19-
(start config)))
20-
:before)
21-
22-
(defn configure [config]
23-
(mount-up/on-up :formatting-with-provided-config
24-
(fn [_]
25-
(start config))
26-
:before))
15+
(defn configure! [config]
16+
(mount-up/on-up :formatting (fn [_] (start config)) :before))

test/functional/formatting_stack/mount.clj

+1-18
Original file line numberDiff line numberDiff line change
@@ -35,26 +35,9 @@
3535
:processors []
3636
:in-background? false
3737
:reporter (reporters.passthrough/new)}]
38-
(sut/configure opts)
38+
(sut/configure! opts)
3939
(mount/start)
4040
(testing "It actually runs its members, such as linters"
4141
(is (= [sample-report]
4242
@p)))
4343
(mount/stop))))
44-
45-
(deftest works-with-mount-args
46-
(testing "It can be started/stopped without errors"
47-
(let [p (atom nil)
48-
;; pass an empty stack (except for the `proof`), so that no side-effects will be triggered (would muddy the test suite):
49-
opts {:strategies []
50-
:third-party-indent-specs {}
51-
:formatters []
52-
:linters [(proof p)]
53-
:processors []
54-
:in-background? false
55-
:reporter (reporters.passthrough/new)}]
56-
(mount/start-with-args {:formatting-stack.mount/config opts})
57-
(testing "It actually runs its members, such as linters"
58-
(is (= [sample-report]
59-
@p)))
60-
(mount/stop))))

0 commit comments

Comments
 (0)