redplanetlabs / rama-clj-kondo

clj-kondo hooks for Rama code
Apache License 2.0
11 stars 0 forks source link

BUG - 0-arity query topologies show odd linting error #5

Closed nixin72 closed 4 months ago

nixin72 commented 4 months ago

0-arity query topologies were getting transformed incorrectly such that

(<<query-topology
   x
   "name"
   [:> *ret]
   (identity :x :> *ret))

Was getting transformed into

(fn name [:> *ret] ...)

This was causing a confusing linting error about keywords not being valid binding forms.

This PR just adds special handling for binding forms where :> is the first token in the binding vector, indicating that it only has return values.

nixin72 commented 4 months ago

Addresses #4