cljfmt
cljfmt copied to clipboard
keyword in destructuring forced to be smashed against bracket
This is what cljfmt wants:
(defn foo
[{:keys [aa
;; bb
]:as context} ; whitespace problem here
But obviously a space is wanted before the :as
.
This is an important problem because it's common that a map key (eg, bb
) is no longer used but should still be listed since a future developer want to see that bb
is/was indeed a usable piece of the inputs.
Can you provide the "before" code as well?
I can reproduce this with default options:
(defn foo
[{:keys [aa
;; bb
] :as context}]
(foobar))
(defn foo
[{:keys [aa
] :as context}]
(foobar))
formats to:
(defn foo
[{:keys [aa
;; bb
]:as context}]
(foobar))
(defn foo
[{:keys [aa] :as context}]
(foobar))