-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1914 from dedis/work-be2-thibault-linter-integration
[BE2] Integration of linter in the main code
- Loading branch information
Showing
26 changed files
with
415 additions
and
303 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,17 @@ | ||
rules = [ | ||
DisableSyntax, | ||
OrganizeImports, | ||
RedundantSyntax | ||
ArraysInFormat, | ||
CatchNpe, | ||
ComparingFloatingTypes, | ||
EmptyInterpolatedString, | ||
IllegalFormatString, | ||
ImpossibleOptionSizeCondition, | ||
IncorrectlyNamedExceptions, | ||
IncorrectNumberOfArgsToFormat, | ||
LonelySealedTrait, | ||
MapGetAndGetOrElse, | ||
NanComparison, | ||
OptionGet, | ||
OptionSize, | ||
StripMarginOnRegex, | ||
TryGet | ||
] | ||
OrganizeImports.removeUnused = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,20 @@ | ||
lazy val V = _root_.scalafix.sbt.BuildInfo | ||
lazy val rulesCrossVersions = Seq(V.scala213, V.scala212) | ||
lazy val rulesCrossVersions = Seq(V.scala213) | ||
lazy val scala3Version = "3.3.1" | ||
|
||
inThisBuild( | ||
List( | ||
organization := "dedis", | ||
organization := "io.github.dedis", | ||
organizationName := "dedis", | ||
organizationHomepage := Some(url("https://dedis.epfl.ch")), | ||
homepage := Some(url("https://github.com/dedis/popstellar")), | ||
licenses := List("AGPL 3.0" -> url("https://www.gnu.org/licenses/agpl-3.0.en.html")), | ||
developers := List(Developer("t1b00", "Thibault Czarniak", "[email protected]", url("https://www.linkedin.com/in/thcz/"))), | ||
semanticdbEnabled := true, | ||
semanticdbVersion := scalafixSemanticdb.revision | ||
semanticdbVersion := scalafixSemanticdb.revision, | ||
scmInfo := Some(ScmInfo(url("https://github.com/dedis/popstellar"), "scm:git@github:dedis/popstellar.git")), | ||
version := "1.0", | ||
versionScheme := Some("pvp"), | ||
) | ||
) | ||
|
||
|
@@ -20,14 +28,13 @@ lazy val `popstellar` = (project in file(".")) | |
.settings( | ||
publish / skip := true | ||
) | ||
|
||
lazy val rules = projectMatrix | ||
.settings( | ||
moduleName := "scalafix", | ||
libraryDependencies += "ch.epfl.scala" %% "scalafix-core" % V.scalafixVersion | ||
moduleName := "scapegoat-scalafix", | ||
libraryDependencies += "ch.epfl.scala" % "scalafix-core_2.13" % V.scalafixVersion, | ||
) | ||
.defaultAxes(VirtualAxis.jvm) | ||
.jvmPlatform(rulesCrossVersions) | ||
.jvmPlatform(rulesCrossVersions :+ scala3Version) | ||
|
||
lazy val input = projectMatrix | ||
.settings( | ||
|
@@ -52,6 +59,7 @@ lazy val testsAggregate = Project("tests", file("target/testsAggregate")) | |
lazy val tests = projectMatrix | ||
.settings( | ||
publish / skip := true, | ||
scalaVersion := V.scala213, | ||
scalafixTestkitOutputSourceDirectories := | ||
TargetAxis | ||
.resolve(output, Compile / unmanagedSourceDirectories) | ||
|
@@ -70,20 +78,16 @@ lazy val tests = projectMatrix | |
.defaultAxes( | ||
rulesCrossVersions.map(VirtualAxis.scalaABIVersion) :+ VirtualAxis.jvm: _* | ||
) | ||
.jvmPlatform( | ||
scalaVersions = Seq(V.scala212), | ||
axisValues = Seq(TargetAxis(scala3Version)), | ||
settings = Seq() | ||
) | ||
.jvmPlatform( | ||
scalaVersions = Seq(V.scala213), | ||
axisValues = Seq(TargetAxis(V.scala213)), | ||
settings = Seq() | ||
) | ||
.jvmPlatform( | ||
scalaVersions = Seq(V.scala212), | ||
axisValues = Seq(TargetAxis(V.scala212)), | ||
scalaVersions = Seq(V.scala213), | ||
axisValues = Seq(TargetAxis(scala3Version)), | ||
settings = Seq() | ||
) | ||
|
||
.dependsOn(rules) | ||
.enablePlugins(ScalafixTestkitPlugin) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
resolvers += Resolver.sonatypeRepo("releases") | ||
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.12.0") | ||
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.12.1") | ||
addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.9.2") | ||
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7") |
Oops, something went wrong.