Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
version = 3.9.4

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The specified scalafmt version 3.9.4 does not appear to be a valid published version. The latest stable version of scalafmt is 3.8.1. Using a non-existent version will cause the build to fail when sbt-scalafmt attempts to download the runner. Please update this to a valid, published version.

version = 3.8.1

runner.dialect = scala213source3
maxColumn = 180
project.layout = StandardConvention
runner.dialect = scala3
maxColumn = 100
style = defaultWithAlign
optIn.breaksInsideChains = true
docstrings.blankFirstLine = yes
rewrite.scala3.convertToNewSyntax = true
rewrite.scala3.removeOptionalBraces = yes
rewrite.scala3.insertEndMarkerMinLines = 30
# Add a new line before case class
newlines.topLevelStatementBlankLines = [
{
blanks { after = 1 }
}
]
Comment on lines +11 to +15

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The comment on line 10, # Add a new line before case class, is inconsistent with the configuration below it. The current rule will add a blank line after every top-level statement, not just before case class definitions. This is because the regexes property is not specified and defaults to [".*"], which matches all top-level statements.

This broad rule could lead to undesirable formatting, such as extra newlines after the last import statement or at the end of a file.

To align the rule with the comment's intent, it should be made more specific to target only case class definitions.

newlines.topLevelStatementBlankLines = [
  {
    regexes = ["^case class"]
    blanks.before = 1
  }
]

newlines.source = unfold
Loading