Skip to content

Commit

Permalink
Drop Scala 2.11 & update dependencies (#693)
Browse files Browse the repository at this point in the history
  • Loading branch information
saeltz authored Oct 20, 2022
1 parent 87f9d1a commit 4b6945a
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 28 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Scapegoat

[![Codecov](https://img.shields.io/codecov/c/github/sksamuel/scapegoat)](https://codecov.io/gh/sksamuel/scapegoat)
[<img src="https://img.shields.io/maven-central/v/com.sksamuel.scapegoat/scalac-scapegoat-plugin_2.11.12.svg?label=latest%20release%20for%202.11.12"/>](http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22scalac-scapegoat-plugin_2.11.12%22)
[<img src="https://img.shields.io/maven-central/v/com.sksamuel.scapegoat/scalac-scapegoat-plugin_2.12.16.svg?label=latest%20release%20for%202.12.16"/>](http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22scalac-scapegoat-plugin_2.12.16%22)
[<img src="https://img.shields.io/maven-central/v/com.sksamuel.scapegoat/scalac-scapegoat-plugin_2.12.16.svg?label=latest%20release%20for%202.12.17"/>](http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22scalac-scapegoat-plugin_2.12.16%22)
[<img src="https://img.shields.io/maven-central/v/com.sksamuel.scapegoat/scalac-scapegoat-plugin_2.13.10.svg?label=latest%20release%20for%202.13.10"/>](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)

Expand Down
27 changes: 7 additions & 20 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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 := {
Expand Down Expand Up @@ -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",
Expand All @@ -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 {
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.7.1
sbt.version=1.7.2
4 changes: 2 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/com/sksamuel/scapegoat/Feedback.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}
Expand Down

0 comments on commit 4b6945a

Please sign in to comment.