This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-04-14
Channels
- # aleph (2)
- # announcements (11)
- # aws (4)
- # babashka (42)
- # babashka-sci-dev (81)
- # beginners (90)
- # biff (2)
- # calva (40)
- # cider (16)
- # clj-kondo (26)
- # clj-on-windows (1)
- # cljdoc (4)
- # cljfx (1)
- # cljsrn (2)
- # clojure (92)
- # clojure-austin (2)
- # clojure-europe (23)
- # clojure-nl (5)
- # clojure-uk (3)
- # clojured (3)
- # clojurescript (19)
- # community-development (3)
- # conjure (1)
- # cursive (4)
- # datalevin (3)
- # datomic (5)
- # emacs (13)
- # events (1)
- # fulcro (26)
- # graphql (1)
- # hugsql (15)
- # introduce-yourself (5)
- # leiningen (1)
- # lsp (29)
- # minecraft (19)
- # music (1)
- # off-topic (36)
- # pathom (12)
- # podcasts (2)
- # portal (8)
- # re-frame (12)
- # reagent (11)
- # rewrite-clj (4)
- # shadow-cljs (56)
- # spacemacs (2)
- # vim (12)
- # windows (3)
- # xtdb (43)
Hello! Is there a way to print the final configuration that clj-kondo uses? Or is there a sample config.edn somewhere with all the default values?
This default is in clj-kondo’s repo in impl/config.clj. Also see linters.md for all linters + defaults.
Excellent, thank you.
Is this a typo? https://github.com/clj-kondo/clj-kondo/blob/320ee3f3c158b66eed36dcbc314fbd70b47ed9e2/src/clj_kondo/impl/config.clj#L45=
Should :simple-libspec
be inside the map?
Has any thought been given to separating "parsing the code to an AST" and "linting the code"? I noticed that they're intertwined currently.
i would be willing to help out if this is desirable
i had a feeling that was the case. have you experimented at all with separating them into two passes? Does that degrade performance by a lot?
when I initially wrote clj-kondo I had multiple passes and discoverered that a single pass was much better for fast responses
yes but you have done a lot of good work adding relevant data to the naive ast
if you are looking for stuff to help with, take a look at the project: https://github.com/clj-kondo/clj-kondo/projects/1
I was more thinking about ways to make lints standalone: an object or function that can be registered as working on some ast form, so that if i wanted to write a new lint, I wouldn't have to dig through the code to find the one spot where clj-kondo handles that ast, i could just say something like:
(reg-linter! {:ast-nodes [clojure.core/cond] :name :even-forms :lint-fn (fn [ctx bv] (odd? (count (:children bv)))})
or something similaroh cool, i haven't seen that project page. i'll take a look, see if there's anything i can help with
my thought with bringing all of this up is that if the barrier for entry is lower, more people might contribute new lints (like I did recently), which I think is a net good overall
There's also this sorting of issues: https://github.com/clj-kondo/clj-kondo/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc
I continue to have major ❤️ for clj-kondo. I just upgraded to the newest version and a new linter said, “Hey, buddy, this looks a little off, maybe?”
src/rewrite_clj/reader.cljc:242:11: warning: Prefer placing return type hint on arg vector: Closeable
linting took 4710ms, errors: 0, warnings: 1
Just bumped clj-kondo for cljdoc: https://github.com/cljdoc/cljdoc/commit/50aa3f88163256068cdbca259f12492c94ebb4bf