Cursive/Intellij - 未定义 step_definitions 警告

Cursive/Intellij - undefined step_definitions warning

我正在使用 lein-cucumber 编写黄瓜测试。 我的测试服执行没有任何错误,但我的 IDE 标记了这些警告:

我已经在 Intellij 中安装了插件:cursivecucumbergherkin。但是这些警告仍然显示。

这是我的 project.clj 文件:

(defproject app version
  :dependencies [
  [org.clojure/clojure "1.8.0"]
  [org.clojure/tools.logging "0.4.0"]
  [org.clojure/tools.cli "0.3.5"]
  [org.clojure/data.json "0.2.6"]
  [clj-http "3.9.1"]
  [mysql/mysql-connector-java "5.1.38"]
  [org.slf4j/slf4j-log4j12 "1.7.25"]
  [log4j/log4j "1.2.17" :exclusions [javax.mail/mail
  javax.jms/jms
  com.sun.jmdk/jmxtools
  com.sun.jmx/jmxri]]
  [metosin/compojure-api "1.1.11"]
  [metosin/ring-swagger "0.24.3"]
  [compojure "1.6.0"]
  [cheshire "5.8.0"]
  [ring "1.6.3"]
  [ring/ring-json "0.4.0"]
  [ring-logger "0.7.7"]
  [environ "1.1.0"]
  [korma "0.4.3"]
  [blackwater "0.0.9"]
  [prismatic/schema "1.1.7"]
  [siili/humanize "0.1.1"]
  [amazonica "0.3.117"]
  [clj-time "0.14.2"]
  [ring-cors "0.1.12"]
  [commons-io "2.0"]
  ]

  :plugins      [
  [lein-ring "0.12.1"]
  [lein-cucumber "1.0.2"]
  [lein-cloverage "1.0.10"]
  [lein-kibit "0.1.6"]
  [lein-cloverage "1.0.10"]
  [lein-try "0.4.3"]
  [nightlight/lein-nightlight "1.0.0"]
  [jonase/eastwood "0.2.3"]
  [cider/cider-nrepl "0.16.0"]
  ]

  :min-lein-version "2.5.3"

  :ring {:handler app.api.handler/app}

  :source-paths ["src"]

  :resource-paths ["resources"]

  :test-paths ["test/unit"
  "test/features"]

  :cucumber-feature-paths ["test/features"]

  :profiles {:uberjar {:aot :all}}
  )

使用动态定义 vars/functions 的库时可能会发生这种情况。 Cursive 无法发现这些定义,因为它需要评估生成定义的代码。

Given is defined 来看似乎就是这种情况。我在 Amazonica 等基于 AWS SDK 生成定义的库中也看到了这一点。