Skip to content

Commit

Permalink
更新とか、よく使うやつとか。
Browse files Browse the repository at this point in the history
  • Loading branch information
stoneream committed Aug 5, 2024
1 parent 1e3cc95 commit 9993d76
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 36 deletions.
4 changes: 4 additions & 0 deletions .scalafix.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
rules = [
DisableSyntax,
RemoveUnused
]
20 changes: 14 additions & 6 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
version = "3.4.3"
runner.dialect = scala212
version = 3.8.2
runner.dialect = scala3
project.git = true

maxColumn = 160

# align

align.preset = none
align.stripMargin = true
align.multiline = true

# docstrings

docstrings.style = Asterisk
docstrings.wrap = no
docstrings.wrap = keep
docstrings.blankFirstLine = yes
assumeStandardLibraryStripMargin = true
importSelectors = singleLine

# rewrite

rewrite.rules = [SortImports]
lineEndings = preserve
14 changes: 6 additions & 8 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,13 @@ inThisBuild(

inThisBuild(
Seq(
scalaVersion := "3.3.0",
scalacOptions ++= List(
"-feature",
"-deprecation",
"-unchecked",
"-language:postfixOps"
scalaVersion := "3.4.2",
scalafmtOnCompile := true,
scalacOptions ++= Seq(
"-Yretain-trees",
"-Wunused:all"
),
scalafmtOnCompile := true
semanticdbEnabled := true
)
)

Expand All @@ -36,7 +35,6 @@ inThisBuild(
lazy val root = (project in file("."))
.settings(
name := "scala-template",
libraryDependencies ++= Dependencies.deps,
publish / skip := true
)

Expand Down
33 changes: 24 additions & 9 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,15 @@ import sbt._
object Dependencies {

object Versions {
val logback = "1.4.7"
val typesafeConfig = "1.4.2"
val scalatest = "3.2.15"
val logback = "1.5.6"
val typesafeConfig = "1.4.3"
val scopt = "4.1.0"
val circe = "0.14.9"
val circeOptics = "0.15.0"
val betterFiles = "3.9.2"
val scalatest = "3.2.18"
}

lazy val deps: Seq[ModuleID] = Seq(
logback,
typesafeConfig,
scalatest
).flatten

// logging
lazy val logback: Seq[ModuleID] = Seq(
"ch.qos.logback" % "logback-classic" % Versions.logback
Expand All @@ -24,6 +22,23 @@ object Dependencies {
"com.typesafe" % "config" % Versions.typesafeConfig
)

lazy val scopt: Seq[ModuleID] = Seq(
"com.github.scopt" %% "scopt" % Versions.scopt
)

// json
lazy val circe: Seq[ModuleID] = Seq(
"io.circe" %% "circe-core" % Versions.circe,
"io.circe" %% "circe-generic" % Versions.circe,
"io.circe" %% "circe-parser" % Versions.circe,
"io.circe" %% "circe-optics" % Versions.circeOptics
)

// utility
lazy val betterFiles: Seq[ModuleID] = Seq(
"com.github.pathikrit" %% "better-files" % Versions.betterFiles
)

// testing
lazy val scalatest: Seq[ModuleID] = Seq(
"org.scalatest" %% "scalatest" % Versions.scalatest % Test
Expand Down
3 changes: 2 additions & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.12.1")
3 changes: 0 additions & 3 deletions src/main/scala/app/Main.scala

This file was deleted.

9 changes: 0 additions & 9 deletions src/test/scala/app/MainSpec.scala

This file was deleted.

0 comments on commit 9993d76

Please sign in to comment.