-
Notifications
You must be signed in to change notification settings - Fork 21
Improve my car... ehh... sbt #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
3a90e5d
pimp my sbt
sideeffffect e958b10
Merge remote-tracking branch 'upstream/master' into pimp-my-sbt
sideeffffect f9ea866
merge fixes
sideeffffect f91edca
implement suggestions from review
sideeffffect d34ce31
unused imports
sideeffffect 3518d7e
Merge remote-tracking branch 'upstream/master' into pimp-my-sbt
sideeffffect 5768eae
changes base on review, mainly:
sideeffffect 9c04d5d
revert travis type push condition
sideeffffect e3fac64
coursier cache
sideeffffect 8bd18e3
bring back scala.language.higherKinds
sideeffffect 7b0e6cb
silencer 1.4.4
sideeffffect fa6e26a
remove unnecessary wartremover suppression
sideeffffect 159a648
implement suggestions from review
sideeffffect 22f949c
implement suggestions from review
sideeffffect f3a3ede
-Xfatal-warnings always
sideeffffect File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
rules = [ | ||
NoAutoTupling | ||
RemoveUnused | ||
LeakingImplicitClassVal | ||
NoValInForComprehension | ||
ProcedureSyntax | ||
DisableSyntax | ||
ExplicitResultTypes | ||
Disable | ||
] | ||
|
||
ExplicitResultTypes { | ||
unsafeShortenNames = true | ||
} | ||
|
||
Disable.ifSynthetic = [ | ||
"java/io/Serializable" | ||
"scala/Any" | ||
|
||
# when upstream broke noImplicitConversion and we don't agree that their | ||
# implicits are worth the mental burden. | ||
"scala/Option.option2Iterable" | ||
"scala/Predef.any2stringadd" | ||
|
||
# I don't understand why these are synthetic | ||
# https://github.com/scalacenter/scalafix/issues/703 | ||
{ | ||
regex = { | ||
includes = [ | ||
"^\\Qscala/collection/MapLike#apply().\\E$" | ||
"^\\Qscala/collection/LinearSeqOptimized#apply().\\E$" | ||
] | ||
} | ||
message = "not a total function" | ||
} | ||
] |
This file contains hidden or 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 hidden or 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 |
---|---|---|
|
@@ -3,18 +3,11 @@ ThisBuild / homepage := Some(url("https://github.com/avast/scala-server-toolkit" | |
ThisBuild / description := "Functional programming toolkit for building server applications in Scala." | ||
ThisBuild / licenses := Seq("MIT" -> url("https://raw.githubusercontent.com/avast/scala-server-toolkit/master/LICENSE")) | ||
ThisBuild / developers := List(Developer("jakubjanecek", "Jakub Janecek", "[email protected]", url("https://www.avast.com"))) | ||
ThisBuild / scmInfo := Some( | ||
ScmInfo(url("https://github.com/avast/scala-server-toolkit"), "scm:git:[email protected]:avast/scala-server-toolkit.git") | ||
) | ||
|
||
ThisBuild / scalaVersion := "2.12.10" | ||
ThisBuild / scalacOptions := ScalacOptions.default | ||
|
||
ThisBuild / turbo := true | ||
|
||
lazy val commonSettings = Seq( | ||
lazy val commonSettings = BuildSettings.common ++ Seq( | ||
libraryDependencies ++= Seq( | ||
compilerPlugin(Dependencies.kindProjector), | ||
Dependencies.catsEffect, | ||
Dependencies.logbackClassic % Test, | ||
Dependencies.scalaTest % Test | ||
sideeffffect marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
@@ -33,8 +26,8 @@ lazy val root = project | |
lazy val example = project | ||
.dependsOn(jvmExecution, http4sBlazeClient, http4sBlazeServer, jvmSsl, jvmSystem, pureconfig) | ||
.enablePlugins(MdocPlugin) | ||
.settings(commonSettings) | ||
jakubjanecek marked this conversation as resolved.
Show resolved
Hide resolved
|
||
.settings( | ||
commonSettings, | ||
name := "scala-server-toolkit-example", | ||
publish / skip := true, | ||
run / fork := true, | ||
|
@@ -92,8 +85,11 @@ lazy val jvmSystem = project | |
) | ||
|
||
lazy val pureconfig = project | ||
.settings(commonSettings) | ||
.settings( | ||
commonSettings, | ||
name := "scala-server-toolkit-pureconfig", | ||
libraryDependencies += Dependencies.pureConfig | ||
) | ||
|
||
addCommandAlias("check", "; scalafmtSbtCheck; scalafmtCheckAll; compile:scalafix --check ; test:scalafix --check") | ||
addCommandAlias("fix", "; scalafmtSbt; scalafmtAll; compile:scalafix ; test:scalafix") |
This file contains hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import sbt.Keys._ | ||
import sbt._ | ||
import scalafix.sbt.ScalafixPlugin.autoImport._ | ||
import wartremover.WartRemover.autoImport._ | ||
|
||
object BuildSettings { | ||
lazy val common = Seq( | ||
ThisBuild / scalaVersion := "2.12.10", | ||
libraryDependencies ++= Seq( | ||
compilerPlugin(Dependencies.kindProjector), | ||
compilerPlugin(Dependencies.silencer), | ||
compilerPlugin(scalafixSemanticdb), // for scalafix | ||
Dependencies.silencerLib | ||
), | ||
Compile / compile / wartremoverErrors ++= Warts.all filterNot Set( | ||
Wart.Nothing, // keep, false positives all around | ||
Wart.Overloading, | ||
Wart.Any, // keep, false positives all around | ||
Wart.Equals, // keep, easier that way | ||
Wart.ToString, // keep, easier that way | ||
Wart.Product, // keep, false positives all around | ||
Wart.Serializable, // keep, false positives all around | ||
Wart.DefaultArguments // for constructors for PureConfig | ||
), | ||
ThisBuild / scalafixDependencies ++= Seq( | ||
Dependencies.scalazzi // https://github.com/scalaz/scalazzi | ||
), | ||
scalacOptions ++= Seq( | ||
"-Yrangepos", // for scalafix. required by SemanticDB compiler plugin | ||
"-Ywarn-unused", // for scalafix. not present in sbt-tpolecat for 2.13 | ||
"-P:silencer:checkUnused" | ||
), | ||
Test / publishArtifact := false, | ||
Test / test / wartremoverErrors := (Compile / compile / wartremoverErrors).value filterNot Set( | ||
Wart.MutableDataStructures, | ||
Wart.OptionPartial, | ||
Wart.AsInstanceOf, | ||
Wart.EitherProjectionPartial | ||
) | ||
) | ||
} |
This file contains hidden or 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 was deleted.
Oops, something went wrong.
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.