Skip to content

The pattern book

File

charset = utf-8

Selects the encoding used when DressSharp writes the file.

  • Values: latin1 utf-8 utf-8-bom utf-16be utf-16le
  • Default: utf-8
  • Applies to: File representation or shared layout settings.
  • Guarantee: The configured value is applied by its owning formatter stage.
Input
class Example
{
string Text = "DressSharp";
}

Code unchanged.

Encoding utf-8 · Line endings CRLF · Final newline no

end_of_line = unset

Selects the line-ending sequence used when DressSharp writes the file.

  • Values: cr lf crlf
  • Default: unset (the rule makes no change unless you set it)
  • Applies to: File representation or shared layout settings.
  • Guarantee: The configured value is applied by its owning formatter stage.
Input
class Example
{
string Text = "DressSharp";
}

Code unchanged.

Encoding utf-8 · Line endings CR · Final newline no

insert_final_newline = true

Controls whether the written file ends with a newline.

  • Values: true false
  • Default: true
  • Applies to: File representation or shared layout settings.
  • Guarantee: The configured value is applied by its owning formatter stage.
Input
class Example
{
string Text = "DressSharp";
}
class Example
{
string Text = "DressSharp";
}

Encoding utf-8 · Line endings CRLF · Final newline yes

trim_trailing_whitespace = true

Controls whether trailing line whitespace is removed.

  • Values: true false
  • Default: true
  • Applies to: File representation or shared layout settings.
  • Guarantee: The configured value is applied by its owning formatter stage.
Input
class Example { }
class Example { }
class Example { }

Encoding utf-8 · Line endings LF · Final newline yes