This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-04-11
Channels
- # announcements (3)
- # asami (4)
- # babashka (79)
- # babashka-sci-dev (47)
- # beginners (97)
- # biff (12)
- # calva (7)
- # clj-commons (3)
- # clj-kondo (22)
- # clj-on-windows (13)
- # cljdoc (31)
- # cljfx (2)
- # cljs-dev (1)
- # clojure (85)
- # clojure-austin (4)
- # clojure-dev (12)
- # clojure-europe (15)
- # clojure-italy (8)
- # clojure-nl (4)
- # clojure-uk (4)
- # community-development (19)
- # conjure (3)
- # core-typed (40)
- # cursive (9)
- # datahike (21)
- # datomic (1)
- # emacs (7)
- # exercism (2)
- # graalvm (20)
- # graphql (1)
- # honeysql (16)
- # jobs (1)
- # malli (2)
- # off-topic (3)
- # pathom (28)
- # pedestal (3)
- # polylith (7)
- # reitit (14)
- # releases (1)
- # remote-jobs (1)
- # rewrite-clj (4)
- # shadow-cljs (21)
- # sql (21)
- # testing (8)
- # tools-deps (23)
- # vscode (8)
- # xtdb (38)
hey michiel, have you thought at all about adding "auto-correct" to clj-kondo?
i follow the rubocop releases and they flag certain lints as being able to auto-correct issues, and then also flag certain auto-correctable lints as "unsafe" (potentially changing meaning), and then i spent the weekend thinking about how exactly that might be done with clj-kondo lol
clj-kondo does not auto-correct issues, but it does give precise locations and information so other tools can be built on top which do so, e.g. clojure-lsp has a ton of stuff
this way I can focus on the linting + analysis and don't spend a ton of time on "hey, it doesn't auto-correct correctly, my build is broken" issues
https://github.com/borkdude/carve is another example
(more stuff here: https://github.com/clj-kondo/clj-kondo/issues/836)
thank you! so glad and excited to contribute, which is one of the reasons i've been thinking about this stuff
Congrats for the contribution too :) I saw the PR and I always wondered, what is the recommended way? Does clojure style guide mentions that anywhere? I personally prefer not using keywords but I know clj-kondo itself uses a lot that, so not sure it's just a personal preference
alex miller said that it was originally allowed to handle namespaced keywords but once they got that working with ::keys
, it's not the preferred method by the core team, which is good enough for me! i don't think the style guide says anything about it one way or the other
I'm fine with abandoning that style forever, now that I'm not working together anymore with someone who did that all over the code base. It's something I got infected by :)
I didn't even know :keys [:a :b] worked. I could swear the spec for defn doesn't allow it/
I actually don't use a lot of "auto-correct" stuff myself, usually do it manually
You should try "add missing require" code actions @borkdude is the one I most use for sure :)
that one is great, I use it multiple times a day. love to type out (str/join ", ")
and then have it added automatically