2

I started using cloverage with leiningen. I want to excude calls to assert from the coverage report.

The following command works fine for me:

$ lein cloverage --exclude-call clojure.core/assert

However, when I put :cloverage {:exclude-call ["clojure.core/assert"]} into the project.clj file and I just call $ lein cloverage, then the parameter is ignored.

How should I configure cloverage from my leiningen project file?

EDIT: I understand that I could create an alias easily with the followings, however, I would prefer configuring it a cleaner way:

:aliases      {"coverage" ["cloverage" "--exclude-call" "clojure.core/assert"]}
erdos
  • 3,135
  • 2
  • 16
  • 27

1 Answers1

1

Hopefully you found a solution. For anyone coming across this post now:

I put the cloverage options under my test profile in my project.clj. So, you could try something like this in project.clj:

:profiles {:test {:cloverage {:exclude-call ["clojure.core/assert"]}}}

When I run cloverage from the command line, I have to do $ lein with-profile test cloverage.

Also, here's the post I used when figuring this out: Can I make lein cloverage skip specific tests?

Dharman
  • 30,962
  • 25
  • 85
  • 135
Matvei
  • 323
  • 1
  • 6