Fork me on GitHub
#clj-kondo
<
2021-09-10
>
pez06:09:41

Hello, sorry for being lazy. Short of time! 😄 Is there a comment marker I can put in a file to stop linting of it?

borkdude07:09:45

@pez Can you give more context? I think we've been over this before with the Calva REPL window. Is this another use case?

Noah Bogart12:09:15

In javascript, you can write // eslint-disable and linting will stop until you write eslint-enable, so putting that at the top of the file effectively ignores the whole file

Noah Bogart12:09:39

Here’s a good description of what's possible: https://stackoverflow.com/a/56719951/3023252

borkdude12:09:16

We already have this in clj-kondo but only on the level of forms

borkdude12:09:08

so I'm asking questions to learn about the context of the problem

Noah Bogart12:09:25

Sure, I don’t mean to demand that kondo has this, just noting what might be the reasonable expectation of functionality

👍 2
pez15:09:39

So, I am not expecting this functionality. 😀 I have a lot of test files for testing various Calva features. Some of them have a lot of small forms and I create new files quite often. It would just be very convenient if I could add a comment to make the files more readable. It's fine with configuring it in some other file as well. Even if I would find a comment more easy at hand.

borkdude15:09:54

@pez yeah, I think you can configure that in .clj-kondo/config.edn right now

borkdude15:09:59

you can also put everything in your favorite comment and then add #_:clj-kondo/ignore on that, if that makes sense

❤️ 2
Noah Bogart15:09:53

Or :skip-comments in config, which I like a lot

👍 4