Fork me on GitHub
#clj-kondo
<
2019-05-29
>
borkdude03:05:50

@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

borkdude03:05:21

I’ll make a new screenshot, thanks

borkdude12:05:54

@kenny the screenshot is updated

kenny16:05:55

@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.

borkdude16:05:39

not yet. what editor are you using?

borkdude16:05:39

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 everywhere

borkdude16:05:30

but 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

borkdude16:05:05

note that you can also use a regex in the config, if you have many similar names

kenny16:05:29

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.

kenny16:05:10

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.

borkdude16:05:00

feel free to post an issue about it

4
borkdude21:05:28

testing the new “unused bindings” feature is still appreciated. https://github.com/borkdude/clj-kondo/issues/173