Fork me on GitHub

Hi, I haven’t used clj-kondo before but I’d like to use the re-frame analyzer by @roman01la Is that gist supposed to be a standalone clj program? How would I compile or invoke it?


I recommend looking at the repo I just posted by @yannvahalewyn which contains more explanation


Yes, I’m now looking at that repo and unfortunately I know nothing about the cli tools. I’ve tried running it as clj -M scripts/lint.clj but that doesn’t print out the expected output


Obviously I’m doing something wrong because even a (println "Hello") in main doesn’t show up


linting the source doesn't execute it


@U04V91K02 I'll add some more explicit steps to the docs!


I've made the docs much more explicit, have a look and see if that helps you out!


How do I run this script?


You can copy it over in your own repo and just call the main function yourself. It's meant to be copied over and tweaked since lot's of things are hardcoded (such as src paths etc..). Alternatively there's a short section on how to use it from babashka. Not very in depth, could it use some more documentation?


Since multiple people are asking questions I'm adding some explicit steps to the docs.


Mentioned in the other thread as well but the docs now offer explicit steps on how to get it running!

replied to a thread:

Mentioned in the other thread as well but the docs now offer explicit steps on how to get it running!


@yannvahalewyn % clj -M -m analyse-re-frame Execution error at clojure.main/main ( No namespace: analyse-re-frame found


Hmm let me see, works fine for me


Some silly things, are you in the correct directory? Did you pull the latest version of the repo? (I renamed that NS in the last commit)


Make sure you see :paths ... "scripts" in the deps.edn and there is a scripts/analyse_re_frame.clj file.


Yes, I am in the analyse-re-frame-usage-with-clj-kondo directory and pulled. scripts/analyse_re_frame.clj exists


Oh the file says (ns lint) !!


Oh that's my bad, late day and I didn't commit the ns declaration since I was testing the babashka stuff


I'll push an update but you could replace it yourself and it should work :thumbsup:


I have received output! Thanks!

Joshua Suskalo22:10:29

Hey, so the duplicate-map-key linter might need some work. I currently have a monotonically increasing key generation function, kinda like gensym, and calling that function multiple times as keys is guaranteed to be valid, but clj-kondo marks it as duplicates.

Joshua Suskalo22:10:56

Is it intended that calling a no-args function multiple times is treated as an identical key to itself?

Joshua Suskalo22:10:00

this is unexpected

Joshua Suskalo22:10:15

It actually is invalid, because the reader breaks.