Skip to content

Commit 5f82ee3

Browse files
author
reidspencer
committed
Various updates
* Remove wartremover for lack of Scala3 support * Update to scala 3.3.3 * Simplify configuration of Scala3 helper
1 parent e5ee473 commit 5f82ee3

4 files changed

Lines changed: 15 additions & 49 deletions

File tree

build.sbt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,4 @@ addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.11.1")
6767
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")
6868
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.9")
6969
addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.11")
70-
addSbtPlugin("org.wartremover" % "sbt-wartremover" % "3.1.5")
7170
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.16")

src/main/scala/com/ossuminc/sbt/OssumIncPlugin.scala

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
package com.ossuminc.sbt
22

3-
import com.ossuminc.sbt.helpers.WartRemover.Keys
43
import sbt.*
54
import sbt.Keys.*
65
import sbt.librarymanagement.Resolver
7-
import wartremover.Wart
86

97
object OssumIncPlugin extends AutoPlugin {
108

@@ -132,7 +130,6 @@ object OssumIncPlugin extends AutoPlugin {
132130
val scalafmt: ConfigFunc = helpers.Scalafmt.configure
133131
val scoverage: ConfigFunc = helpers.ScalaCoverage.configure
134132
val unidoc: ConfigFunc = helpers.Unidoc.configure
135-
val wartRemover: ConfigFunc = helpers.WartRemover.configure
136133

137134
def noPublishing(project: Project): Project = {
138135
project.settings(
@@ -150,12 +147,6 @@ object OssumIncPlugin extends AutoPlugin {
150147
)
151148
}
152149

153-
def wartsExcept(excluded: Seq[Wart])(project: Project): Project = {
154-
helpers.WartRemover.configure(project).settings {
155-
Keys.excludedWarts := excluded
156-
}
157-
}
158-
159150
def these(cfuncs: ConfigFunc*)(project: Project): Project = {
160151
cfuncs.foldLeft(project) { (p, func) =>
161152
p.configure(func)
@@ -173,7 +164,7 @@ object OssumIncPlugin extends AutoPlugin {
173164

174165
def everything(project: Project): Project = {
175166
project.configure(typical)
176-
these(java, misc, build_info, release, wartRemover)(project)
167+
these(java, misc, build_info, release)(project)
177168
}
178169

179170
def native(

src/main/scala/com/ossuminc/sbt/helpers/Scala3.scala

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,8 @@ object Scala3 extends AutoPluginHelper {
1010
"-deprecation",
1111
"-feature",
1212
"-new-syntax",
13-
// "-explain",
14-
// "-explain-types",
1513
"-Werror",
16-
"-pagewidth",
17-
"120"
14+
"-pagewidth:120"
1815
)
1916

2017
def scala_3_doc_options(version: String): Seq[String] = {
@@ -31,11 +28,21 @@ object Scala3 extends AutoPluginHelper {
3128
)
3229
}
3330

34-
def configure(project: Project): Project = {
31+
def configure(project: Project): Project = Scala3.configure(
32+
Option.empty[String],
33+
Seq.empty[String]
34+
)(project)
35+
36+
def configure(
37+
version: Option[String] = Option.empty[String],
38+
scala3Options: Seq[String] = Seq.empty[String]
39+
)(
40+
project: Project
41+
): Project = {
3542
project
3643
.settings(
37-
scalaVersion := "3.3.1",
38-
scalacOptions := scala_3_options,
44+
scalaVersion := version.getOrElse("3.3.3"),
45+
scalacOptions := scala_3_options ++ scala3Options,
3946
Compile / doc / scalacOptions := scala_3_doc_options((compile / scalaVersion).value),
4047
apiURL := Some(url("https://riddl.tech/apidoc/")),
4148
autoAPIMappings := true

src/main/scala/com/ossuminc/sbt/helpers/WartRemover.scala

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)