Fork me on GitHub
Ahmed Hassan04:10:11

Can't we configure clj-kondo to flag some word or regex? this can flag TODO, FIXME kind of words.


Btw I remember that you once used babashka for a lot of requests with bb curl right? And this created too many processes on your machine


There is now also org.httpkit.client built in which is also async

Ahmed Hassan21:10:07

Yeah, that was missing piece of bb, I can't thank you enough for everything you're doing for community.

Mikko Harju06:10:50

Hi! What would be the best way to lint a "let-like" macro that has the following signature:

(m/dynamic-let <var> <let-declarations> <body>)

Mikko Harju06:10:40

I mean, I can just ignore the unresolved symbols altogether, but I'm interested if I could somehow piggyback on the let-declaration to get linting on the body based on the let-declarations.

Mikko Harju06:10:58

It doesn't work directly as I have one parameter before the let declarations


@U32ST9GR5 lint as Clojure.core/fn?

Mikko Harju06:10:32

😮 of course!

Mikko Harju06:10:16

Ah – a minor caveat...

Mikko Harju06:10:51

(m/let-dynamic dynamic-sub
  [data (if sub (re/subscribe sub) (atom nil))

Mikko Harju06:10:12

that does not work since fn cannot have dynamic declarations... Close but no cigar 🙂


Ah. You can write a hook for it then, or suppress the unresolved symbols

Mikko Harju06:10:30

I'll dig into the hooks, thanks for the tip!

Mikko Harju13:10:41

@U04V15CAJ fixed this with a hook, was very easy. Found a couple of typos in hooks docs, sent a PR to fix them. Thanks!


{:keys [:node]}
isn't a typo though, it's well supported


huh, TIL

Mikko Harju16:10:01

Same for me. TIL.

Mikko Harju17:10:13

Fixed the PR to contain just the path change.


Merged, thanks


is there anything around that uses clj-kondo to generate a static callgraph given a codebase?


and btw I noticed that both clj-kondo and clindex in their analysis return var, but don't know anything about functions for example


is that a limitation of the underlying analysis library I guess?


not sure what you mean with "don't know anything about functions" but the above library utilizes clj-kondo for making callgraphs, so yes, it's possible


I mean that you get var-definitions and var-usages, but I could not see how to say if a var referred to a function


or something else, only macros were distinguished from what I could see


@andrea.crotti How do you think carve does this?


yeah I looked at carve as well


but I can't really see that it distinguishes between variables and functions


but it probably just doesn't need to


ah now I see what you mean


I think if there is no arity information, it's not a function - maybe


ah ok yeah that already helps