Skip to content

Commit

Permalink
CLJS-2889: Improve sorting on problem printing
Browse files Browse the repository at this point in the history
  • Loading branch information
mfikes committed Sep 7, 2018
1 parent 2f73857 commit 033d19c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/cljs/cljs/spec/alpha.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,9 @@
"Default printer for explain-data. nil indicates a successful validation."
[ed]
(if ed
(let [problems (sort-by #(- (count (:path %))) (::problems ed))]
(let [problems (->> (::problems ed)
(sort-by #(- (count (:in %))))
(sort-by #(- (count (:path %)))))]
(print
(with-out-str
;;(prn {:ed ed})
Expand Down

0 comments on commit 033d19c

Please sign in to comment.