This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-05-26
Channels
- # announcements (2)
- # babashka (55)
- # beginners (107)
- # calva (65)
- # cider (5)
- # clara (4)
- # clj-kondo (17)
- # cljs-dev (38)
- # cljsrn (16)
- # clojure (117)
- # clojure-australia (8)
- # clojure-europe (13)
- # clojure-italy (4)
- # clojure-nl (5)
- # clojure-provo (2)
- # clojure-sweden (9)
- # clojure-taiwan (1)
- # clojure-uk (41)
- # clojurescript (40)
- # code-reviews (1)
- # conjure (40)
- # cursive (4)
- # datomic (11)
- # events (2)
- # fulcro (33)
- # graalvm (1)
- # jobs (2)
- # jobs-discuss (19)
- # lsp (18)
- # off-topic (58)
- # polylith (2)
- # quil (2)
- # react (28)
- # reagent (35)
- # reitit (3)
- # remote-jobs (1)
- # ring (9)
- # sci (76)
- # shadow-cljs (19)
- # sql (10)
- # testing (5)
- # vim (13)
- # xtdb (5)
hi, is it possible to somehow exclude unused namespace/unused referred var warnings just for a certain namespace , we use mount and have a core ns that refers to a few to ensure they load , so would like to exclude these warnings just in that ns
@d5p How exactly are you requiring those namespaces? What exact syntax are you using?
I think that if you (:require [some.namespace])
like that rather than (:require some.namespace)
that clj-kondo won't warn about it being otherwise unused?
(ns taskmanager.core
(:require [taskmanager.batch.alerts :refer [task-alert-consumer]]
[taskmanager.batch.batch :refer [batch-task-consumer incoming-batch-task-consumer]]
[taskmanager.config :refer [project config]]
[taskmanager.http :refer [http-server]]
[taskmanager.db :refer [*db*]]
[taskmanager.redis-client :refer [*redis-client*]]
[taskmanager.queue :refer [sqs-buffered-client]])
(:gen-class))
Because you're not using any of the referred symbols?
Take the :refer
's out.
if you're not using the symbols that is why you're getting warnings.
ha , was hoping it would be something dumb and easy, and can’t get easier than that! been explicitly referring the states for years and never really thought about it, thanks!
In hooks, what is the rationale for dealing with the clj-rewrite structures instead of taking and returning raw Clojure forms? Is is just for performance? Not complaining or anything, just thinking about linting Convex Lisp (very similar to Clojure) and wondering about what you really gain by keeping that kind of AST.
when I wrote the hooks stuff, I did try to make it look like normal macroexpansion, but this didn't work out as you would lose too much location information, e.g. when you transform a body that contains numbers, strings, etc
Now that you mention it, it's true there is quite a lot you could loose by using sexprs only, depending on use case 👍