This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-20
Channels
- # aleph (1)
- # announcements (1)
- # aws (11)
- # babashka (117)
- # beginners (34)
- # calva (13)
- # cider (3)
- # clj-commons (8)
- # clj-kondo (24)
- # clj-yaml (36)
- # cljsrn (46)
- # clojure (50)
- # clojure-australia (5)
- # clojure-europe (239)
- # clojure-nl (3)
- # clojure-norway (3)
- # clojure-spec (16)
- # clojurescript (25)
- # core-typed (20)
- # cursive (41)
- # datahike (1)
- # datalevin (1)
- # datomic (17)
- # fulcro (27)
- # hyperfiddle (35)
- # introduce-yourself (1)
- # jobs (4)
- # lsp (20)
- # malli (8)
- # meander (8)
- # nbb (1)
- # off-topic (31)
- # parinfer (9)
- # pathom (3)
- # portal (2)
- # re-frame (20)
- # react (2)
- # reagent (8)
- # releases (1)
- # remote-jobs (4)
- # scittle (2)
- # shadow-cljs (8)
- # slack-help (4)
- # sql (30)
- # squint (3)
- # tools-deps (34)
- # xtdb (21)
foo.cljc
(ns foo)
(spit nil nil)
[benj@benj-pc org.sg.sheets-lambda]$ clj-kondo --version
clj-kondo v2022.09.08
clj-kondo --lint ./src/foo.cljc
./src/foo.cljc:3:2: error: Unresolved symbol: spit
what about clojure.core functions in cljc files?if you intend to write e.g. for bb, then you can use {:cljc {:features [:clj]}}
to disable linting for cljs
If we're sharing about hooks, I'm up to 5! keep finding places where adding one instead of relying on :lint-as
makes development better
Yeah, I have a bunch of :lint-as
settings that I keep squinting at and thinking "Hmm, maybe that should be a hook". I definitely have another macro I'm going to write a hook for (although the red squigglies today are some encouragement to stop using it 🙂 )
For anyone wanting to get more up to speed with hooks, you can do a self-paced "Getting hooked on clj-kondo hooks" workshop here: https://github.com/clj-kondo/hooks-workshop-clojured-2022
Btw, if writing :analyze-call
hooks for a macro is a bit too much, there is now also the :macroexpand
hook which gives less accurate locations for warnings, but still gets rid of false positives by more or less just copying the macro (and simplifying it)
@benjamin.schwerdtner clj-kondo version?
❯ echo "(ns org.sg.sheets-lambda.core)" | clj-kondo --lint -
linting took 4ms, errors: 0, warnings: 0
(i always forget how to get the minimal way to check stuff so posting here for @benjamin.schwerdtner)
(ns foo)
(comment
(require '[lol oh-no :as]))
minimal repro. Lol when there is a garbled require form I guess anywhere in the file. Quality of life issue is that it logs the warning on the top ns form... Maybe the warning could at least mention that require
elsewhere in the file can be an issue@benjamin.schwerdtner Ah I see. Feel free to post an issue