Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit 772caee

Browse files
authored
Allow multiline config; standardise on one default config (#11)
1 parent df55d79 commit 772caee

File tree

16 files changed

+416
-552
lines changed

16 files changed

+416
-552
lines changed

.github/workflows/test.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,14 @@ jobs:
1818
with:
1919
path: ~/.ivy2/cache
2020
key: ivy-${{hashFiles('**/*.sbt')}}
21-
restore-keys: |
22-
ivy-
21+
restore-keys: ivy-
2322
- uses: actions/cache@v1
2423
with:
2524
path: ~/.sbt
2625
key: sbt-${{hashFiles('**/*.sbt')}}-${{hashFiles('project/build.properties')}}
27-
restore-keys: |
28-
sbt-
26+
restore-keys: sbt-
2927
- run: sbt +test
28+
- name: Run scalastyle using a snapshot version
29+
run: |
30+
sbt 'set version := "99-SNAPSHOT"; ++2.12.10; publishLocal'
31+
sbt -Dscalastyle.version=99-SNAPSHOT scalastyle

.gitignore

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ target
1010
.classpath
1111
.project
1212
.settings
13-
/bin
14-
/project/
15-
.bloop/
16-
.metals/
13+
bin
14+
project/project
15+
16+
.bloop
17+
.metals
18+
metals.sbt

.scalafix.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ LeakingImplicitClassVal,
44
NoAutoTupling,
55
NoValInForComprehension,
66
ProcedureSyntax,
7-
SortImports,
87
RemoveUnused
98
]
109

.scalastyle

Lines changed: 0 additions & 1 deletion
This file was deleted.

build.sbt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import sbt._
2+
import sbt.Keys.streams
23

34
enablePlugins(BuildInfoPlugin)
45

@@ -83,8 +84,10 @@ scalafixDependencies in ThisBuild ++= Seq(
8384
"org.scala-lang.modules" %% "scala-collection-migrations" % "2.1.3",
8485
"com.nequissimus" %% "sort-imports" % "0.3.1"
8586
)
86-
addCommandAlias("fix", "all compile:scalafix test:scalafix")
87-
addCommandAlias("fixCheck", ";compile:scalafix --check ;test:scalafix --check")
87+
addCommandAlias("fix", "all compile:scalafix test:scalafix; fixImports")
88+
addCommandAlias("fixImports", "compile:scalafix SortImports; test:scalafix SortImports")
89+
addCommandAlias("fixCheck", "compile:scalafix --check; test:scalafix --check; fixCheckImports")
90+
addCommandAlias("fixCheckImports", "compile:scalafix --check SortImports; test:scalafix --check SortImports")
8891
scalafmtOnCompile in ThisBuild :=
8992
sys.env
9093
.get("CI")

lib/scalastyle_config.xml

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

lib/scalastyle_scala_config.xml

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

project/build.sbt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
val scalastyleVersion = settingKey[String]("Scalastyle version")
2+
scalastyleVersion := sys.props.getOrElse("scalastyle.version", "1.1.1")
3+
4+
libraryDependencies += "com.beautiful-scala" %% "scalastyle" % scalastyleVersion.value

project/plugins.sbt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.10")
2-
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.9.0")
3-
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.2")
4-
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1")
5-
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.11")
6-
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.3.1")
1+
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.10")
2+
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.9.0")
3+
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.2")
4+
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1")
5+
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.11")
6+
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.3.1")
7+
addSbtPlugin("com.beautiful-scala" % "sbt-scalastyle" % "1.1.0")

scalastyle-config.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
src/main/resources/default_config.xml

0 commit comments

Comments
 (0)