Skip to content

Commit 033d19c

Browse files
committed
CLJS-2889: Improve sorting on problem printing
1 parent 2f73857 commit 033d19c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/cljs/cljs/spec/alpha.cljs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,9 @@
217217
"Default printer for explain-data. nil indicates a successful validation."
218218
[ed]
219219
(if ed
220-
(let [problems (sort-by #(- (count (:path %))) (::problems ed))]
220+
(let [problems (->> (::problems ed)
221+
(sort-by #(- (count (:in %))))
222+
(sort-by #(- (count (:path %)))))]
221223
(print
222224
(with-out-str
223225
;;(prn {:ed ed})

0 commit comments

Comments
 (0)