File tree Expand file tree Collapse file tree
clj-kondo-test/io/julienvincent
resources/clj-kondo.exports/io.julienvincent/malt/hooks/io/julienvincent Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{:remove-multiple-non-indenting-spaces? true
22 :sort-ns-references? true
3- :indents {io.julienvincent.malt/extend [[:inner 0 ] [:inner 1 ]]}}
3+ :indents {io.julienvincent.malt/extend [[:inner 0 ] [:inner 1 ]]
4+ io.julienvincent.malt/implement [[:inner 0 ] [:inner 1 ]]
5+ io.julienvincent.malt/defrecord [[:inner 0 ] [:inner 1 ]]}}
Original file line number Diff line number Diff line change @@ -132,7 +132,15 @@ config to display properly:
132132
133133``` clojure
134134; ; .cljfmt.edn
135- {:indents {io.julienvincent.malt/extend [[:inner 0 ] [:inner 1 ]]}}
135+ {:indents {io.julienvincent.malt/extend [[:inner 0 ] [:inner 1 ]]
136+ io.julienvincent.malt/implement [[:inner 0 ] [:inner 1 ]]
137+ io.julienvincent.malt/defrecord [[:inner 0 ] [:inner 1 ]]}}
136138```
137139
138140This might not be needed in the future - see https://github.com/weavejester/cljfmt/issues/336
141+
142+ ## Gotchas
143+
144+ If you are using the autogenerated ` ?Type ` schemas that are produced by ` malt/defprotocol ` and ` malt/defrecord ` then
145+ note that lsp references don't work perfectly due to limitations in clojure-lsp. This means that go-to-references will
146+ not find references to these schema vars and operations like rename will not apply to those references.
Original file line number Diff line number Diff line change 2929
3030 (c [a :int b :int ] ?SchemaReference))
3131
32- (malt/defprotocol ExampleWithDocs
33- " This is what the protocol does"
34- (get-docs [a :int ] :string ))
35-
36- (get-docs
37- (reify ExampleWithDocs
38- (get-docs [_ _] " " ))
39- 1 )
40-
4132(def example
4233 (reify Example
4334 (a [_ _ _] 1 )
8273(m/validate ?Point (->Point 1 1 ))
8374(m/validate ?PointSchema {:x 1
8475 :y 1 })
76+
77+ (malt/defprotocol ExampleWithDocs
78+ " This is what the protocol does"
79+ (get-docs [a :int ] :string ))
80+
81+ (get-docs
82+ (reify ExampleWithDocs
83+ (get-docs [_ _] " " ))
84+ 1 )
85+
86+ (malt/defprotocol NoArgs
87+ (no-args [] [:vector :string ]))
88+
89+ (def with-no-args
90+ (reify NoArgs
91+ (no-args [_] " " )))
92+
93+ (no-args with-no-args)
Original file line number Diff line number Diff line change 2828 [(first rest-children) (rest rest-children)]
2929 [nil rest-children])
3030 schema-form? (and (= 2 (count rest-children))
31- (= 1 ( count ( filter vector-node? rest-children) )))
31+ (vector-node? ( first rest-children)))
3232 method-children (if schema-form?
3333 (let [[input-schemas-node output-schema-node] rest-children
3434 {:keys [pair-form? param-nodes schema-nodes]} (parse-input-schemas-node
You can’t perform that action at this time.
0 commit comments