Fork me on GitHub
#clj-kondo
<
2022-10-03
>
borkdude20:10:33

I'm aiming for a new release on Wednesday. If you can, take a look at these changelogs and try out the master version: https://github.com/clj-kondo/clj-kondo/blob/master/CHANGELOG.md#unreleased There are a couple new interesting linters in there.

🎉 2
Noah Bogart20:10:31

what's the best way to run master as my primary "clj-kondo"?

borkdude20:10:49

@UEENNMX0T do you mean, in your editor or in CI / command line?

Noah Bogart20:10:37

command line, as that's simplest and I rely on clj-kondo bundled with clojure-lsp in my editor

borkdude20:10:09

I run clj-kondo separately from clojure-lsp in my editor so I can always run the latest (this is especially convenient when developing clj-kondo)

👍 1
borkdude20:10:22

to get the master version, you could just download it from CI

borkdude20:10:33

or build it yourself

borkdude21:10:50

let me know if you have any questions about this

👍 1
Noah Bogart21:10:29

I forgot that CI builds the artifacts, so I've downloaded one

Noah Bogart21:10:48

Found one thing, I'll thread it

Noah Bogart21:10:58

$ echo "(defn a ([b] (inc b)))" | ~/Downloads/clj-kondo-2022.09.09-SNAPSHOT-linux-static-amd64/clj-kondo --lint - --config '{}'
<stdin>:1:1: error: clojure.core/defn is called with 2 args but expects 3 or more
linting took 6ms, errors: 1, warnings: 0

borkdude21:10:24

Could you submit an issue for that?

👍 1
borkdude21:10:30

Thanks for finding it

borkdude21:10:05

This was already an issue with the previous release?

Noah Bogart21:10:58

Yeah, it seems so. I ran it with master, then ran it with latest release. Doesn’t happen with 2022.08.03

borkdude21:10:14

ok, good to know, thanks

Noah Bogart15:10:41

i feel foolish, this was a cache issue. Looks like even tho I was relying on --config {}, i should have said --cache false to ensure a clean slate. Running this in other directories shows the error isn't happening.

borkdude15:10:10

ok, so the issue can be closed?

Noah Bogart15:10:17

Yeah, I closed the issue already, posted a similar message there

borkdude15:10:43

One thing less for me to do tomorrow :)

🎉 1
lilactown23:10:11

I'm trying to run a script I wrote in clojure that uses kondo's analysis in CI. I'm wondering if anyone has any tips for tuning it? I'm running into an issue where if I set the max heap size to 1g or under, I get the following:

{:clojure.main/message
 "Execution error (OutOfMemoryError) at clj-kondo.impl.core/format-vars$fn (core.clj:564).\nGC overhead limit exceeded\n",
 :clojure.main/triage
 {:clojure.error/class java.lang.OutOfMemoryError,
  :clojure.error/line 564,
  :clojure.error/cause "GC overhead limit exceeded",
  :clojure.error/symbol clj-kondo.impl.core/format-vars$fn,
  :clojure.error/source "core.clj",
  :clojure.error/phase :execution},
however if i set the heap higher, e.g. 2g, it gets killed by the host
=> Analyzing sources: ["/home/circleci/app"] ..../util/mulch.sh: line 5: 18171 Killed                  clojure -J-Xmx2g -Sdeps "$DEPS" -M util/mulch/main.clj "$@"

lilactown00:10:11

this is with :analysis true, which i'm guessing is what's generating all the memory

borkdude06:10:36

It’s probably best to batch only 10 or 100 (variable, try) dirs or jars at a time

borkdude06:10:58

This is what lsp also does