This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-02-21
Channels
- # announcements (39)
- # architecture (7)
- # aws (9)
- # babashka (111)
- # beginners (139)
- # bristol-clojurians (1)
- # calva (47)
- # chlorine-clover (5)
- # cider (17)
- # clj-kondo (26)
- # clojars (25)
- # clojure (251)
- # clojure-berlin (1)
- # clojure-dev (5)
- # clojure-europe (22)
- # clojure-france (1)
- # clojure-hungary (6)
- # clojure-losangeles (8)
- # clojure-nl (18)
- # clojure-spec (3)
- # clojure-uk (68)
- # clojured (32)
- # clojurescript (32)
- # core-async (10)
- # core-typed (120)
- # cursive (8)
- # datascript (10)
- # datomic (11)
- # docker (2)
- # emacs (6)
- # figwheel-main (4)
- # fulcro (10)
- # graalvm (92)
- # hoplon (2)
- # instaparse (9)
- # jobs (3)
- # jobs-discuss (31)
- # joker (2)
- # kaocha (1)
- # lambdaisland (5)
- # leiningen (10)
- # luminus (1)
- # lumo (14)
- # meander (30)
- # mid-cities-meetup (1)
- # midje (1)
- # off-topic (46)
- # pathom (22)
- # perun (2)
- # re-frame (10)
- # reitit (1)
- # remote-jobs (8)
- # shadow-cljs (71)
- # spacemacs (7)
- # sql (40)
- # tools-deps (31)
- # tree-sitter (11)
- # vim (14)
- # vscode (2)
- # xtdb (5)
I'm not sure if this has ever been discussed, has anyone figured out how to share the clj-kondo config effectively between projects? My current team has serveral projects that share a lot of macros etc that need the same config over and over again. It would be great to be able to use a shared config but keep the ability to add project-specific overrides when needed.
perhaps a combination of a git submodule and a custom file that is then passed in as a command line arg to override things?
@imre In this issue I have suggested writing a script (perhaps using babashka) for merging configs https://github.com/borkdude/clj-kondo/issues/736
@imre In clj-kondo itself I've been using an #include reader tag, but this is undocumented, just something I've been playing around with: https://github.com/borkdude/clj-kondo/blob/615543df9cd5477f1c5e9ad08629997f402a2889/.clj-kondo/config.edn#L18
I'm not sure in what extent it will work for your purposes, but the scripting option will work for sure
shared config + include/merge sounds like a declarative enough approach to cover both editor integrations and command line
Hi, I thought that clj-kondo reported on undefined vars from other namespaces. Did I imagine things?
@mynomoto it does report invalid arities from other namespaces, but it doesn't warn if they don't exist. there is an issue for this though
https://github.com/borkdude/clj-kondo/issues/546 https://github.com/borkdude/clj-kondo/issues/634
$ clj-kondo --config '{:lint-as {mount/defstate clojure.core/def}}' --lint - <<< '(ns foo (:require mount x)) (mount/defstate conn :start (x/create-connection x/config))'
linting took 9ms, errors: 0, warnings: 0
this is just by luck, when clj-kondo would have more strict syntax checking for clojure.core/def this would likely give problems
yeah. this one also works:
$ clj-kondo --config '{:lint-as {mount/defstate clj-kondo.lint-as/def-catch-all}}' --lint - <<< '(ns foo (:require mount x)) (mount/defstate conn :start (x/create-connection x/config))'
linting took 12ms, errors: 0, warnings: 0