This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-04-05
Channels
- # announcements (12)
- # babashka (29)
- # bangalore-clj (3)
- # beginners (153)
- # calva (2)
- # chlorine-clover (46)
- # cider (11)
- # clj-kondo (21)
- # cljfx (20)
- # cljs-dev (3)
- # clojure (393)
- # clojure-australia (2)
- # clojure-europe (15)
- # clojure-spec (40)
- # clojure-uk (1)
- # clojurescript (3)
- # community-development (1)
- # conjure (2)
- # cursive (1)
- # data-oriented-programming (1)
- # datomic (7)
- # defnpodcast (2)
- # docs (2)
- # figwheel-main (5)
- # fulcro (52)
- # graalvm (2)
- # inf-clojure (21)
- # malli (10)
- # meander (6)
- # mid-cities-meetup (13)
- # nrepl (1)
- # off-topic (24)
- # other-languages (1)
- # pathom (3)
- # polylith (18)
- # re-frame (6)
- # reitit (11)
- # ring-swagger (2)
- # shadow-cljs (56)
- # specter (1)
- # xtdb (7)
I want to treat this problem as an error, not a warning, but still retain helpful line/col info
Right now when I throw
, it “puts” the error onto the top-level form, but I have the exact line/col info of the real issue
(throw (ex-info "defmutation handlers must take 1 argument"
{:type :fulcro/defmutation
:row row
:col col}))
it probably should, but it isn't the case right now. but you can use reg-finding!
to do what you want
note that the user will also have to configure :fulcro/defmutation
in the linter config and set a level for it
I think the :level isn't even relevant from where it's emitted, it's always the one from the config
I think I’m doing something slightly weird is the problem. Basically, I’m transforming fulcro’s defmutation
into something like this:
(defn my-mutation
[params]
(letfn [(action [env])
(remote [env])]
(action nil)
(remote nil)))
It’s “close enough” to what I want the linting to do, but it’s giving me stray errors like “action is called with 1 arg instead of 0"…I’m trying to override those subsequent/general linters with my own very specific error messages, if that makes senseInside of a reg-finding!
map, how should I qualify :type
keywords? I’m thinking something like this: :clj-kondo.fulcro.defmutation/handler-arity