This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-09-03
Channels
- # announcements (3)
- # asami (4)
- # aws (1)
- # babashka (22)
- # beginners (111)
- # calva (3)
- # cider (1)
- # clj-kondo (55)
- # clj-on-windows (9)
- # cljsrn (1)
- # clojure (13)
- # clojure-europe (35)
- # clojure-losangeles (3)
- # clojure-nl (2)
- # clojure-norway (2)
- # clojure-spec (2)
- # clojure-uk (5)
- # clojurescript (51)
- # conjure (5)
- # cursive (5)
- # datascript (1)
- # datomic (27)
- # deps-new (8)
- # depstar (41)
- # emacs (4)
- # fulcro (24)
- # graphql (4)
- # gratitude (8)
- # helix (36)
- # jobs (2)
- # leiningen (2)
- # lsp (11)
- # off-topic (24)
- # pathom (23)
- # pedestal (2)
- # polylith (27)
- # re-frame (12)
- # reagent (7)
- # reitit (1)
- # releases (3)
- # remote-jobs (1)
- # rewrite-clj (4)
- # sci (1)
- # shadow-cljs (27)
- # spacemacs (12)
- # tools-deps (31)
- # web-security (2)
Iām using https://github.com/hyperfiddle/rcf to write some inline tests, and iād like to have :skip-comments
also apply to the tests
blocks. is that possible?
oh, nevermind me, this is accomplished by :lint-as
i had mispelled something š¬
yeah! every day iām pleasantly surprised by how powerful clj-kondo is
Hey @borkdude do you have a recommended way to build graalvm images? The way I did it a while back was cambada, but I don't know if that's really recommended anymore.
@suskeyhose do you mean for clj-kondo?
clj-kondo does it with that custom compile script I saw. I'm looking to do a graal distribution of the formatter I'm getting started working on though.
@suskeyhose I recommend doing it like this: https://github.com/borkdude/jayfu As this will work on all platforms
I'll definitely take a look. In an ideal world here I'd be able to make it a part of my build.clj, but we'll see if that ends up actually being achievable.
yeah I think you can also do that, but other than building the uberjar I don't think there is any other benefit to build.clj and building the uberjar already works well without build.clj
Yeah, I'm just trying it out for the first time to see how it feels.
and you'll still need to install the clojure CLI on the three platforms (including Windows) to make that run
Yeah, that's true
the built-in clojure runner is the same as the official Clojure CLI (or at least, it should be)
Hi channel! Wondering if anyone can give me any tips on ignoring function args with clj-kondo? I have found the :exclude-destructured-keys-in-fn-args
doc which helps for maps but I'm hoping to find this for normal fn args as well. In particular for multimethods but would be nice to know how to do it system wide too.
What exactly do you mean? Do you mean disabling the :unused-binding
warning on function arguments?
In general there are comment forms you can use to disable particular lints for certain forms. Like this:
(defmulti some-multimethod
(fn #_{:clj-kondo/ignore [:unused-binding]}
[a b c]
(keyword a b)))
This won't emit a warning for c
being unused.Also @borkdude is that something we'd want to consider as a lint config in general? Like is there a reasonable way to ignore unused bindings for function arguments that are defmulti dispatch functions in particular?
Since generally you wouldn't want the arglist to report that the name of an arg starts with _, since implementations probably use it.
I'd like to not have to add inline comments all over but be able to just say for multimethods ignore unused arguments
The other thing that I'd consider doing in some cases is to include the :arglists
metadata on your functions. That one can have whatever you want in it and isn't linted.
Although I don't know if that works on multimethods.
It doesn't support ignoring unused arguments only in multimethods atm. I was just asking borkdude if that was something feasible to be added.
@jon693 Ah there is an issue for it: https://github.com/clj-kondo/clj-kondo/issues/1188
I proposed a solution there and marked the issue as PR welcome, if anybody wants to have a stab at it.
Oh, I didn't realize the thumbs up is an actual upvote. Do I do that on the initial description?
Github allows you to sort by emoticon, which is weird, but that's their only option currently
I'm in the boat with everybody š Agreed on GH lacking a bit though. I've been exploring actions for more custom issue and project automation. It's aight
While you're here, random question, do you know of a way in emacs with cider to accept clj-kondo suggestions? In particular removing unused imports? Or if not in emacs a way to do that in a script or something
it builds on the clj-kondo analysis so it knows all about the linting and how to deal with the warnings, you get navigation for free, etc
@ericdallo can tell you more in #lsp where to start. if you install clojure-lsp then you don't need a separate clj-kondo binary installed
Hey š @jon693 Check https://clojure-lsp.io/features/, any issues/questions, feel free to ask in #lsp :)
Thanks @ericdallo, this looks awesome! Gonna try and dig in later and will circle back if I have questions.