clj-kondo

https://github.com/clj-kondo/clj-kondo
ezmiller77 2021-03-14T00:43:45.310Z

Ended up adding an exclusion to .clj-kondo/config.edn for now.

ackerleytng 2021-03-14T05:50:26.310300Z

$ clj-kondo --lint project.clj
zsh: segmentation fault (core dumped)  clj-kondo --lint project.clj
Where should I start debugging?

lispyclouds 2021-03-14T07:36:45.311300Z

@ackerleytng are you using the static Linux binary by any chance?

ackerleytng 2021-03-14T23:41:48.313500Z

I was! I switched to the regular one and it worked.

1
lispyclouds 2021-03-15T05:43:59.316400Z

FYI, the static one is meant for OSes like alpine which uses musl. On others is a better idea to use the dynamic one. Static binaries have unforeseen issues unfortunately 😕

borkdude 2021-03-14T09:42:29.312700Z

@ezmiller77 Unresolved var is usually because some other namespace you are using defines vars using some unknown macro

borkdude 2021-03-14T09:42:42.313Z

You can exclude that namespace using :unresolved-var {:exclude [the.ns]}}

2021-03-14T11:07:49.313100Z

GH actions by default failed if exit code is not zero. You can wrap call to clj-kondo in a script which will catch exit code, analyze it and transform it to zero in case there's only warnings.

2021-03-14T12:08:56.313300Z

echo '(def x (def x 1))' | clj-kondo --lint - || if [[ $? = 2 ]]; then exit 0; else exit $?; fi
this snippet pipes output of clj-kondo to simple if/else expression which is transforming exit code 2 (more than one warning found but no errors) to exit 0 indicating that this should be OK result in the scope of GH actions.

ackerleytng 2021-03-14T23:41:48.313500Z

I was! I switched to the regular one and it worked.

1