Skip to content

Commit

Permalink
scalafmt: enable AvoidInfix rewrite
Browse files Browse the repository at this point in the history
  • Loading branch information
kitbellew committed Apr 1, 2024
1 parent 6207f88 commit e0a27b5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ project {
sbt-test
bin/issue
]
layout = StandardConvention
}
align {
preset = none
Expand All @@ -19,6 +20,7 @@ newlines {
}
rewrite {
rules = [
AvoidInfix,
Imports,
RedundantBraces,
RedundantParens,
Expand Down
3 changes: 2 additions & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ object Dependencies {

val scalacheck = "org.scalacheck" %% "scalacheck" % scalacheckV
val munit = Def.setting("org.scalameta" %%% "munit" % munitV)
val scalameta = Def.setting("org.scalameta" %%% "scalameta" % scalametaV excludeAll scalapb.value)
val scalameta = Def
.setting(("org.scalameta" %%% "scalameta" % scalametaV).excludeAll(scalapb.value))

val metaconfig = Def.setting("com.geirsson" %%% "metaconfig-core" % metaconfigV)
val metaconfigTypesafe = Def.setting("com.geirsson" %%% "metaconfig-typesafe-config" % metaconfigV)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,15 +232,15 @@ object TermDisplay {

val extra0 =
if (extra.length > baseExtraWidth) extra
.take((baseExtraWidth max (extra.length - overflow)) - 1) + ""
.take((baseExtraWidth.max(extra.length - overflow)) - 1) + ""
else extra

val total0 = url.length + 1 + extra0.length
val overflow0 = total0 - width + 1

val url0 =
if (total0 >= width) url.take(
((width - baseExtraWidth - 1) max (url.length - overflow0)) - 1,
((width - baseExtraWidth - 1).max(url.length - overflow0)) - 1,
) + ""
else url

Expand Down

0 comments on commit e0a27b5

Please sign in to comment.