Fork me on GitHub
#clj-kondo
<
2022-03-29
>
jamescroft08:03:52

Hi 👋 . Just wondering if there is a reason that :namespace-definitions doesn’t include the :end-row and :end-col keys, or whether they are something that could be added?

borkdude08:03:58

@U06790Y4E does you mean, the end of the ns form?

borkdude08:03:05

or what should end-row and end-col be?

jamescroft08:03:42

Yes, given :row and :col correspond to the start of the ns form (I think), it would be good to have end-row and end-col correspond to the end of the ns form. Like how var-definitions works.

borkdude08:03:51

I think that makes sense. Issue + optional PR welcome

👍 1
borkdude08:03:01

May I ask how you are using this?

jamescroft08:03:44

Sure. I am using the analysis data to find things and extract the text from the source strings. I need the start and end for this.

borkdude08:03:47

Yep, makes sense

andrea.crotti14:03:38

couple of things I always struggled a bit with clj-kondo config (also because I haven't done it so much) • I never know how to exclude something properly, for example for unresolved-symbol it takes a list while for unused-referred-var requires a map. And also not all the linters can have an exclude right? • silly mistakes in the config just fail silently, for example I had :unused-import as top level key instead of under linters and you don't get any warnings. I think in theory is possible to do a schema check of the whole config right to see that the structure/types are correct? Anyone has thoughts about these two points?

borkdude14:03:17

@andrea.crotti All linter docs are in https://github.com/clj-kondo/clj-kondo/blob/master/doc/linters.md There could be some improvements to linting clj-kondo's own config. There's also ready something in place for that.

andrea.crotti15:03:38

yeah I know I use the docs, so every possible configuration would be mentioned there then?

andrea.crotti15:03:02

wherever exclude is not mentioned it just means is not supported for that linter right?

borkdude15:03:19

> so every possible configuration would be mentioned there then? yes and yes