olafurpg on v1.0.0-RC1
olafurpg on master
Upgrade to non-broken metaconfi… Merge pull request #946 from ol… (compare)
olafurpg on master
documentation fix: binPackParen… Merge pull request #945 from na… (compare)
def loadRow3(): Unit =
x match {
case (
"xxxxxxxxxxxxxxxxxxxxxx"
| "xxxxxxxxxxxxxxx"
| "xxxxxxxxxxxxxxx"
| "xxxxxxxxxxxxxxx"
| "xxxxxxxxxxxxx"
) =>
y
}
Hi,
By default(I suppose) scalafmt changes this
seqTuple2
.map { case (a1, a2) =>
???
}
to this
seqTuple2
.map {
case (a1, a2) =>
???
}
I've tried to find the way how to turn this feature off couple of times, but with no results.
I've found term case arrows
, but not sure if this is what I'm searching.
Can I disable this rewrite rule?
Hi all,
I'm trying to make scalafmt format consecutive parameter blocks (at defn site) in the same way, i.e. to avoid formatting such as:
class MyClass(aaaaaaa: Aaaaaaaaa,
bbbbbbbbbbbbb: Bbbbbbbbbbbbbbb)
(implicit ccccccc: Ccccccccc,
dddddddddddd: Dddddddddddd) extends Eeeeeeee {}
to
class MyClass(aaaaaaa: Aaaaaaaaa, bbbbbbbbbbbbb: Bbbbbbbbbbbbbbb)(implicit
ccccccc: Ccccccccc,
dddddddddddd: Dddddddddddd)
extends Eeeeeeee {}
here with
align.openParenDefnSite = true
danglingParentheses.defnSite = false
Is this at all possible?
Hi folks 👋
Question: is there a workaround to get scalafmt
not failing when cross-compiling Scala 2.13.x and 3.0.x? Right now, it fails if I set scalafmtOnCompile := true
. I would like to keep running it on Scala 2.12.x and shared code but not for files in the Scala 3.x directory. I tried setting format: off
on my Scala 3 file but that didn't work.
I know that Scala 3 support is in progress so all I want is to skip Scala 3 files for now. Thanks!
if
s, and aligning the default case seems.... of
{ code = "=>" owner = "Case" except = ["Case(Pat.Wildcard(), None, _)", "Case(_, Some(_), _)"] }
case _ =>
as well as case clauses containing if
s.... just a thought :)
@df final class SMA extends DFDesign {
val clk = DFBit <> IN
val rst = DFBit <> IN
val x = DFUInt(16) <> IN init 0
val y = DFUInt(16) <> OUT
val x_prev1 = DFUInt(16) <> VAR init 0
val x_prev2 = DFUInt(16) <> VAR init 0
val x_prev3 = DFUInt(16) <> VAR init 0
val s1 = DFUInt(17) <> VAR init 0
val s1_pipe1 = DFUInt(17) <> VAR init 0
val s2 = DFUInt(17) <> VAR init 0
val sum = DFUInt(18) <> VAR init 0
val x_prev1_sig = DFUInt(16) <> VAR
val x_prev2_sig = DFUInt(16) <> VAR
val s1_sig = DFUInt(17) <> VAR
s1 := x.resize(17) + x_prev1
s2 := x_prev2.resize(17) + x_prev3
sum := s1_pipe1.resize(18) + s2
x_prev1_sig := x_prev1
x_prev2_sig := x_prev2
s1_sig := s1
ifdf(rst === 0) {
x_prev1 := 0
x_prev2 := 0
x_prev3 := 0
s1_pipe1 := 0
}
.elseifdf(clk.rising()) {
x_prev1 := x
x_prev2 := x_prev1_sig
x_prev3 := x_prev2_sig
s1_pipe1 := s1_sig
}
y := (sum >> 2).resize(16)
}