This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-01-21
Channels
- # announcements (8)
- # babashka (12)
- # beginners (18)
- # biff (25)
- # calva (8)
- # clj-kondo (19)
- # clojure (53)
- # clojure-europe (3)
- # clojure-norway (3)
- # clojurescript (31)
- # emacs (9)
- # fulcro (12)
- # lsp (25)
- # membrane (1)
- # off-topic (58)
- # pathom (11)
- # pedestal (1)
- # proletarian (3)
- # re-frame (6)
- # releases (2)
- # shadow-cljs (7)
This form triggers “redundant-fn-wrapper” on clj-kondo v2022.12.08
, and I can’t see why… anyone have a clue?
(let [nsm {}]
(fn [sym]
`(.println
(RT/errPrintWriter)
~(nsm sym))))
I wrote that one. Which part of the form is marked as a violation?
you wrote that one? ;) https://github.com/search?q=repo%3Aclj-kondo%2Fclj-kondo+redundant-fn-wrapper&type=commits
I think the issue may be that only the code in the unquote is analyzed and the redundant-fn-wrapper isn't aware of the syntax-quote in between
Oops, you’re right, I merely extended it to keywords.
I’m not at a computer to write the issue but i can take a crack at the fix on Monday
@U017QJZ9M7W Could you post an issue about this?
yes, will do!
one more Q for you… I found the following in test.chuck
:
(defn ^:private scalb
[x exp]
#?(:clj (Math/scalb ^double x ^int exp)
:cljs (* x (.pow js/Math 2 exp))))
but the linter reports
src/com/gfredericks/test/chuck/generators.cljc:228:25: error: Unresolved symbol: double
because of this at the top:
(:refer-clojure :exclude [double])
is that correct? should the hint be
(defn ^:private scalb
[x exp]
#?(:clj (Math/scalb ^clojure.core/double x ^int exp)
:cljs (* x (.pow js/Math 2 exp))))
I had thought that those primitive type hints did NOT have to do with the function names in clojure.core.