chisel
                                
                                 chisel copied to clipboard
                                
                                    chisel copied to clipboard
                            
                            
                            
                        Bump Scalafmt
Type of issue: Feature Request
Old Scalafmt will has some parsing issues, see #3992. We need to upgrade it, but seems it is not compatible, we may need to reformat the entire code base...
Is your feature request related to a problem? Please describe.
diff --git a/.scalafmt.conf b/.scalafmt.conf
index f74e55047..fa8413a3a 100644
--- a/.scalafmt.conf
+++ b/.scalafmt.conf
@@ -1,21 +1,21 @@
-version = 2.6.4
-
+version = 3.8.1
+runner.dialect = scala213
 maxColumn = 120
-align = most
-continuationIndent.defnSite = 2
+align.preset = most
+indent.defnSite = 2
 assumeStandardLibraryStripMargin = true
-docstrings = ScalaDoc
+docstrings.style = SpaceAsterisk
 lineEndings = preserve
 includeCurlyBraceInSelectChains = false
-danglingParentheses = true
+danglingParentheses.preset = true
-align.tokens.add = [
+align.tokens."+" = [
   {
     code = ":"
   }
 ]
-newlines.alwaysBeforeCurlyBraceLambdaParams = false
+newlines.beforeCurlyLambdaParams = never
 newlines.alwaysBeforeMultilineDef = false
 newlines.implicitParamListModifierForce = [before]
Here is a straightforward change to scalafmt config, but seems new version of scalafmt is more aggressive.
It's a little annoying to reformat, but we can do it. We'll probably want to apply the reformatting to all branches we may backport to as well (6.x and 5.x definitely, probably 3.6.x as well).