I am doing migration scalafmt "2.0.1" => "3.6.1".
It is a huge legacy repo and I'd like to keep code changes caused by new formatting rules to the minimum.
I have one case, which I cannot find a configuration setting as a counter-measure.
Trailing…
I would like to run a scalafmtCheck in sbt assembly. I tried to add:
(compile in Compile) := ((compile in Compile) dependsOn scalafmtCheck).value
I got that error :
[error] References to undefined settings:
[error]
[error] submissions /…
I want add an option to my .scalafmt.conf that would break lines exceeding maxColumn length on operator ~> (edge operator from akka-streams).
Does anyone know if this is even an option and if yes, how to achieve it?
Thanks!
I'm using VS code with metal scala extension and cannot get my code to format properly. I want to have 8 spaces tab width for everything. This is my .scalafmt.conf
version = "2.0.0-RC4"
maxColumn = 80
continuationIndent.callSite =…
Inside a match expression Scalafmt is giving me:
case Some(thing) => s ++
myMethodName(Some(my.other.method(argument)))
What I want is this:
case Some(thing) =>
s ++ myMethodName(Some(my.other.method(argument)))
Or, if the line is too long…
My .scalafmt.conf file has the following:
project.excludeFilters = [
"glob:**.html"
]
When I edit a playframework twirl view file, it formats the file and it screws up the format and causes issues e.g. puts a space after @ and breaks the…
I am using 'scalafmt' command to ensure that I've no formatting errors in my Scala code. It keeps failing with this error message:
Looking for unformatted files... (98.35 %, 238 / 242)
error: --test failed
Those are the last two lines. There's no…
I am trying to setup scalafmt.config, such that it formats my code. All the features I am using -- such as align.preset = more, align.openParenDefnSite = false etc. -- seem to work perfectly. However, I have an issue with indentation. I want to set…
Following https://scalameta.org/scalafmt/docs/installation.html I'm trying to reformat my Scala code via command line.
How to execute the scalafmt command ?
Loading sbt from the project can I invoke scalafmt ?
Using below returns error…
I have a call that I would like to look like this:
newTimeRangeList(
MonthRanges.Y2021.Jan, MonthRanges.Y2021.Feb, MonthRanges.Y2021.Mar, MonthRanges.Y2021.Apr,
MonthRanges.Y2021.May, MonthRanges.Y2021.Jun, MonthRanges.Y2021.Jul,…
sbt scalafmtCheckAll checks the format of all files in the repo, how to check only the format of the modified files.
And whats the difference between sbt scalafmtCheckAll and sbt scalafmtCheck?
I want to use Scalafmt in corporate network ( on a windows machine) using Nexus. I get below error if i run scalafmt
[error] failed to resolve Scalafmt version '2.4.6': X:\ProjectA\.scalafmt.conf
[error] (Compile / scalafmt) failed to resolve…