This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-04-08
Channels
- # announcements (8)
- # aws (2)
- # babashka (11)
- # babashka-sci-dev (39)
- # beginners (62)
- # calva (5)
- # cider (1)
- # clj-kondo (50)
- # cljdoc (2)
- # cljs-dev (6)
- # clojure (52)
- # clojure-austin (22)
- # clojure-czech (13)
- # clojure-europe (88)
- # clojure-nl (1)
- # clojure-norway (5)
- # clojure-uk (6)
- # clojuredesign-podcast (13)
- # clojurescript (45)
- # community-development (3)
- # core-typed (31)
- # cursive (12)
- # datahike (2)
- # datalevin (7)
- # datomic (5)
- # events (1)
- # exercism (11)
- # fulcro (27)
- # gratitude (1)
- # holy-lambda (3)
- # hoplon (2)
- # introduce-yourself (2)
- # jobs (1)
- # lambdaisland (3)
- # lsp (110)
- # malli (2)
- # meander (4)
- # music (2)
- # off-topic (50)
- # overtone (1)
- # pathom (13)
- # polylith (26)
- # re-frame (4)
- # releases (2)
- # rewrite-clj (3)
- # ring (12)
- # shadow-cljs (20)
- # specter (4)
- # tools-deps (8)
- # xtdb (40)
Hi! Is it possible to tell kondo to fail on :deprecated-var
in prod code but to ignore it in test code?
@holyjak You could lint your production code separately from your test code for now, or put a namespace metadata config in the test code.
There is also a configuration to ignore certain deprecated vars in certain namespaces
Awesome, thanks! > put a namespace metadata config in the test code. Where is that documented? I looked at disabling linters here https://github.com/clj-kondo/clj-kondo/blob/master/doc/config.md#options but do not see it
documented here: https://github.com/clj-kondo/clj-kondo/blob/master/doc/config.md#introduction
clj-kondo v2022.04.08
• https://github.com/clj-kondo/clj-kondo/issues/1331: new linter :non-arg-vec-return-type-hint
that warns when a return type hint is not placed on the arg vector (CLJ only). See https://github.com/clj-kondo/clj-kondo/blob/master/doc/linters.md#non-arg-vec-return-type-hint.
• Enable :namespace-name-mismatch
by default
• https://github.com/clj-kondo/clj-kondo/pull/1611: support ^:replace
override for nested config values
• https://github.com/clj-kondo/clj-kondo/issues/1625: Add option --skip-lint
, to skip linting while still executing other tasks like copying configuration with --copy-configs
.
• https://github.com/clj-kondo/clj-kondo/issues/1620: return type too narrow for re-find
Analysis:
• https://github.com/clj-kondo/clj-kondo/issues/1623: Implement analysis for Java classes: :java-class-definitions
and :java-class-usages
. See https://github.com/clj-kondo/clj-kondo/blob/master/analysis/README.md.
• https://github.com/clj-kondo/clj-kondo/pull/1635: add :end-row
and end-col
to analyze data for :namespace-definitions
• https://github.com/clj-kondo/clj-kondo/issues/1651: Improvements for :protocol-impls
• https://github.com/clj-kondo/clj-kondo/issues/1612: Improve analysis for deftype
• https://github.com/clj-kondo/clj-kondo/issues/1613: Improve analysis for reify
• https://github.com/clj-kondo/clj-kondo/issues/1609: keyword analysis for ns
+ require
channel: #clj-kondo
With new linters being regularly added, how do you decide whether to promote something to the warning or error level?
• For subjective/style things: level :off • Experimental: level :off until further notice • Causes compilation error: level :error • Not wrong, but can cause damage: level :warning
Thank you. Just trying to think about a good process of keeping up with all the new rules.
I've opened an issue for keywords in :keys
binding vectors (https://github.com/clj-kondo/clj-kondo/issues/1653). There was some chatter about this when I posted about it in February before I went on leave, so seems relevant to bring it up now that I've made the issue.
I'm fine with someone implementing that as a stylistic thing which is disabled by default
it's up! thanks for the feedback https://github.com/clj-kondo/clj-kondo/pull/1654
take your time
an off-by-default stylistic lint is totally cool with me. Thanks!
hey y’all, I’m having trouble finding docs on an issue. clj-kondo doesn’t appear to be picking up .clj-kondo/config.edn
in the deps for a project I’m working on. How would I configure this?
I haven’t
My first thought with that description of the issue is that your editor is running kondo from the wrong directory.
If it works from the commandline that makes this theory very likely.
ok I ran
clj-kondo --lint "$(clojure -Spath)" --dependencies --parallel --copy-configs
and then linted a specific file with
clj-kondo --lint src/donut/todo_example/frontend/components/todo_list.cljs
and it’s still showing errors and warningsi don’t really use it from the command line so i’m probably doing something wrong? 🙂
sorry, it’s showing errors and warnings, indicating that it’s not loading the .clj-kondo/config.edn files from dependencies
there shouldn’t be any errors
oh, now I get it. clj-kondo does not load .clj-kondo/config.edn from dependencies. when you run with --copy-configs it copies configs from clj-kondo.exports/your-org/your-lib to your .clj-kondo directory
yeah, so dependencies may have kondo configs that they don't export, and may have simplified versions of the configs that they do export to consumers.
That is documented here: https://github.com/clj-kondo/clj-kondo/blob/master/doc/config.md#exporting-and-importing-configuration
aaaah ok, got it! thanks. have there been any changes around this recently? Up until yesterday or so it seemed like clj-kondo was loading .clj-kondo/config.edn from deps
thank you
Note that you can include the exported config of a lib within that lib's own config using config-paths
ah ok so if a lib has resources/clj-kondo.exports/clj-kondo/my/lib/config.edn
then that lib’s .clj-kondo/config.edn
can include it?
gotcha. thank you! I’ll give that a try
yay it’s working!! thank you :hugging_face: also had to include some -Adev
in getting the deps bc my deps.edn needs improvement
How interested would y'all be in a “turn on all lints and make then errors” lint/flag/setting?