Hello! Does clj-kondo work with requires inside reader conditionals? I'm getting various unresolved namespace warnings for this reason
sorry for losing my attention on this one, I'll try now
ah, the issue is that in .cljc files it expects to also have clojurescript when not inside a reader conditional
you can configure this with {:cljc {:features [:clj]}} to only lint clj code in .cljc files (it doesn't know about bb)
Ah, thanks for the tip!
Can you make a repro example?
Yes I'll try gimme a sec
#!/usr/bin/env bb
(require
'[clojure.string :as str]
'[babashka.http-client :as http])
#?(:bb
(do
(require '[babashka.pods :as pods])
(pods/load-pod 'org.babashka/buddy "0.3.4")
(require
'[pod.babashka.buddy.core.nonce :as nonce]
'[pod.babashka.buddy.sign.jwe :as jwe]))
:clj
(do
(require
'[buddy.core.nonce :as nonce]
'[buddy.sign.jwe :as jwe])))
(def key32 (nonce/random-bytes 32))
(def data (nonce/random-bytes 1024))
(def message (jwe/encrypt data key32))
(println message)That should do it
see the jwe/encrypt line warning