Fork me on GitHub
#clj-kondo
<
2021-11-01
>
Benjamin09:11:03

How do I tell clj-kondo that my file .cljc file is clojure? (I'm assuming it treats it as clojurescript based on the extension)

borkdude09:11:03

@benjamin.schwerdtner I'm still figuring out the best way to deal with this. I'm assuming you're writing a babashka file with a reader conditional? Right now this is supported in config.edn: {:cljc {:features [:clj]}} (but still officially undocumented): it will only look at the :clj branches of the .cljc files

Benjamin09:11:36

ah you are right that is the initial use case. You made me realize I don't need the c because it's only clojure now 😛

winsome21:11:09

I'd like to generate a graph of my namespace dependencies - I see that there's a clj -m clj-kondo.tools.namespace-graph src command documented under Analysis Data > Namespace graph, but it looks like it's trying to read a png file? > Execution error (FileNotFoundException) at http://java.io.FileInputStream/open0 (FileInputStream.java:-2). > clj-kondo.tools.namespace-graph (No such file or directory)

borkdude16:11:35

I looked into it and on my system it worked. I think the issue is that you haven't installed graphviz.

borkdude21:11:03

@winsome Feel free to post an issue and I'll look later this week. There are some better tools that use clj-kondo analysis to show namespace or even function dependencies. One of them is called morpheus by @benedek https://github.com/benedekfazekas/morpheus

👀 1
benedek21:11:18

also powered by kondo

winsome21:11:23

Alright, vizns worked! It's not pretty but now I've got my graph. I think I'll play more with morpheus too

👍 1