This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-10-26
Channels
- # announcements (28)
- # asami (13)
- # babashka (10)
- # beginners (170)
- # boot (1)
- # calva (35)
- # cider (21)
- # circleci (13)
- # clara (6)
- # clj-http (1)
- # clj-kondo (29)
- # cljdoc (5)
- # clojure (89)
- # clojure-czech (2)
- # clojure-europe (20)
- # clojure-france (16)
- # clojure-nl (6)
- # clojure-uk (5)
- # clojurescript (80)
- # community-development (6)
- # conjure (13)
- # cursive (18)
- # datascript (9)
- # datomic (1)
- # duct (1)
- # gratitude (2)
- # helix (7)
- # jobs (2)
- # kaocha (3)
- # lsp (22)
- # malli (5)
- # meander (1)
- # other-languages (34)
- # pathom (18)
- # polylith (24)
- # quil (10)
- # re-frame (5)
- # releases (1)
- # remote-jobs (4)
- # reveal (7)
- # shadow-cljs (8)
- # tools-deps (53)
Hi, I haven’t used clj-kondo before but I’d like to use the re-frame analyzer by @roman01la https://gist.github.com/roman01la/c6a2e4db8d74f89789292002794a7142. 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
perhaps @yannvahalewyn can help?
@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!
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!
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 (main.java:40). 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 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:
Glad to help!
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.
Is it intended that calling a no-args function multiple times is treated as an identical key to itself?
Oh hmm
never mind
this is unexpected
It actually is invalid, because the reader breaks.