-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcomponent_repl.clj
More file actions
34 lines (27 loc) · 1.04 KB
/
component_repl.clj
File metadata and controls
34 lines (27 loc) · 1.04 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
(ns component-repl
"Documents a working setup for Component, as a runnable example.
Not a part of the test suite.
See also:
* https://github.com/nedap/formatting-stack/blob/master/README.md
* https://github.com/nedap/formatting-stack/wiki/FAQ
* The `customization-example` sibling namespace."
(:require
[com.stuartsierra.component :as component]
[com.stuartsierra.component.repl :as component.repl]
[formatting-stack.component]
[formatting-stack.defaults]))
(def sample-linters
(conj formatting-stack.defaults/default-linters
(reify formatting-stack.protocols.linter/Linter
(--lint! [this filenames]
[{:source ::my-linter
:level :warning
:column 40
:line 6
:msg "Hello, I am a sample linter!"
:filename "path.clj"}]))))
(defn init [_]
(component/system-map :formatting-stack (formatting-stack.component/new {:linters sample-linters})))
(component.repl/set-init init)
(comment
(component.repl/reset))