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?It is private: https://github.com/clojure/clojurescript/blob/c4295f303100bbf5afac449242d30bca1126f1a1/src/main/cljs/cljs/math.cljs#L188
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").
Sorry, now I see it. I stopped reading at "(defn fabs" picard-facepalm Thanks.
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 .printf is (print (apply format ...)), which expects a format string with arguments
Ugh! Right. I had meant to write println, not printf , and my brain looks at that line and sees println. Thanks.
Yep, that fixed it.
glad to help