From 4b6945a9fb686d0177707f24635168b209d1537c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bendix=20S=C3=A4ltz?= Date: Thu, 20 Oct 2022 17:42:04 +0200 Subject: [PATCH] Drop Scala 2.11 & update dependencies (#693) --- .github/workflows/pr-checks.yml | 4 +-- README.md | 2 +- build.sbt | 27 +++++-------------- project/build.properties | 2 +- project/plugins.sbt | 4 +-- .../com/sksamuel/scapegoat/Feedback.scala | 2 +- 6 files changed, 13 insertions(+), 28 deletions(-) diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index 7211c8f2..527c82eb 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -10,10 +10,8 @@ jobs: matrix: java: [8, 11] scala: - - 2.11.12 - - 2.12.15 - 2.12.16 - - 2.13.8 + - 2.12.17 - 2.13.9 - 2.13.10 steps: diff --git a/README.md b/README.md index 75b2eb5c..911ad028 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Scapegoat [![Codecov](https://img.shields.io/codecov/c/github/sksamuel/scapegoat)](https://codecov.io/gh/sksamuel/scapegoat) [](http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22scalac-scapegoat-plugin_2.11.12%22) -[](http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22scalac-scapegoat-plugin_2.12.16%22) +[](http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22scalac-scapegoat-plugin_2.12.16%22) [](http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22scalac-scapegoat-plugin_2.13.10%22) [![Scala Steward badge](https://img.shields.io/badge/Scala_Steward-helping-blue.svg?style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAQCAMAAAARSr4IAAAAVFBMVEUAAACHjojlOy5NWlrKzcYRKjGFjIbp293YycuLa3pYY2LSqql4f3pCUFTgSjNodYRmcXUsPD/NTTbjRS+2jomhgnzNc223cGvZS0HaSD0XLjbaSjElhIr+AAAAAXRSTlMAQObYZgAAAHlJREFUCNdNyosOwyAIhWHAQS1Vt7a77/3fcxxdmv0xwmckutAR1nkm4ggbyEcg/wWmlGLDAA3oL50xi6fk5ffZ3E2E3QfZDCcCN2YtbEWZt+Drc6u6rlqv7Uk0LdKqqr5rk2UCRXOk0vmQKGfc94nOJyQjouF9H/wCc9gECEYfONoAAAAASUVORK5CYII=)](https://scala-steward.org) diff --git a/build.sbt b/build.sbt index 743ea83b..81f4d080 100644 --- a/build.sbt +++ b/build.sbt @@ -1,5 +1,5 @@ // compiler plugins -addCompilerPlugin("org.scalameta" % "semanticdb-scalac" % "4.5.13" cross CrossVersion.full) +addCompilerPlugin("org.scalameta" % "semanticdb-scalac" % "4.6.0" cross CrossVersion.full) name := "scalac-scapegoat-plugin" organization := "com.sksamuel.scapegoat" @@ -22,9 +22,8 @@ developers := List( ) ) - scalaVersion := "2.13.10" -crossScalaVersions := Seq("2.11.12", "2.12.16", "2.12.17", "2.13.8", "2.13.9", "2.13.10") +crossScalaVersions := Seq("2.12.16", "2.12.17", "2.13.9", "2.13.10") autoScalaLibrary := false crossVersion := CrossVersion.full crossTarget := { @@ -54,18 +53,7 @@ val scalac12Options = Seq( "-Xmax-classfile-name", "254" ) -val scalac11Options = Seq( - "-Ywarn-adapted-args", - "-Ywarn-inaccessible", - "-Ywarn-infer-any", - "-Ywarn-nullary-override", - "-Ywarn-dead-code", - "-Ywarn-nullary-unit", - "-Ywarn-numeric-widen", - "-Xmax-classfile-name", - "254" - // "-Ywarn-value-discard" -) + scalacOptions := { val common = Seq( "-unchecked", @@ -76,7 +64,6 @@ scalacOptions := { "-Xlint" ) common ++ (scalaBinaryVersion.value match { - case "2.11" => scalac11Options case "2.12" => scalac12Options case "2.13" => scalac13Options ++ (scalaVersion.value.split('.') match { @@ -105,16 +92,16 @@ def check(code: String) = { libraryDependencies ++= Seq( "org.scala-lang" % "scala-reflect" % scalaVersion.value % "provided", "org.scala-lang" % "scala-compiler" % scalaVersion.value % "provided", - "org.scala-lang.modules" %% "scala-xml" % "1.3.0" excludeAll ExclusionRule(organization = "org.scala-lang"), + "org.scala-lang.modules" %% "scala-xml" % "2.1.0" excludeAll ExclusionRule(organization = "org.scala-lang"), "org.scala-lang.modules" %% "scala-collection-compat" % "2.8.1" excludeAll ExclusionRule(organization = "org.scala-lang" ), "org.scala-lang" % "scala-compiler" % scalaVersion.value % "test", - "org.scalatest" %% "scalatest" % "3.2.13" % "test", + "org.scalatest" %% "scalatest" % "3.2.14" % "test", "org.mockito" % "mockito-all" % "1.10.19" % "test", - "joda-time" % "joda-time" % "2.11.1" % "test", + "joda-time" % "joda-time" % "2.11.2" % "test", "org.joda" % "joda-convert" % "2.2.2" % "test", - "org.slf4j" % "slf4j-api" % "2.0.1" % "test" + "org.slf4j" % "slf4j-api" % "2.0.3" % "test" ) // Test diff --git a/project/build.properties b/project/build.properties index 22af2628..563a014d 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.7.1 +sbt.version=1.7.2 diff --git a/project/plugins.sbt b/project/plugins.sbt index 6bbcf6ff..5a20c9d6 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -3,8 +3,8 @@ resolvers += Classpaths.sbtPluginReleases addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.10") addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.10") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6") -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.3") -addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.2") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.5") +addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.4") if (System.getProperty("add-scapegoat-plugin") == "true") addSbtPlugin(s"com.sksamuel.scapegoat" % "sbt-scapegoat" % "1.1.0") diff --git a/src/main/scala/com/sksamuel/scapegoat/Feedback.scala b/src/main/scala/com/sksamuel/scapegoat/Feedback.scala index 46fbb887..a2d01775 100644 --- a/src/main/scala/com/sksamuel/scapegoat/Feedback.scala +++ b/src/main/scala/com/sksamuel/scapegoat/Feedback.scala @@ -67,7 +67,7 @@ class Feedback( adjustedLevel match { case Levels.Error => reporter.error(pos, report) case Levels.Warning => reporter.warning(pos, report) - case Levels.Info => reporter.info(pos, report, force = false) + case Levels.Info => reporter.echo(pos, report) } } }