Fork me on GitHub
#clj-kondo
<
2022-08-31
>
sheluchin13:08:47

Does clj-kondo include any functions that it uses for parsing file contents according to the usage/definition information (`row`, col, etc.) returned by the kondo's analysis? I'd like to get file contents as a collection of its constituent parts and thought there might be something in the code base for it already.

sheluchin14:08:00

@U04V15CAJ thanks, that's a start. As an aside, has there been any discussion about doing deeper function call argument analysis?

borkdude14:08:43

define what you mean by this please

sheluchin15:08:32

For example, for functions taking kwargs, analyse which kwargs are being used in their calls. Or to take it one step further, if a particular argument can be any of a set of static values (boolean, keyword, etc.), do analysis to check which static values are being passed. Does that make sense?

borkdude15:08:52

There is also a bit of that in clj-kondo for type checking, but are you asking for this to be exposed in the exported analysis?

sheluchin15:08:55

Yeah, I'm interested in getting a distribution of the ways that some given function gets used.

sheluchin15:08:41

Arities is the first step, so I'm wondering if there's been any discussion about exposing deeper analysis of that type.

borkdude15:08:10

I don't think there were any discussions about this before

sheluchin15:08:39

Okay, thanks. I'll ponder it some more. I think there could be some use to it but maybe it's too niche if it hasn't been touched on previously.

borkdude15:08:32

What are you building again? Something public? :)

sheluchin15:08:07

Not quite public yet, but will be soon. I'm building a Clojure code explorer. Largely powered by clj-kondo. The idea is to make it easy to see how libraries are being used in the wild by connecting analysis of publicly available libraries. A learn-by-example thing.

borkdude15:08:48

Cool! This is exactly the thing I was describing at the end of my cognicast interview. Did you pick up the idea there or came up with it independently?

borkdude15:08:13

I wanted to make a clj-kondo-based crossclj (a service that used to be available)

borkdude15:08:30

But as I am doing a lot of other things, I never found time for it, so I'm happy you're doing it :)

sheluchin15:08:31

Came up with it independently. I haven't check out the interview but now I must.

sheluchin15:08:41

It's a fun little project so far. It's nice when I can use the project to help me build the project šŸ™‚ crossclj.. I'll need to look that up.

sheluchin15:08:38

https://github.com/fbellomi/crossclj yep, haven't heard of that either but it sounds very similar.

Noah Bogart18:08:10

I've noticed a couple config options that aren't documented. Should they be? ā€¢ :not-a-function ā€¢ :hook ā€¢ :unexpected-recur

borkdude19:08:26

probably, yes. PR welcome!

šŸ‘ 1