我正在使用lein-cucumber
编写黄瓜测试。
我的测试服执行时没有任何错误,但是我的IDE标记了以下警告:
我已将插件cursive
,cucumber
和gherkin
安装到Intellij中。但是这些警告仍然显示。
这是我的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}}
)
答案 0 :(得分:2)
使用动态定义变量/函数的库时可能会发生这种情况。草书无法发现这些定义,因为它需要评估生成这些定义的代码。
看Given
is defined的情况似乎是这样。我也已经在Amazonica之类的基于AWS SDK生成定义的库中看到了这一点。