Skip to content

Commit 59ff42a

Browse files
scala-stewardhugo-vrijswijk
authored andcommitted
Update scalafmt-core to 2.3.0 (#315)
* Update scalafmt-core to 2.3.0 * Formatting
1 parent f7e8827 commit 59ff42a

13 files changed

Lines changed: 24 additions & 11 deletions

File tree

.scalafmt.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = 2.2.2
1+
version = 2.3.0
22
edition = latest
33
project.git = true
44
lineEndings = unix

bin/scalafmt

3.4 KB
Binary file not shown.

core/src/main/scala/stryker4s/config/ConfigReader.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ object ConfigReader extends ConfigReaderImplicits with Logging {
4848
private class Reader[T] private (file: File, onFailure: PartialFunction[ConfigReaderFailures, Reader.Result[T]])(
4949
implicit derivation: Derivation[PureConfigReader[T]]
5050
) {
51+
5152
/**
5253
* Handle certain [[ConfigReaderFailures]] by providing a way to return a [[Reader.Result]]
5354
* if they occur
@@ -97,6 +98,7 @@ object ConfigReader extends ConfigReaderImplicits with Logging {
9798
}
9899

99100
private object Failure {
101+
100102
/**
101103
* When the config-parsing fails because of an unknown key in the configuration, a
102104
* derivation for the [[PureConfigReader]] is provided that does not fail

core/src/main/scala/stryker4s/config/Thresholds.scala

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,9 @@ case class Thresholds(high: Int = 80, low: Int = 60, break: Int = 0) {
1111
throw InvalidThresholdValueException(s"'low'($low) must be greater than 'break'($break).")
1212

1313
private def failIfNotPercentage(values: Int*): Unit = {
14-
values.foreach(
15-
value =>
16-
if (value < 0 || value > 100)
17-
throw InvalidThresholdValueException(s"Threshold values must be 0-100. Current: $value.")
14+
values.foreach(value =>
15+
if (value < 0 || value > 100)
16+
throw InvalidThresholdValueException(s"Threshold values must be 0-100. Current: $value.")
1817
)
1918
}
2019
}

core/src/main/scala/stryker4s/config/implicits/ConfigReaderImplicits.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import stryker4s.config._
88
import pureconfig.generic.semiauto._
99

1010
trait ConfigReaderImplicits {
11+
1112
/** Converts a [[java.nio.file.Path]] to a [[better.files.File]] so PureConfig can read it
1213
*
1314
*/

core/src/main/scala/stryker4s/extension/FileExtensions.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import stryker4s.config.Config
77

88
object FileExtensions {
99
implicit class RelativePathExtension(file: File) {
10+
1011
/** The path relative to the base-dir of the project.
1112
* <br>
1213
* For example, with the file `projectRoot/src/main`, this function will return `src/main`

core/src/main/scala/stryker4s/extension/TreeExtensions.scala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ object TreeExtensions {
1616
}
1717

1818
implicit class TopStatementExtension(thisTerm: Term) {
19+
1920
/** Returns the statement this tree is part of.
2021
* Recursively going up the tree until a full statement is found.
2122
*/
@@ -32,6 +33,7 @@ object TreeExtensions {
3233
*
3334
*/
3435
private object PartialStatement {
36+
3537
/**
3638
* @return A Some of the parent if the given term is a partial statement,
3739
* else a None if the given term is a full statement
@@ -49,6 +51,7 @@ object TreeExtensions {
4951
*
5052
*/
5153
private object ParentIsPatternMatch {
54+
5255
/** Go up the tree, until a Case is found, then go up until a `Term` is found
5356
*
5457
*/
@@ -68,6 +71,7 @@ object TreeExtensions {
6871
}
6972

7073
implicit class FindExtension(thisTree: Tree) {
74+
7175
/** Searches for the given statement in the tree
7276
*
7377
* @param toFind Statement to find
@@ -79,6 +83,7 @@ object TreeExtensions {
7983
}
8084

8185
implicit class TransformOnceExtension(thisTree: Tree) {
86+
8287
/** The normal <code>Tree#transform</code> recursively transforms the tree each time a transformation is applied
8388
* This causes a StackOverflowError when the transformation that is searched for is also present in the newly transformed tree. <br>
8489
* This function does not recursively go into the transformed tree
@@ -96,6 +101,7 @@ object TreeExtensions {
96101
}
97102

98103
implicit class TreeIsInExtension(thisTree: Tree) {
104+
99105
/** Returns if a tree is contained in an tree of type `[T]`.
100106
* Recursively going up the tree until an annotation is found.
101107
*/
@@ -104,6 +110,7 @@ object TreeExtensions {
104110
}
105111

106112
implicit class IsEqualExtension(thisTree: Tree) {
113+
107114
/** Structural equality for Trees
108115
*/
109116
final def isEqual(other: Tree): Boolean = thisTree == other || thisTree.structure == other.structure

core/src/main/scala/stryker4s/extension/mutationtype/MutationTypes.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ trait StringLiteral[T <: Term] extends SubstitutionMutation[T] {
7070
* Base trait for method mutation
7171
*/
7272
trait MethodExpression extends Mutation[Term] {
73+
7374
/**
7475
* Method to be replaced or to replace
7576
*/

core/src/main/scala/stryker4s/mutants/applymutants/MatchBuilder.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ class MatchBuilder(mutationContext: ActiveMutationContext) extends Logging {
5555
private def groupTransformedStatements(transformedStatements: SourceTransformations): Seq[TransformedMutants] = {
5656
transformedStatements.transformedStatements
5757
.groupBy(_.originalStatement)
58-
.mapValues(
59-
transformedMutants => transformedMutants.flatMap(transformedMutant => transformedMutant.mutantStatements)
58+
.mapValues(transformedMutants =>
59+
transformedMutants.flatMap(transformedMutant => transformedMutant.mutantStatements)
6060
)
6161
.map({ case (originalStatement, mutants) => TransformedMutants(originalStatement, mutants.toList) })
6262
.toSeq

core/src/main/scala/stryker4s/mutants/findmutants/FileCollector.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ trait SourceCollector {
1616
class FileCollector(private[this] val processRunner: ProcessRunner)(implicit config: Config)
1717
extends SourceCollector
1818
with Logging {
19+
1920
/**
2021
* Get path separator because windows and unix systems have different separators.
2122
*/

0 commit comments

Comments
 (0)