clj-kondo

Andreas 2026-04-01T16:36:08.658869Z

I have the following code

(ns math
  (:require #?(:cljs [cljs.math :as math]
               :clj [clojure.math :as math])))

(def fabs #?(:cljs math/fabs
             :clj nil))
clj-kondo complains that "#'cljs.math/fabs is private" which it is not. Do I need to configure something or where is my mistake?

✅ 1
seancorfield 2026-04-01T18:49:20.039529Z

Also, you could just do (ns math (:require [clojure.math :as math])) -- no need for a conditional there (true of most clojure.* nses that are "baked in").

Andreas 2026-04-02T15:39:12.483399Z

Sorry, now I see it. I stopped reading at "(defn fabs" picard-facepalm Thanks.

dgr 2026-04-01T18:54:37.567249Z

Getting an odd “info” warning from clj-kondo: “Format string contains no format specifiers.” But when I look at the location in the file, it’s just:

(printf "All solutions tabu. Overriding tabu.")
There’s no format string. It’s just a string to be printed with printf .

✅ 1
2026-04-01T18:55:39.162889Z

printf is (print (apply format ...)), which expects a format string with arguments

dgr 2026-04-01T18:56:37.573809Z

Ugh! Right. I had meant to write println, not printf , and my brain looks at that line and sees println. Thanks.

👍 1
dgr 2026-04-01T18:57:11.425539Z

Yep, that fixed it.

2026-04-01T18:57:24.817339Z

glad to help