This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-03-17
Channels
- # announcements (45)
- # asami (30)
- # babashka (96)
- # beginners (24)
- # calva (43)
- # chlorine-clover (3)
- # cider (10)
- # clj-kondo (45)
- # cljdoc (10)
- # cljs-dev (2)
- # clojars (5)
- # clojure (139)
- # clojure-australia (5)
- # clojure-europe (53)
- # clojure-filipino (1)
- # clojure-germany (27)
- # clojure-nl (4)
- # clojure-provo (7)
- # clojure-serbia (6)
- # clojure-spain (1)
- # clojure-uk (8)
- # clojuredesign-podcast (8)
- # clojurescript (76)
- # code-reviews (6)
- # conjure (4)
- # core-async (1)
- # cursive (73)
- # data-oriented-programming (2)
- # data-science (3)
- # deps-new (4)
- # depstar (7)
- # docker (16)
- # duct (7)
- # events (1)
- # fulcro (13)
- # girouette (1)
- # graphql (4)
- # honeysql (11)
- # jobs (2)
- # joker (1)
- # kaocha (4)
- # leiningen (5)
- # malli (11)
- # off-topic (14)
- # other-languages (1)
- # pedestal (4)
- # practicalli (1)
- # re-frame (5)
- # reagent (3)
- # releases (2)
- # remote-jobs (7)
- # shadow-cljs (12)
- # sql (24)
- # startup-in-a-month (2)
- # tools-deps (99)
- # vim (8)
- # vscode (1)
- # xtdb (28)
I joined just now to express my enormous appreciation for this library and how easy it's making my life. Thanks Michiel!
Has anyone gotten orchestra.core/defn-spec
to work? I've seen some chatter about it on here, and it seems like you should just be able to do the following:
{:lint-as {orchestra.core/defn-spec clj-kondo.lint-as/def-catch-call}}
But that didn't work. @jfntn, did you ever get this working?I'm on clj-kondo v2021.02.13
Much obliged, thank you
I'm on Spacemacs and I have the correct config AFAICT. It's still giving me "unresolved symbol."
@alex.joseph.whitt def-catch-all
, not def-catch-call
That was it! That'll teach me to copy-paste without double checking
@borkdude, is it still expected that references to the defn-spec'd function would show "Unresolved var" warnings? Or should that work too?
You will need to re-visit your other buffer though in order for the cache to pick up your new vars
Might it make a difference that the var is in a local dependency lib through :local/root
?
Oddly it only shows up on one reference in the file, while other references to the same var don't complain
if you edit a local/root dep, that info doesn't end up in your project's cache, but in the other project's cache
Thank you!
So I would have to re-run that to pick up changes in the dep, then?
Alright, understood. I'm glad this all works.
you can also just lint clj-kondo --lint ../../the-other-local-root/whatever
to update
For a code like:
(defflow my-flow
....)
I want to know if the my-flow
is defined-by defflow
My issue: I implemented on clojure-lsp the :exclude-when-defined-by
on its custom linter https://clojure-lsp.github.io/clojure-lsp/settings/#unused-public-var, but it seems it doesn't work since clj-kondo don't send the defined-by
for other symbols than deftest
what info do you actually want to have: - IF it was defined by something custom? - Or which thing it defined?
which thing it defined, so we could compare with the provided exclude setting from user
We already have that for deftest, I think is just make it work for other macros/functions ?
@borkdude I started to implement that, is there any way to get the namespace and the symbol of the var on https://github.com/clj-kondo/clj-kondo/blob/master/src/clj_kondo/impl/analyzer.clj#L427?
I only found call
https://github.com/clj-kondo/clj-kondo/blob/master/src/clj_kondo/impl/analyzer.clj#L433 that only have the symbol name, not the ns