Fork me on GitHub

I use flycheck-joker and have problems with false positives related to clojure.test vars or similar ones that I require with :refer :all

(ns my-ns-test
  (:require [my-ns :as sut]
                 [clojure.test :refer :all]))

(deftest shortest-path
  (testing "ideal path"
    (is (= ...
Here the joker reports Unable to resolve symbol: deftest; also unused namespace clojure.test Does anyone know why is that and how can I fix it?


joker doesn't work well with use or :refer :all. If you do :refer :all, any symbol becomes potentially valid in your namespace, essentially preventing symbol resolution linting completely. If you want joker to resolve symbols (and warn on unresolved ones), always list all referred vars explicitely: :refer [deftest testing is are...]


alternatively, you can use qualified symbols:

(:require [clojure.test :as t])
(t/deftest shortest-path (t/testing ...))


Thanks for info. I (almost) always qualify symbols with some prefix but clojure.test is kind of handy exception since I've found it noisy to prefix everything with t/