This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-08-25
Channels
- # announcements (4)
- # asami (26)
- # babashka (82)
- # beginners (27)
- # biff (6)
- # boot (1)
- # calva (42)
- # cider (2)
- # clj-commons (1)
- # clj-http-lite (2)
- # clj-kondo (37)
- # cljdoc (1)
- # clojure (46)
- # clojure-europe (34)
- # clojure-nl (1)
- # clojure-norway (7)
- # clojure-uk (2)
- # clojurescript (54)
- # code-reviews (18)
- # cursive (2)
- # datalevin (32)
- # datomic (7)
- # etaoin (1)
- # fulcro (9)
- # gratitude (3)
- # hyperfiddle (15)
- # introduce-yourself (1)
- # jobs (2)
- # lsp (32)
- # nrepl (1)
- # off-topic (18)
- # pathom (17)
- # pedestal (5)
- # polylith (89)
- # reitit (7)
- # releases (3)
- # remote-jobs (4)
- # shadow-cljs (52)
- # spacemacs (3)
- # squint (14)
- # tools-build (10)
- # tools-deps (18)
- # vim (4)
- # xtdb (34)
I see there is work on add what looks like some default linting for compojure https://github.com/clj-kondo/clj-kondo/commit/e5f8af54590b084cc119263698bdc786bfc6434f. But it doesn't seem on by default, and i'm not seeing how i enable it. the GET macro is still reporting errors:
digging up old conversations... https://clojurians.slack.com/archives/CHY97NXE2/p1655757746303809
add this to the clj-kondo config will ignore it i hope
:linters {unresolved-symbol {:exclude [(compojure.api.sweet/GET) ]}} looks like no one built a custom hook, i don't plan on doing it either.
the require is [compojure.api.sweet :as sw]
apologies for the confusion, when i google "compojure" the first thing that comes up is compojure-api
and the hello world is (require '[compojure.api.sweet :refer :all])
so i was considering it compojure. because it has the name compojure in it.
should have said "compojure.api.sweet"
https://github.com/metosin/compojure-api is what you are using, https://github.com/weavejester/compojure is what is being referred to as compojure in that commit
err maybe i was googling for compojure api, thanks for the clarification.
fortunate for them, good for marketing their new (at the time) library, unfortunate for the community now having two easily confusable library names
is there a way to exclude an entire namespace, that i don't control, from being linted?
looks like regex might be supported
or :refer-all https://cljdoc.org/d/clj-kondo/clj-kondo/2020.09.09/doc/configuration#exclude-namespace-in-refer-all-linter
if you don't control the namespace, why do you care about linting results for that one?
my project has a multiple namespaces that require [compojure.api.sweet :as sw]
ideally it would be properly linted, but i'm not sure i's worth taking the time to do, so i'm looking for a way to quickly ignore everything from that namespace so it's easier to see other more important/better error reporting.
This is working but it's obviously not comprehensive.
{:unresolved-symbol {:exclude
[(compojure.api.sweet/GET)
(compojure.api.sweet/POST)
(compojure.api.sweet/PUT)]}}
by "dont' control" i mean, i can't change the namespace that contains the macro. I though that might be relevant to understanding my options.
can you have multiple config.edn's in your project's .clj-kondo directory? it looks like i "somehow" (lsp?) added a /.clj-kondo/prismatic/schema/config.edn
@drewverlee This happens when you extract configurations from dependencies. They are included automatically
thats what i was hoping happened. ty tyt.
hmmm seems like flycheck-clj-kondo is picking the wrong directory to look for the .clj-kondo directory
I guess that might be flycheck itself being weird
๐:skin-tone-2:
flycheck runs over a file while setting the current working directory to the file's parent. clj-kondo then searches for the .clj-kondo directory from that directory to the top and takes the first one that it finds
so if the file is /foo/bar/baz.clj it would first check /foo/bar/.clj-kondo then /foo/.clj-kondo then /.clj-kondo?
something is fucky then because it's skipping the deeper-nested .clj-kondo and going one directory up
I use doom emacs so it could very well be something doom is doing
I'm looking deeper into it
thanks! sleep well ๐
ok, it's using lsp for clj-kondo and that's finding the wrong project root