This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-02-28
Channels
- # announcements (30)
- # architecture (9)
- # aws (2)
- # babashka (23)
- # beginners (55)
- # cider (22)
- # clj-kondo (40)
- # clojure (47)
- # clojure-europe (4)
- # clojure-france (2)
- # clojure-italy (17)
- # clojure-nl (16)
- # clojure-norway (1)
- # clojure-sanfrancisco (1)
- # clojure-seattle (1)
- # clojure-spec (12)
- # clojure-uk (34)
- # clojured (3)
- # clojurescript (15)
- # core-async (11)
- # cursive (19)
- # data-science (3)
- # emacs (7)
- # events (4)
- # figwheel-main (10)
- # fulcro (33)
- # graalvm (49)
- # graphql (11)
- # instaparse (1)
- # java (7)
- # kaocha (1)
- # leiningen (7)
- # malli (3)
- # meander (69)
- # pathom (9)
- # re-frame (4)
- # rum (2)
- # shadow-cljs (34)
- # spacemacs (9)
- # sql (29)
- # tree-sitter (1)
- # yada (3)
New clj-kondo release from Berlin with fellow contributor @rahul080327! https://github.com/borkdude/clj-kondo/releases/tag/v2020.02.28

Our jenkins seems to be having an issue with the new docker image, as there is no cat
command available on it. Apparently the docker workflow jenkins plugin uses cat
for some reason: https://github.com/jenkinsci/docker-workflow-plugin/blob/1089131014350e11adfa364d34e7717954350261/src/main/java/org/jenkinsci/plugins/docker/workflow/WithContainerStep.java#L198
.IOException: Failed to run image 'borkdude/clj-kondo:latest'. Error: docker: Error response from daemon: OCI runtime create failed: container_linux.go:346: starting container process caused "exec: \"cat\": executable file not found in $PATH": unknown.
at org.jenkinsci.plugins.docker.workflow.client.DockerClient.run(DockerClient.java:138)
at org.jenkinsci.plugins.docker.workflow.WithContainerStep$Execution.start(WithContainerStep.java:199)
at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:286)
at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:179)
at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:122)
https://stackoverflow.com/questions/55369726/jenkins-docker-container-always-adds-cat-command
I think the solution to fix this for jenkins would be to create your own image based and download the clj-kondo binary from the releases page in your own images.
there's also a workaround mentioned in that stack overflow link
and a mention that it might be fixed in the latest release of that plugin if you'd like to update and pray that updating something in Jenkins doesn't break everything you care about
my action setup:
name: Lint project with clj-kondo
on: [push]
jobs:
lint:
runs-on: ubuntu-latest
container: borkdude/clj-kondo:latest
steps:
- uses: actions/checkout@v1
- name: Run clj-kondo
run: clj-kondo --lint src plugins --config .clj-kondo/config.edn
probably could solve this annoying one 🙂 also, on clj-kondo repo i see different error (with @U04V4KLKC action) : COPY failed: stat /var/lib/docker/overlay2/16a7f7d20fb458c8fb4b3a87cec35c19dad2b97c14c5016c5658543373d5c549/merged/usr/local/bin/clj-kondo: no such file or directory
that's the problem I was seeing before using the static binary. The file existed, but when I attempted to run it I got a no such file or directory
error
but honestly runners should take care about such cases, wierd that jenkins and github don't have this thing taking in account -- if i understand the issue correct.
thanks for fast feedback! and also, i've removed one really hidden mistake in my code last week with help of clj-kondo -- thakns for this as well 🙂
This one should now work: https://hub.docker.com/layers/borkdude/clj-kondo/2020.02.29-SNAPSHOT/images/sha256-520b337167510d686ed5533a88d8dfdca4769b4ba3f83d60f17a561cb9cb0344?context=explore
docker is now building, should be released in a few minutes. we have to go to a conference dinner now. please notify us of success 🙂
This is the CI build: https://circleci.com/gh/borkdude/clj-kondo/8824
Sorry, I also was on conference dinner :) will check, but I tried pre release snapshot docker image -- it worked!
@borkdude, I was literally just having an issue yesterday with setting our automated builds to use clj-kondo related to alpine linux (or something we were doing, not sure what entirely, hoping this static version fixes that). What's your recommended way to automatically install the linux static version, since I don't see an obvious way to do it via the normally recommended install-clj-kondo
script?
@tanzoniteblack I would use the link from the releases page and update it every so often
that's what I was writing in to our docker build right now, so works for me 🙂
(also, thanks for this awesome piece of software and for fixing a problem you didn't even know I was having the very next day)
hey @borkdude, I having a false positive with
#(do [])
with redundant do
but its not redundant, if I remove the do
the call will fail
I think in your case using #(vector)
could be more idiomatic https://clojuredocs.org/clojure.core/vector
is there a short and sweet list of names of linters and what they do? I see https://github.com/borkdude/clj-kondo/blob/master/src/clj_kondo/impl/config.clj which lists out the various linters that are available, and I can guess based off the names, but I wasn't sure if I'm just missing a doc somewhere
@plins Actually I think the error might be coming from some other linter you're using, in clj-kondo this works fine:
$ clj-kondo --lint - <<< '#(do [])'
linting took 16ms, errors: 0, warnings: 0
@tanzoniteblack That's the place I link to from the config.md docs