com.colofabrix.scala.dixtra
Members list
Packages
Type members
Classlikes
Formatting configuration for the dixtra formatter.
Formatting configuration for the dixtra formatter.
Value parameters
- alignment
-
What aligns with what.
- blankLines
-
The blank lines at the edges of bodies, between alignment groups and before scaladoc.
- body
-
The layout of the body after
=and=>. - braces
-
Where the braces go, and the brace style of each construct.
- callSite
-
The layout of the arguments of calls.
- compat213
-
Whether the output must also be valid Scala 2.13.
- definitionSite
-
The layout of the parameters of definitions: signatures.
- housekeeping
-
The housekeeping of a whole file.
- maxColumn
-
The maximum allowed line width before a construct is forced to break.
- overflow
-
What happens to what goes past
maxColumn. - paths
-
The files and directories to format.
- selectorChain
-
When select chains break.
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Public entry point for the Dixtra Scala 3 formatter.
Public entry point for the Dixtra Scala 3 formatter.
The formatter is a pure function from source text to formatted source text. It first collapses redundant whitespace, parses the result with Scalameta and renders the tree according to the style rules of Dixtra. Any construct not yet supported falls back to the safety net, which reproduces the source verbatim, so the tool never corrupts code.
As a final guarantee the output is re-parsed and compared with the original input: if the program structure or the comments differ, formatting fails with an UnsafeOutputError instead of returning corrupted code.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Dixtra.type
Base error type for the dixtra formatter.
Base error type for the dixtra formatter.
Attributes
- Companion
- object
- Supertypes
-
class Exceptionclass Throwabletrait Serializableclass Objecttrait Matchableclass AnyShow all
- Known subtypes
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
FormatError.type
Raised when the source cannot be parsed as valid Scala 3.
Raised when the source cannot be parsed as valid Scala 3.
Attributes
- Supertypes
-
class FormatErrorclass Exceptionclass Throwabletrait Serializableclass Objecttrait Matchableclass AnyShow all
Raised when the source is Scala 2: it parses only with the Scala 2 dialect of its kind of file, or it uses a construct that Scala 3 dropped. Scala 2 is not formatted, and such a file is skipped rather than failed.
Raised when the source is Scala 2: it parses only with the Scala 2 dialect of its kind of file, or it uses a construct that Scala 3 dropped. Scala 2 is not formatted, and such a file is skipped rather than failed.
Attributes
- Supertypes
-
class FormatErrorclass Exceptionclass Throwabletrait Serializableclass Objecttrait Matchableclass AnyShow all
The Scalameta dialect a whole source file is parsed with.
The Scalameta dialect a whole source file is parsed with.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
SourceDialect.type
Raised when the formatted output would not be equivalent to the input (a different program structure or lost comments). The input is never rewritten in that case: this signals a formatter bug, not a problem with the source.
Raised when the formatted output would not be equivalent to the input (a different program structure or lost comments). The input is never rewritten in that case: this signals a formatter bug, not a problem with the source.
Attributes
- Supertypes
-
class FormatErrorclass Exceptionclass Throwabletrait Serializableclass Objecttrait Matchableclass AnyShow all