This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-07-25
Channels
- # announcements (4)
- # babashka (5)
- # bangalore-clj (4)
- # beginners (27)
- # calva (23)
- # clj-kondo (39)
- # clojure (39)
- # clojure-europe (53)
- # clojure-france (5)
- # clojure-gamedev (1)
- # clojure-norway (9)
- # clojure-uk (3)
- # cursive (3)
- # datalevin (24)
- # datascript (5)
- # dev-tooling (22)
- # emacs (5)
- # events (1)
- # hyperfiddle (13)
- # instaparse (2)
- # java (24)
- # jobs-discuss (34)
- # lsp (6)
- # missionary (2)
- # music (1)
- # off-topic (47)
- # polylith (4)
- # practicalli (1)
- # shadow-cljs (4)
- # tools-build (15)
- # xtdb (6)
:discouraged-namespace {clj-time.core {:message "Use java.time instead"
:level :error}}
If I had that config it should be an error right?
I still get
tokens_test.clj:5:14: warning: Use java.time instead
(deftest level-test
(assert-submaps2
[{:file "<stdin>",
:row 1,
:col 24,
:level :error,
:message "Discouraged var: foo/bar"}]
(lint! "(ns foo) (defn bar []) (bar)"
'{:linters {:discouraged-var {foo/bar {:level :error}}}})))
I can see a test in the code, so it should work in theory
2024.05.24
which I think was the latest
ah yeah I can repropduce it also there
ah you're referencing the discouraged-<var> test, not the discouraged-namespace, so this might still have to be implemented for that linter
ahh ok makes sense,I was using both actually but maybe only the namespace has the problem yeah
(deftest discouraged-namespace-test
(assert-submaps2
'({:file "<stdin>" :row 1 :col 12 :level :error :message "Discouraged namespace: closed.source"})
(lint! "(require '[closed.source :as s]) (s/baz)"
'{:linters {:discouraged-namespace {closed.source {}
:level :error}}}))
there is a test also for namespace as far as I can see
ah the difference in that test is that the level is set on the level of the whole linter, not just for one var
This would be the desired behavior that isn't implemented yet:
(assert-submaps2
'({:file "<stdin>" :row 1 :col 12 :level :error :message "Discouraged namespace: closed.source"})
(lint! "(require '[closed.source :as s]) (s/baz)"
'{:linters {:discouraged-namespace {closed.source {:level :error}}}}))
Ahh ok cool I can try to fix maybe
I'm already fixing it, as I was looking into it. You can still help by posting an issue
ah ok cool
another question about --copy-config, I would just to not check in git all the files that are copied over with --copy-config
, and then I realised that I don't even know how these files are ending up in my machine.
I guess it's maybe Emacs doing it, but well I just deleted all the copied configs and I can't get them back.
I also tried
% clj-kondo --lint src test --dependencies --copy-configs --skip-lint
clj-kondo --lint src test --dependencies --copy-configs --skip-lint
No configs copied.
and it copies nothing. Am I doing something wrong? I'd like to just change the CI script to download the configs before running, which means that we don't need them checked in anymore, or how else are people doing that?mm how do I do that?
I just thought it would pick up the dependencies from project.clj or deps.edn?
it's interesting how that always worked without me really ever understanding how
more info here: https://github.com/clj-kondo/clj-kondo?tab=readme-ov-file#project-setup
ahh right, I still don't know what magic tools got them downloaded to my machine then
ah yeah actually only after clojure-lsp diagnostics
I'm seeing all the files