A sbt plugin for stainless users to verify code in sbt command line.
Make sure your SBT version in project/build.properties:
sbt.version = 0.13.16 or
sbt.version = 1.0.0
Add the plugin in project/plugins.sbt:
addSbtPlugin("org.zjulambda.scala" % "sbt-stainless" % "0.2.0")
The default backend of stainless is scalac,if you want to use dotty,add this line in build.bst
stainlessBackend := "dotty"
And the default value of stainlessFlags
is Seq("--vccache")
.You can modify it in build.bst
as well.
Then,run sbt verify
,your code will be checked by stainless.
How to work with stainless smoothly.
- clone stainless on github
- compile it(
sbt clean compile
) - add
stainless/bin
intopath
- create a sbt project in a temporary directory.
- copy
stainless/frontends/library/stainless
tosrc/main/scala/
in the temporary sbt project. - run
sbt compile package
and you will get axxx.jar
file. - copy
xxx.jar
tolib/
in your stainless project. - add this plugin and enjoy coding in stainless.