Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Scala 2.12.16 #655

Merged
merged 4 commits into from
Jul 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }""")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test was throwing and error but not failing because it was no scapegoat warning.

}
"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 {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was throwing an error as well because onSuccess doesn't exist anymore in Scala 2.13.

case _ =>
}


} """.stripMargin

Expand Down