This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-12-13
Channels
- # adventofcode (54)
- # aleph (1)
- # announcements (2)
- # aws (123)
- # babashka (1)
- # beginners (41)
- # calva (21)
- # cider (1)
- # clj-kondo (58)
- # cljdoc (4)
- # clojure (123)
- # clojure-austin (1)
- # clojure-belgium (6)
- # clojure-dev (11)
- # clojure-europe (33)
- # clojure-nl (1)
- # clojure-portugal (1)
- # clojure-uk (3)
- # clojurescript (20)
- # community-development (32)
- # conjure (1)
- # datomic (17)
- # etaoin (8)
- # events (1)
- # fulcro (1)
- # hyperfiddle (7)
- # malli (3)
- # nrepl (3)
- # off-topic (17)
- # other-languages (1)
- # polylith (4)
- # portal (7)
- # releases (3)
- # remote-jobs (1)
- # shadow-cljs (18)
- # test-check (24)
- # testing (3)
- # timbre (1)
- # xtdb (7)
One of the things that linters in other language do is give each linter error a unique id so that errors can be easily searched and discovered. Has any thought been given to adding this to clj-kondo?
Maybe you mean https://github.com/clj-kondo/clj-kondo/blob/master/doc/config.md#show-linter-name-in-message?
Thanks. I should have been more specific. Those are good for knowing the name of the linter, but they don't search well unless you're in the linters docs page and use "find in page"
I'm thinking something like Python's Flake8 rules: https://www.flake8rules.com/rules/E101.html
Here's an example of what I've run into:
vs flake8:
yes. folks in my org have come to me saying, "i'm getting this error and googling it doesn't tell me what's wrong" so i have to say "go to the docs/linters.md file and search it there" which works but is less direct than imo is necessary
Maybe this is just something that would be helped by having a stand alone clj-kondo website, with a single page per linter. that's a lot of work lol just trying to think through it
Perhaps it would help if we generated an HTML page like this: https://book.babashka.org/ I'm not sure if it's Github README vs HTML or something else
Yeah, sadly not. This isn't a requirement, of course, for example eslint doesn't use "unique ids" that are letters and numbers (https://eslint.org/docs/latest/rules/no-await-in-loop), neither does rubocop (https://docs.rubocop.org/rubocop/cops_lint.html#lintbooleansymbol), but those both have stand-alone websites that might help in this regard
Just in case, I hope I don't sound like I'm demanding you build a whole new website for this, lol. If this is something you're interested in, I'm willing to put in work as well. (For example, https://github.com/clj-kondo/clj-kondo/pull/1805 from back in September.)
can you do a couple of searches for words in http://book.babashka.org to see if they show up properly in google?
I've done a poll recently about what people prefer: mkdocs material / antora vs the http://book.babashka.org there is now. People vastly preferred the single page that there is now. I've thought about moving clj-kondo docs to asciidoc and then using the same http://book.babashka.org layout (single page). It'd be good to see if this helps SEO too
each of this points to the book site but doesn't point to the specific part of the page. frustrating
i mentioned eslint and rubocop earlier. eslint has specific pages for each rule while rubocop does not. "eslint no-await-in-loop" points to the specific linter page, while "rubocop lint/booleansymbol" points to the "lint cops" page (that contains all of the lint rules)
Well, I think people need at least to know about config.md and linters.md to get going and maybe they should just ... read some docs?
seems this is just how google indexes things then, and is not a game we should fall into playing lmao. if it's smart for clj-kondo's workflow to have individual pages then do it, but don't do it merely for the seo
Agreed. I do think that a "clj-kondo book" like the babashka one would be overall helpful, but I don't think doing more than that is necessary
if you want to help out, feel free to "port" the docs to asciidoc (I used pandoc for this with bb) and then set something up (using the same stuff as babashka, asciidoctor) that generates an HTML page. Only if you want, no pressure
I'll see if I can scrounge up some time to give that a try! sounds like fun
the babashka book stuff lives here: https://github.com/babashka/book
but I think for clj-kondo I'd like the docs stuff to just live in the clj-kondo repo itself still
Is this a known issue?: a unused require warning when used in CLJC file and the require is used only on CLJ part of code?
I have tried the v2022.12.10
version and still hapens to us.
Just in case, have you tried running clj-kondo without the cache? rm -r .clj-kondo/.cache
Yes, this is standard behavior. if you're only using the namespace in one "target" you should wrap it in a reader conditional.
else it would be quite wasteful to include namespaces in a clojurescript bundle that aren't used right
the case is: i have a function that uses a macro in :clj condition but does not uses it on :cljs
I'm not using it in both because the underlying implementation is different, and one raises exceptions and the other no, so this is a legitimate use in my opinion
https://github.com/penpot/penpot/blob/develop/common/src/app/common/geom/shapes/transforms.cljc#L165
the ex/ignoring
is a macro that just ignores exception and returns nil
, it is used in one target but not in other