From 846dcfb0f3967e578cd129f960ff4bdc6ad6bd80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bendix=20S=C3=A4ltz?= Date: Mon, 11 Jul 2022 08:03:36 +0200 Subject: [PATCH] Support Scala 2.12.16 (#655) * Support Scala 2.12.16 * Update SemanticDB * Not run for JDK 17 Co-authored-by: Sam --- .github/workflows/pr-checks.yml | 6 +++--- README.md | 2 +- build.sbt | 2 +- .../equality/ComparingUnrelatedTypesTest.scala | 8 ++++---- .../matching/PartialFunctionInsteadOfMatchTest.scala | 8 ++------ 5 files changed, 11 insertions(+), 15 deletions(-) diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index c32d625e..18f94b8f 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -11,11 +11,11 @@ jobs: java: [8, 11] scala: - 2.11.12 - - 2.12.13 - - 2.12.14 - - 2.13.5 + - 2.12.15 + - 2.12.16 - 2.13.6 - 2.13.7 + - 2.13.8 steps: - uses: actions/checkout@v2 - uses: olafurpg/setup-scala@v10 diff --git a/README.md b/README.md index d7a187fe..60afa42c 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.15%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.8%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 73eef739..7d81f7c6 100644 --- a/build.sbt +++ b/build.sbt @@ -23,7 +23,7 @@ developers := List( ) scalaVersion := "2.13.8" -crossScalaVersions := Seq("2.11.12", "2.12.14", "2.12.16", "2.13.7", "2.13.8") +crossScalaVersions := Seq("2.11.12", "2.12.15", "2.12.16", "2.13.7", "2.13.8") autoScalaLibrary := false crossVersion := CrossVersion.full crossTarget := { diff --git a/src/test/scala/com/sksamuel/scapegoat/inspections/equality/ComparingUnrelatedTypesTest.scala b/src/test/scala/com/sksamuel/scapegoat/inspections/equality/ComparingUnrelatedTypesTest.scala index ee027ec4..08031777 100644 --- a/src/test/scala/com/sksamuel/scapegoat/inspections/equality/ComparingUnrelatedTypesTest.scala +++ b/src/test/scala/com/sksamuel/scapegoat/inspections/equality/ComparingUnrelatedTypesTest.scala @@ -1,11 +1,11 @@ package com.sksamuel.scapegoat.inspections.equality -import com.sksamuel.scapegoat.InspectionTest +import com.sksamuel.scapegoat.{Inspection, InspectionTest} /** @author Stephen Samuel */ class ComparingUnrelatedTypesTest extends InspectionTest { - override val inspections = Seq(new ComparingUnrelatedTypes) + override val inspections: Seq[Inspection] = Seq(new ComparingUnrelatedTypes) private def verifyNoWarnings(code: String): Unit = { compileCodeSnippet(code) @@ -56,10 +56,10 @@ class ComparingUnrelatedTypesTest extends InspectionTest { } "for char" - { "compared to char-sized long literal" in { - verifyNoWarnings("""object A { val c = 'a'; val c = l == 97L }""") + verifyNoWarnings("""object A { val c = 'a'; val l = c == 97L }""") } "compared to char-sized int literal" in { - verifyNoWarnings("""object A { val c = 'a'; val c = l == 97 }""") + verifyNoWarnings("""object A { val c = 'a'; val l = c == 97 }""") } } "for short" - { diff --git a/src/test/scala/com/sksamuel/scapegoat/inspections/matching/PartialFunctionInsteadOfMatchTest.scala b/src/test/scala/com/sksamuel/scapegoat/inspections/matching/PartialFunctionInsteadOfMatchTest.scala index 24c821ae..35bbb847 100644 --- a/src/test/scala/com/sksamuel/scapegoat/inspections/matching/PartialFunctionInsteadOfMatchTest.scala +++ b/src/test/scala/com/sksamuel/scapegoat/inspections/matching/PartialFunctionInsteadOfMatchTest.scala @@ -1,11 +1,11 @@ package com.sksamuel.scapegoat.inspections.matching -import com.sksamuel.scapegoat.InspectionTest +import com.sksamuel.scapegoat.{Inspection, InspectionTest} /** @author Stephen Samuel */ class PartialFunctionInsteadOfMatchTest extends InspectionTest { - override val inspections = Seq(new PartialFunctionInsteadOfMatch) + override val inspections: Seq[Inspection] = Seq(new PartialFunctionInsteadOfMatch) "when using match instead of partial function" - { "should report warning" in { @@ -83,10 +83,6 @@ class PartialFunctionInsteadOfMatchTest extends InspectionTest { future onComplete { case _ => } - future onSuccess { - case _ => - } - } """.stripMargin