Fork me on GitHub
#clj-kondo
<
2019-08-08
>
gordon15:08:22

Howdy! First things first, thank you for the work on clj-kondo, it's found a few genuine bugs for us, really useful bit of software. I think I've found a false-positive with the :missing-test-assertion linter in 2019.07.31-alpha

(ns false-positive.reproduction-test
  (:require [clojure.test :refer (are deftest)]))

(deftest missing-test-assertion-false-positive
  (are [v expected?] (expected? (contains? #{:bar :baz} v))
       :foo false?
       :bar true?
       :baz true?))
Results in the warning /Users/gordon/Development/foo/test/false_positive/reproduction_test.clj::: warning: missing test assertion I haven't reproduced this in a clean environment outside my employer's main repo, but we don't have any :missing-test-assertion config in .clj-kondo/config.edn so I hope it's generally valid. If not I'll happily put the legwork in to get a properly standalone test case.

gordon15:08:54

The line and column numbers are missing from the warning as well, I'm assuming that's down to the expansion of are.

borkdude15:08:05

this is definitely a bug

borkdude15:08:21

@gordonsyme_clojurians the code you posted is enough of a reproduction

👍 4
borkdude15:08:34

feel free to post it in an issue and this will be fixed in the next release

gordon15:08:49

Will do, thanks