This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-02-19
Channels
- # announcements (10)
- # aws (3)
- # aws-lambda (1)
- # babashka (24)
- # beginners (57)
- # boot (5)
- # calva (20)
- # chlorine-clover (3)
- # cider (14)
- # clj-kondo (37)
- # clojars (17)
- # clojure (200)
- # clojure-dev (40)
- # clojure-europe (9)
- # clojure-france (7)
- # clojure-gamedev (5)
- # clojure-hungary (4)
- # clojure-italy (8)
- # clojure-losangeles (2)
- # clojure-nl (9)
- # clojure-uk (97)
- # clojurebridge (1)
- # clojured (3)
- # clojuredesign-podcast (23)
- # clojurescript (13)
- # code-reviews (2)
- # component (22)
- # core-typed (7)
- # cursive (64)
- # datascript (12)
- # datomic (60)
- # emacs (6)
- # fulcro (54)
- # graalvm (11)
- # graphql (3)
- # hoplon (25)
- # jobs (1)
- # joker (85)
- # juxt (5)
- # kaocha (10)
- # klipse (8)
- # malli (2)
- # off-topic (36)
- # parinfer (1)
- # pathom (1)
- # re-frame (9)
- # reagent (4)
- # reitit (1)
- # remote-jobs (1)
- # shadow-cljs (24)
- # spacemacs (1)
- # sql (39)
- # tools-deps (10)
- # tree-sitter (18)
- # xtdb (18)
Does anyone have an example of using a namespace local config to turn off a linter? I can't seem to get it to work.
Doesn't work:
(ns
{:clj-kondo/config {:linters {:unused-namespace {:level :off}}}}
(:require
[foo.bar :as bar]))
on a related note, i wonder why when i press tab for completing nicks that i end up on completely different candidates than what was already highlighted...
So, like this?
(ns
{:clj-kondo/config '{:linters {:unused-namespace {:level :off}}}}
(:require
[foo.bar :as bar]))
$ clj-kondo --lint test.clj
test.clj:4:6: warning: namespace foo.bar is required but never used
linting took 6ms, errors: 0, warnings: 1
@nate Actually, that exact problem got solved in the last release: https://github.com/borkdude/clj-kondo/issues/430
maybe a next nice tweak would be to let clj-kondo accept un unquoted config. I'll make an issue for that as well
I saw the note about quoting the config in the docs and tried that, but had a user error by not running the latest
yeah, so if there's anything not supported in the ns metadata it can probably be fixed without much trouble
on a related note, is there a way to configure linting by namespace or namespace regex? my use case is that I have a set of namespaces that all start with fiddle.
that I use during development, and I would like them to have slightly different kondo config, like skipping the unused namespaces check. for now, I will just add the metadata like the above, but wondering if there was a way to do it more generally
the issue is that I do use the namespaces in those files, but usually from comment blocks
$ clj-kondo --lint - <<< "(ns (:require [foo.bar :as bar])) (comment (bar/x))"
linting took 11ms, errors: 0, warnings: 0