Skip to content

Commit fe92d4e

Browse files
committed
scalacOptions ++=Seq("-Yexplicit-nulls", "-Werror", "-Wunused:all")
1 parent f83ef82 commit fe92d4e

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ https://jitpack.io/#Kright/ArrayView
2020

2121
gradle:
2222
```
23-
implementation "com.github.Kright.ArrayView:arrayview_3:0.1.3"
23+
implementation "com.github.Kright.ArrayView:arrayview_3:0.1.4"
2424
```
2525

2626
sbt:
2727
```
28-
libraryDependencies += "com.github.Kright.ArrayView" % "arrayview" % "0.1.3"
28+
libraryDependencies += "com.github.Kright.ArrayView" % "arrayview" % "0.1.4"
2929
```
3030

3131
## Examples

arrayview/shared/src/main/scala/com/github/kright/arrayview/ArrayView2d.scala

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,6 @@ trait ArrayView2d[T] extends ArrayViewNd[T, ArrayView2d[T]]:
105105
if (hasSimpleFlatLayout) this
106106
else copy
107107

108-
private def checkRange(first: Int, last: Int, max: Int): Unit =
109-
require(0 <= first && first < max)
110-
require(0 <= last && last < max)
111-
112108

113109
def transposed(using ClassTag[T]): ArrayView2dImpl[T] =
114110
ArrayView2dImpl[T](

build.sbt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import pl.project13.scala.sbt.JmhPlugin
22

33
ThisBuild / version := "0.1.4-SNAPSHOT"
44

5-
ThisBuild / scalaVersion := "3.3.6"
5+
ThisBuild / scalaVersion := "3.3.6" // LTS version
66

77
ThisBuild / licenses := List(License.MIT)
88
ThisBuild / startYear := Some(2025)
@@ -13,6 +13,13 @@ lazy val scalatestSettings = Seq(
1313
libraryDependencies += "org.scalatestplus" %% "scalacheck-1-18" % "3.2.19.0" % "test",
1414
)
1515

16+
lazy val compilerFlags =
17+
scalacOptions ++= Seq(
18+
"-Yexplicit-nulls",
19+
"-Werror",
20+
"-Wunused:all",
21+
)
22+
1623
lazy val root = (project in file("."))
1724
.settings(
1825
name := "arrayview",
@@ -26,11 +33,13 @@ lazy val root = (project in file("."))
2633
lazy val arrayview = crossProject(JSPlatform, JVMPlatform)
2734
.withoutSuffixFor(JVMPlatform)
2835
.in(file("arrayview"))
36+
.settings(compilerFlags)
2937
.settings(scalatestSettings *)
3038

3139
lazy val benchmark = project
3240
.in(file("benchmark"))
3341
.enablePlugins(JmhPlugin)
42+
.settings(compilerFlags)
3443
.settings(
3544
name := "arrayview-benchmark",
3645
scalaVersion := "3.7.1",

0 commit comments

Comments
 (0)