Skip to content

Commit

Permalink
update UnmooredDocComment test
Browse files Browse the repository at this point in the history
  • Loading branch information
xuwei-k committed Feb 5, 2025
1 parent 35f885e commit 00bd05f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
10 changes: 4 additions & 6 deletions sbt-test/UnmooredDocComment/test-1/build.sbt
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
ThisBuild / scalafixDependencies += "com.github.xuwei-k" %% "scalafix-rules" % sys.props("scalafix-rules.version")

TaskKey[Unit]("check") := {
if(!scala.util.Properties.isWin) {
val actual = "target/warnings/warnings.json"
val expect = "expect.json"
sys.process.Process(Seq("diff", actual, expect)).!
assert(IO.read(file(actual)) == IO.read(file(expect)))
}
def f(x: String) = JsonParser.parse(IO.read(file(x))).fold(sys.error(_), identity)
val actual = f("target/warnings/warnings.json")
val expect = f("expect.json")
assert(actual == expect, s"${actual} != ${expect}")
}
1 change: 1 addition & 0 deletions sbt-test/UnmooredDocComment/test-1/project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % sys.props("scalafix.version"))
addSbtPlugin("com.github.xuwei-k" % "warning-diff-scalafix-plugin" % "0.6.0")
libraryDependencies += "io.github.argonaut-io" %% "argonaut" % "6.3.11"

0 comments on commit 00bd05f

Please sign in to comment.