Skip to content

"Unable to resolve symbol: deftest" when using :refer :all #52

@jumarko

Description

@jumarko

I'm using flycheck-joker in spacemacs and I'm very happy with what it provides.
However, one thing that bothers me quite a lot is that joker reports deftest and is as unresolved symbols.
Here's the minimal repro for me:

(ns myapp.util-test
  (:require [myapp.util :as u]
                 [clojure.test :refer :all]))

(deftest namespaced-map
  (testing "keys are namespaced"
    (let [unqualified-keys {:name "Juraj" :age 32}
          qualified-keys #:user{:name "Juraj" :age 32}]
      (is (= qualified-keys unqualified-keys)))))

Here's the screenshot:
image

I realized that this might be because deftest and is are macros so I tried to add following to ~/.joker (inspired by https://github.com/candid82/joker#reducing-false-positives):

{:known-macros [clojure.test/deftest clojure.test/testing clojure.test/is clojure.test/are]}

No success, however.

Any ideas why that happens?
Is it something that should work out of the box?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions