Fork me on GitHub
#tools-deps
<
2020-10-11
>
Eamonn Sullivan13:10:44

Hi all. I have a real newbie question on deps.edn. I have the following to add cloverage to my project.

:cloverage
  {:extra-paths ["test"]
   :extra-deps {cloverage/cloverage {:mvn/version "RELEASE"}}
   :main-opts ["-m" "cloverage.coverage"
               "-p" "src"
               "-s" "test"
               "--fail-threshold" "90"]}
The cloverage docs say I should be able to provide a map of options somewhere, like using :fail-threshold instead of the args. How would I do that?

Alex Miller (Clojure team)14:10:42

I don’t think this is a deps.edn question, not sure how cloverage works

Eamonn Sullivan14:10:09

Ah, ok, sorry. I thought there was a key I could set like :options {:fail-threshold 90}. Told you it was a newbie question!

tvaughan15:10:08

$ cat tests.edn
#kaocha/v1
{:plugins [:kaocha.plugin/cloverage
           :noyoda.plugin/swap-actual-and-expected]
 :cloverage/opts {:fail-threshold 100}}

Eamonn Sullivan15:10:12

Ah, thank you. Perfect!

Eamonn Sullivan14:10:28

You can set project default settings for Cloverage in your project. That's all they mention in the docs and I have no idea that means, either. I'll just use the command-line arguments.

Alex Miller (Clojure team)14:10:34

Yeah, don’t know offhand

lread14:10:19

@eamonn.sullivan, I don’t know have active it is, but there is a #cloverage channel.

👍 3
practicalli-johnny17:10:05

@eamonn.sullivan kaocha test runner can also use cloverage too. I have aliases for both, but I don't think I used options yet. Will give them a try and interested to know how you get on https://practicalli.github.io/clojure-webapps/