This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-05-31
Channels
- # announcements (8)
- # babashka (8)
- # beginners (13)
- # biff (1)
- # calva (1)
- # cider (12)
- # clj-kondo (16)
- # cljs-dev (3)
- # cljsrn (14)
- # clojure (18)
- # clojure-austin (2)
- # clojure-czech (3)
- # clojure-europe (54)
- # clojure-germany (5)
- # clojure-nl (1)
- # clojure-norway (2)
- # clojure-spec (4)
- # clojure-survey (2)
- # clojure-uk (1)
- # clojured (15)
- # clojurescript (5)
- # conjure (6)
- # core-async (65)
- # cursive (24)
- # data-science (1)
- # emacs (9)
- # events (3)
- # graphql (5)
- # integrant (6)
- # jobs (2)
- # joyride (62)
- # lsp (5)
- # malli (10)
- # off-topic (20)
- # pathom (57)
- # polylith (18)
- # re-frame (12)
- # remote-jobs (3)
- # rewrite-clj (14)
- # sci (2)
- # shadow-cljs (41)
- # sql (9)
- # tools-deps (68)
Am I missing something obvious for treating code as data and interrogating it? The code is all Clojurescript. I've been playing with clj-rewrite. What I really want is to write scripts which analyse my source code - looking for undesirable code patterns, estimating complexity, priporitising testing effort on usage, KPIs around prepost use, it goes on... Reading is non trivial because of read macros. So clj-rewrite is nice. Then it gets fiddly because of needing to resolve aliases (manually got around the worst of this by parsing the ns forms). Feels like a script which reads, resolves and shoves everything into a datascript db would be good. I think perhaps that's what clj-kondo used to do but perhaps that changed. Haven't tried edamame yet.
@U055DUUFS you might be interested in taking advantage of https://github.com/clj-kondo/clj-kondo/tree/master/analysis.
Thanks. I got the impression that's more limited in scope but I'll look again.
Well, clj-kondo uses rewrite-clj to read Clojure. But then it interprets it for the purposes of linting. You get access to those interpretations via data analysis.
There’s a chance it might not meet your requirements, but probably worth another look-see.
It does generate lots of useful data.
Thanks @U04V15CAJ I was having a great time with that this morning. Was able to do things like "find maps with a specific key where the value is missing something". Worked like a charm with very little code. Brilliant stuff.
What is it using under the hood? The deps didn't reveal much.
Nice. And Sci, in turn, uses edamame.