This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-10-04
Channels
- # aleph (10)
- # announcements (2)
- # babashka (2)
- # beginners (101)
- # calva (17)
- # cider (11)
- # clara (6)
- # clj-kondo (25)
- # cljsrn (33)
- # clojure (181)
- # clojure-dev (15)
- # clojure-europe (3)
- # clojure-italy (4)
- # clojure-nl (8)
- # clojure-uk (22)
- # clojurescript (111)
- # clojutre (58)
- # cursive (31)
- # data-science (1)
- # datomic (10)
- # emacs (6)
- # ethereum (1)
- # fulcro (20)
- # graalvm (3)
- # jackdaw (5)
- # leiningen (5)
- # off-topic (31)
- # re-frame (2)
- # reitit (10)
- # shadow-cljs (9)
- # spacemacs (16)
- # sql (8)
- # tools-deps (16)
- # vim (17)
I hope to find some time to see if I can write an nrepl middleware that can start clj-kondo in-process. FWIW
@pez nice! I enjoyed the interview with you on the ClojureScript podcast btw. good work!
One alternative for Windows users could also be to use the Docker build. But I wonder if WSL/WSL2 isn't a better fit if you go that way maybe.
Thanks! It was recorded in May or something, so a lot has happened since. 😃 But still this linter feature that I'd really like to make it easier to use, while also letting Clojure Lint handle the actual integration of the linter and VS Code.
Yes, I think WSL works. But I want it to work without all that. 😃 I want it to be a no-install when using Calva. So Calva would bundle Clojure Lint, and linting would just be there, is where I want things to be. Not sure I'll be able to get there, but I'll give it a try before I stop dreaming about it.
I think that it might be a usable general pattern to have nrepl start Clojure tools that the editor integrations need.
clj-kondo v2019.10.04-alpha https://github.com/borkdude/clj-kondo/releases/tag/v2019.10.04-alpha
I have a next core.match code which triggers an error in clj-kondo: (match [(-> description :status keyword)] [:SUCCEEDED] {:status :SUCCEEDED :customer_id (parse-customer-id description)} [:RUNNING] {:status :RUNNING} [(:or :FAILED :TIMED_OUT :ABORTED)] {:type :internal-server-error :message (:aws-step-function/failed error/keywords)}) The problem is (:or :FAILED :TIMED_OUT :ABORTED) which causes “error: keyword :or is called with 3 args but expects 1 or 2”. That part is core match spesific syntax. Is there way to suppress error in this case?
You rule!
Great, i am putting this as a comment in the PR also for a reminder.
@heikki.hamalainen There is: https://github.com/borkdude/clj-kondo/blob/master/doc/config.md#exclude-arity-linting-inside-a-specific-macro-call I'm in a meeting right now, so I'll be able to give more info later.
Is there an option to disable if
Missing else branch.
warning?
Nope, existing codebase has 600 of these warnings and I don't agree that when
should be used if there is only then
branch and if
when there are both then
and else
. (I think when
is useful for side-effects)
@juhoteperi yes: {:linters {:if {:level :off}}}
Ah thanks. Is there list of linter keys somewhere? This option isn't listed in the docs, but I guess not all linter need to be listed, if they only have level option.
... yes, config doc mentions all the keys are listed in default config 🙂
yeah, it's in clj-kondo.impl.config.clj... could do better there, but I guess you can find it 🙂
Btw, I've been collecting ideas for linters while reviewing code recently: https://gist.github.com/Deraen/85ab85a626844a4142cc5754484adae4 maybe some of these make sense?
@juhoteperi I've just read them. Although I think they're interesting, probably not everyone will agree with these linters, which is OK, but like you are now experiencing with if, people will have to turn off the linter in existing code, etc. What you can also do is create issues for these linters and over time these could collect feedback and if there is a clear desire from the community to have specific ones, we can choose to implement them.