Fork me on GitHub
#clj-kondo
<
2021-09-22
>
JonR21:09:14

Are lsp-clojure or clj-kondo used for doc generation? Not sure if that's a use case but I was just wondering if I could do something like inspect my source for all implementations of a multi-method for example. Would be awesome if I could make a commit hook to generate an md file of usages for example.

borkdude21:09:00

@jon693 You might be able to use the analysis data in clj-kondo for this: https://github.com/clj-kondo/clj-kondo/blob/master/analysis/README.md I'm not sure if it reports all multi-method usages correctly currently. And once you know the locations, you could use another tool (like rewrite-clj or a more basic approach) to cut out the code and display it.

JonR21:09:01

awesome @borkdude thanks! I'll check those out