This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-11-27
Channels
- # announcements (2)
- # babashka (60)
- # beginners (73)
- # calva (23)
- # cider (2)
- # clj-kondo (19)
- # cljs-dev (31)
- # clojure (29)
- # clojure-berlin (1)
- # clojure-europe (6)
- # clojure-nl (17)
- # clojure-spec (21)
- # clojure-uk (15)
- # clojurescript (54)
- # core-async (48)
- # cursive (35)
- # datomic (12)
- # emacs (12)
- # fulcro (66)
- # graalvm (3)
- # graphql (16)
- # jackdaw (1)
- # malli (1)
- # off-topic (11)
- # pedestal (4)
- # re-frame (10)
- # reitit (1)
- # rewrite-clj (8)
- # ring-swagger (8)
- # shadow-cljs (14)
- # spacemacs (2)
- # vim (5)
@lvbarbosa Well, it’s certainly doable as evidenced by the tools that exist. I think today you have 3 options - clj-kondo, clojure-lsp and clj-refactor. I like kondo, as it doesn’t require any extra setup from me, but I’ve heard good things about clojure-lsp
and clj-refactor
. Unused vars are not hard to implement in CIDER itself, I just never had the time for this.
Might be a nice experiment. bozhidar: do you think it's possible without any additional elisp? I looked at squiggly-clojure and it provides an elisp package
We’ll also need a bit of Elisp for the UI, but that should be trivial. It’d be really great if we had something like squiggly-clojure for kondo, that’s using middleware instead of just evaluating code, so it would return data that’s optimized for the Elisp clients. That can expand the usefulness of kondo to more than linting - e.g. you can directly expose the data needing for find-usages, bake project integration, etc.
Gotcha... I am scheduling some time for myself in the future to study Clojure tooling internals. I might be able to contribute afterward
Couldn't we make clj-kondo in Emacs rely on projectile's notion of projects to perform linting? Or maybe make clj-kondo project.clj aware?
How slow is it to have clj-kondo do full project linting? We talking unbearably slow? Or, won't really notice slow?
Depends on how large your classpath is. Clj-kondo lints some projects in CI: clojure itself, clojurescript itself + some libs, this takes about 10 seconds
Hum.. does IntelliJ and co achieve better speed by being long lived process? As I understand, kondo would do a full lint all the time. But I think IntelliJ for example keeps a full AST of Java at all times and as things are changed, it partially update that AST and only perform analysis related to the changes.
yes, it's the difference between a server that can accumulate state and a binary which is invoked once and lives very shortly.
but if clj-kondo is invoked as a library in a cider middleware you could achieve the same effect probably
Great info!