Skip to content

Conversation

@jamesreprise
Copy link
Member

We've overridden the default report functionality that Clojure's clojure.test namespace provides to print more easily readable values, especially when those values are maps.

@jamesreprise jamesreprise self-assigned this Nov 7, 2025
(defn -main [& args]
(assert (string? (first args)) (print-str "first argument must be a string, got" args))
(let [the-ns (-> args first symbol)]
(println "testing" the-ns)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is redundant, see that pretty-report for :begin-test-ns already does this.

INFO: From Testing //test:clj_kondo_test.test:
==================== Test output for //test:clj_kondo_test.test:
testing clj-kondo-test

Testing clj-kondo-test

@jamesreprise jamesreprise marked this pull request as ready for review November 7, 2025 11:09
(zero? (:error test-report)))
(System/exit 0)
(System/exit 1)))
(binding [c.test/report pretty-report]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The clojure.test namespace advises rebinding report to achieve this functionality. https://github.com/clojure/clojure/blob/master/src/clj/clojure/test.clj#L211-L212

Comment on lines -7 to -14
(def old-handler
(Signal/handle
(Signal. "TERM")
(reify SignalHandler
(handle [_ signal]
(run! println (.dumpAllThreads (ManagementFactory/getThreadMXBean) true true))
(when-not (#{SignalHandler/SIG_DFL SignalHandler/SIG_IGN} old-handler)
(.handle old-handler signal))))))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This didn't appear to be used anywhere.

@jamesreprise jamesreprise merged commit f647a23 into main Nov 7, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants