Fork me on GitHub
#clj-kondo
<
2022-12-20
>
mkvlr07:12:02

does someone have a github workflow to install an unreleased build of clj-kondo?

borkdude08:12:22

Two ways: • Use clj-kondo as a git dependency • Download a binary from one of the builds

borkdude10:12:08

I could make a --dev-build flag to install with the clj-kondo install script maybe, would take a couple of hours of work

borkdude10:12:17

babashka install script now supports that

pizzaspin 1
mkvlr11:12:07

@U04V15CAJ awesome, thank you!

mkvlr13:12:38

this one?

borkdude13:12:35

yes, but I was saying that the babashka install script supports --dev-build, the clj-kondo script doesn't yet

borkdude13:12:56

(just to be clear)

mkvlr13:12:55

where can I get that?

borkdude13:12:20

define "that"?

borkdude13:12:54

What I mean is, babashka supports installing a dev build of babashka in its install script

mkvlr13:12:21

ah ok, then I misunderstood

borkdude13:12:53

for now it's probably easiest to link to a amd linux binary from a recent circleci build

mkvlr13:12:32

do you have plans to do a release soon again maybe?

borkdude13:12:24

I aim for a monthly release since it's a bit of a hassle to release and if I'll do one, the high priority tickets here have to get fixed first: https://github.com/clj-kondo/clj-kondo/projects/1 So I think it's best to either use the git dep or download the pre-built dep from circleci or implement the --dev-build option

borkdude13:12:11

The only two changes so far are https://github.com/clj-kondo/clj-kondo/blob/master/CHANGELOG.md#unreleased Compare to the other releases which are often a bit more substantial

mkvlr13:12:40

alright, I’ll try one of those options

borkdude13:12:59

The download is valid for 30 days or so but by the time it invalidates, there will be a new clj-kondo release

mkvlr13:12:11

🎉

🎉 1
mkvlr07:12:37

is there a way to allow :refer-all but only in test namespaces?

borkdude08:12:12

You can do this by making a namespace group based on the name of the namespaces or pattern of the file + config-in-ns https://github.com/clj-kondo/clj-kondo/blob/master/doc/config.md#namespace-groups

borkdude08:12:26

Or by separately linting the test dirs with an additional --config argument

mkvlr08:12:09

ah nice, thanks

borkdude08:12:34

Or if this is only for clojure.test :refer :all then you can configure that in config.edn

mkvlr08:12:48

yep, I did that

mkvlr08:12:02

for clojure.test it works nicely

mkvlr08:12:26

except for one case where it doesn’t, curious if you see something wrong there, posted it in the ductile channel

borkdude08:12:54

:refer :all is making things a lot more difficult for clj-kondo and static analysis in general, problems are expected with multiple of those

mkvlr08:12:35

does that also apply to clojure.test or is there special handling for it?

mkvlr08:12:59

> problems are expected with multiple of those do you mean if referred names overlap or in general? Since kondo does analyze the required namespaces can’t you infer where a name is coming from?

borkdude08:12:32

I'll take a look in the ductile channel in a bit

borkdude09:12:11

I'm not sure what exactly I should be looking at

Eric Scott15:12:00

So I made a silly error in my deps.edn file that looks like this:

{:deps {<library> {:mvn/version ... :exclusions [[nested-too-deep]]}, ...}...}
It showed up as a cryptic stack trace, and seemed funny that this wasn't flagged as a spec viloation. I asked about this on #C03S1KBA2, and they suggested that clj-kondo might be able to catch this. Entering
clojure -M:kondo --lint deps.edn
Does not flag an error, but obvious syntax errors do get flagged. As I said, I think this is more of a spec violation. Am I using the wrong incantation?

borkdude15:12:04

This specific case hasn't been covered by clj-kondo, but feel free to post an issue about it

borkdude15:12:53

@ericdallo Would you mind bumping clj-kondo on clojure-lsp master, so @phillipmates and some other can install the nightly with some (for them) relevant changes? cc @mkvlr

ericdallo21:12:17

Bump to stable clj-kondo or a nightly specific kondo version?

borkdude21:12:36

nightly, most recent version on master

ericdallo21:12:52

Should be available on #C032YH7P0R2 soon

👍 1