Skip to content

Commit

Permalink
Merge pull request #733 from ie3-institute/sp/#719-trailing-commas
Browse files Browse the repository at this point in the history
Forcing trailing commas
  • Loading branch information
sebastian-peter authored Feb 9, 2024
2 parents 48fde60 + 8d93ad9 commit 5478b69
Show file tree
Hide file tree
Showing 289 changed files with 5,401 additions and 5,397 deletions.
4 changes: 4 additions & 0 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
version = 3.7.3
runner.dialect = scala213

rewrite.trailingCommas.style = multiple
2 changes: 1 addition & 1 deletion gradle/scripts/spotless.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ spotless {

//sets a license header, removes unused imports and formats conforming to the scala fmt formatter
scala {
scalafmt()
scalafmt().configFile(".scalafmt.conf")
licenseHeader ie3LicHead, "package.*\\n"
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/edu/ie3/simona/actor/ActorUtil.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import org.apache.pekko.actor.typed.scaladsl.{ActorContext, Behaviors}
object ActorUtil {
def stopOnError[M](
ctx: ActorContext[M],
msg: String
msg: String,
): Behavior[M] = {
ctx.log.error(s"$msg. Stopping.")
Behaviors.stopped
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/edu/ie3/simona/agent/EnvironmentRefs.scala
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ final case class EnvironmentRefs(
runtimeEventListener: ActorRef,
primaryServiceProxy: ActorRef,
weather: ActorRef,
evDataService: Option[ActorRef]
evDataService: Option[ActorRef],
)
2 changes: 1 addition & 1 deletion src/main/scala/edu/ie3/simona/agent/SimonaAgent.scala
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ trait SimonaAgent[D]
case Event(Status.Failure(ex), _) =>
log.error(
ex,
"Received a failure status message with following exception."
"Received a failure status message with following exception.",
)
self ! PoisonPill
stay()
Expand Down
8 changes: 4 additions & 4 deletions src/main/scala/edu/ie3/simona/agent/ValueStore.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import scala.collection.SortedMap
*/
final case class ValueStore[+D](
maxTickSpan: Long,
private val store: SortedMap[Long, D] = SortedMap.empty[Long, D]
private val store: SortedMap[Long, D] = SortedMap.empty[Long, D],
) {

/** Determine the lastly known data tick, if available. Includes the given
Expand Down Expand Up @@ -105,11 +105,11 @@ object ValueStore {
*/
def forVoltage(
maxTickSpan: Long,
initialPerUnit: Dimensionless
initialPerUnit: Dimensionless,
): ValueStore[Dimensionless] =
new ValueStore(
maxTickSpan,
SortedMap(SimonaConstants.FIRST_TICK_IN_SIMULATION -> initialPerUnit)
SortedMap(SimonaConstants.FIRST_TICK_IN_SIMULATION -> initialPerUnit),
)

/** Create a value store for result values. A result value store requires a
Expand Down Expand Up @@ -144,7 +144,7 @@ object ValueStore {
def updateValueStore[D](
valueStore: ValueStore[D],
tick: Long,
newEntry: D
newEntry: D,
): ValueStore[D] = {
val updatedStore = valueStore.store ++ SortedMap(tick -> newEntry)

Expand Down
Loading

0 comments on commit 5478b69

Please sign in to comment.