This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-05-29
Channels
- # aleph (1)
- # announcements (10)
- # aws (1)
- # beginners (110)
- # calva (4)
- # cider (26)
- # clj-kondo (14)
- # cljdoc (24)
- # cljsrn (16)
- # clojure (76)
- # clojure-europe (3)
- # clojure-ireland (2)
- # clojure-italy (15)
- # clojure-nl (8)
- # clojure-spec (23)
- # clojure-sweden (4)
- # clojure-uk (92)
- # clojurescript (37)
- # cursive (19)
- # datomic (59)
- # duct (1)
- # emacs (4)
- # fulcro (7)
- # graalvm (7)
- # graphql (1)
- # hoplon (69)
- # jobs (4)
- # jobs-rus (1)
- # kaocha (2)
- # leiningen (5)
- # luminus (2)
- # pathom (8)
- # reagent (6)
- # reitit (11)
- # spacemacs (12)
- # sql (3)
- # tools-deps (9)
- # unrepl (1)
- # vim (57)
@kenny you can visit the docs, configuration and there you will see how to exclude namespaces from being warned about. You can also use a regex
@kenny Here are the config docs I referred to (I was on mobile earlier): https://github.com/borkdude/clj-kondo/blob/master/doc/config.md#exclude-required-but-unused-namespace-from-being-reported
@borkdude Thanks! Curious, is there a way to send info from the editor to clj-kondo? It'd be cool if I could alt+enter over a unused namespace and mark it as excluded.
I’ve also been thinking of something like this:
(ns example
{:clj-kondo/config
{:linters {:unused-namespace {:exclude ['clojure.string]}}}}
(:require [clojure.string]))
so you can have a namespace local config, if you don’t want to have the namespace excluded everywherebut to answer your question: I guess you would have to write editor-specific code to add something to the clj-kondo configuration file, that isn’t something clj-kondo provides for all editors
Hmm. Not sure if I'd want to add that to my namespace but that could be useful. I see. It;s unfortunate that there isn't a common interface for describing these lint-esque problems.
BTW I could see it being useful to exclude a ns like foo.specs
but also still want a lint check for something like this [foo.specs :as foo-specs]
, noting that foo-specs
is not used anywhere.
testing the new “unused bindings” feature is still appreciated. https://github.com/borkdude/clj-kondo/issues/173