Skip to content

Commit

Permalink
Support Scala 2.12.16 (#655)
Browse files Browse the repository at this point in the history
* Support Scala 2.12.16

* Update SemanticDB

* Not run for JDK 17

Co-authored-by: Sam <[email protected]>
  • Loading branch information
saeltz and sksamuel authored Jul 11, 2022
1 parent 2cbbf79 commit 846dcfb
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 15 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
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.15.svg?label=latest%20release%20for%202.12.15"/>](http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22scalac-scapegoat-plugin_2.12.15%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.13.8.svg?label=latest%20release%20for%202.13.8"/>](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)

Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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 := {
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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" - {
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -83,10 +83,6 @@ class PartialFunctionInsteadOfMatchTest extends InspectionTest {
future onComplete {
case _ =>
}
future onSuccess {
case _ =>
}
} """.stripMargin

Expand Down

0 comments on commit 846dcfb

Please sign in to comment.