From 301d947da4fda1ef420ef3b94d7f6b0e1647a1a9 Mon Sep 17 00:00:00 2001 From: Enno Runne <458526+ennru@users.noreply.github.com> Date: Thu, 27 Jan 2022 14:18:41 +0100 Subject: [PATCH] disable Checkstyle and JaCoCo; fix html5 compliance --- build.sbt | 70 ++++++++++--------- .../com/typesafe/config/ConfigFactory.java | 5 +- project/plugins.sbt | 4 +- 3 files changed, 41 insertions(+), 38 deletions(-) diff --git a/build.sbt b/build.sbt index 011b8baf8..48338b8fe 100644 --- a/build.sbt +++ b/build.sbt @@ -47,8 +47,8 @@ lazy val root = (project in file(".")) doc := (configLib / Compile / doc).value packageDoc / aggregate := false packageDoc := (configLib / Compile / packageDoc).value - checkstyle / aggregate := false - checkstyle := (configLib / Compile / checkstyle).value +// checkstyle / aggregate := false +// checkstyle := (configLib / Compile / checkstyle).value PgpKeys.publishSigned / aggregate := false PgpKeys.publishSigned := (configLib / PgpKeys.publishSigned).value PgpKeys.publishLocalSigned / aggregate := false @@ -105,40 +105,42 @@ lazy val configLib = Project("config", file("config")) .setPreference(IndentSpaces, 4) .setPreference(FirstArgumentOnNewline, Preserve) - checkstyleConfigLocation := CheckstyleConfigLocation.File((baseDirectory.value / "checkstyle-config.xml").toString) - - Compile / checkstyle := { - val log = streams.value.log - (Compile / checkstyle).value - val resultFile = (Compile / checkstyleOutputFile).value - val results = scala.xml.XML.loadFile(resultFile) - val errorFiles = results \\ "checkstyle" \\ "file" - - def errorFromXml(node: scala.xml.NodeSeq): (String, String, String) = { - val line: String = (node \ "@line" text) - val msg: String = (node \ "@message" text) - val source: String = (node \ "@source" text) - (line, msg, source) - } - def errorsFromXml(fileNode: scala.xml.NodeSeq): Seq[(String, String, String, String)] = { - val name: String = (fileNode \ "@name" text) - val errors = (fileNode \\ "error") map { e => errorFromXml(e) } - errors map { case (line, error, source) => (name, line, error, source) } - } - - val errors = errorFiles flatMap { f => errorsFromXml(f) } - - if (errors.nonEmpty) { - for (e <- errors) { - log.error(s"${e._1}:${e._2}: ${e._3} (from ${e._4})") - } - throw new RuntimeException(s"Checkstyle failed with ${errors.size} errors") - } - log.info("No errors from checkstyle") - } +// checkstyleConfigLocation := CheckstyleConfigLocation.File((baseDirectory.value / "checkstyle-config.xml").toString) + +// Compile / checkstyle := { +// val log = streams.value.log +// (Compile / checkstyle).value +// val resultFile = (Compile / checkstyleOutputFile).value +// val results = scala.xml.XML.loadFile(resultFile) +// val errorFiles = results \\ "checkstyle" \\ "file" +// +// def errorFromXml(node: scala.xml.NodeSeq): (String, String, String) = { +// val line: String = (node \ "@line" text) +// val msg: String = (node \ "@message" text) +// val source: String = (node \ "@source" text) +// (line, msg, source) +// } +// def errorsFromXml(fileNode: scala.xml.NodeSeq): Seq[(String, String, String, String)] = { +// val name: String = (fileNode \ "@name" text) +// val errors = (fileNode \\ "error") map { e => errorFromXml(e) } +// errors map { case (line, error, source) => (name, line, error, source) } +// } +// +// val errors = errorFiles flatMap { f => errorsFromXml(f) } +// +// if (errors.nonEmpty) { +// for (e <- errors) { +// log.error(s"${e._1}:${e._2}: ${e._3} (from ${e._4})") +// } +// throw new RuntimeException(s"Checkstyle failed with ${errors.size} errors") +// } +// log.info("No errors from checkstyle") +// } // add checkstyle as a dependency of doc - Compile / doc := ((Compile / doc).dependsOn(Compile / checkstyle)).value + Compile / doc := (Compile / doc) +// .dependsOn(Compile / checkstyle) + .value findbugsReportType := Some(FindbugsReport.Html) findbugsReportPath := Some(crossTarget.value / "findbugs.html") diff --git a/config/src/main/java/com/typesafe/config/ConfigFactory.java b/config/src/main/java/com/typesafe/config/ConfigFactory.java index 3f50ab168..f64fe78f9 100644 --- a/config/src/main/java/com/typesafe/config/ConfigFactory.java +++ b/config/src/main/java/com/typesafe/config/ConfigFactory.java @@ -617,9 +617,10 @@ public static Config systemProperties() { *
* Environment variables are mangled in the following way after stripping the prefix "CONFIG_FORCE_": *
Env Var | - *Config | + *Env Var | + *Config | *
---|---|---|---|
_ [1 underscore] | diff --git a/project/plugins.sbt b/project/plugins.sbt index e6c1bbd8b..509eb20b7 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,10 +1,10 @@ addSbtPlugin("com.github.sbt" % "sbt-findbugs" % "2.0.0") -addSbtPlugin("com.github.sbt" % "sbt-jacoco" % "3.4.0") +//addSbtPlugin("com.github.sbt" % "sbt-jacoco" % "3.4.0") addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.1.1") addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.9.6") addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.8.3") -addSbtPlugin("com.etsy" % "sbt-checkstyle-plugin" % "3.1.1") +//addSbtPlugin("com.etsy" % "sbt-checkstyle-plugin" % "3.1.1") addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.2") addSbtPlugin("com.eed3si9n" % "sbt-nocomma" % "0.1.0")