Skip to content

The pattern book

Blank lines

dress_blank_lines_around_namespaces = 1

Controls line breaks at structural boundaries. Only whitespace trivia changes.

  • Values: non-negative integer
  • Default: 1
  • Applies to: Line breaks at structural boundaries.
  • Guarantee: Only whitespace trivia changes.
Input
namespace First { }
namespace Second { }
namespace First { }
namespace Second { }
dress_blank_lines_around_types = 1

Controls line breaks at structural boundaries. Only whitespace trivia changes.

  • Values: non-negative integer
  • Default: 1
  • Applies to: Line breaks at structural boundaries.
  • Guarantee: Only whitespace trivia changes.
Input
namespace Example
{
class First { }
class Second { }
}
namespace Example
{
class First { }
class Second { }
}
dress_blank_lines_between_members = unset

Controls line breaks at structural boundaries. Only whitespace trivia changes.

  • Values: non-negative integer
  • Default: unset (the rule makes no change unless you set it)
  • Applies to: Line breaks at structural boundaries.
  • Guarantee: Only whitespace trivia changes.
Input
class Example
{
void First() { }
void Second() { }
}

Code unchanged.

dress_blank_lines_between_using_groups = 0

Controls line breaks at structural boundaries. Only whitespace trivia changes.

  • Values: non-negative integer
  • Default: 0
  • Applies to: Line breaks at structural boundaries.
  • Guarantee: Only whitespace trivia changes.
Input
using System;
using static System.Math;
using Alias = System.String;
class Value { }

Code unchanged.

dress_blank_lines_between_member_categories = 1

Controls line breaks at structural boundaries. Only whitespace trivia changes.

  • Values: non-negative integer
  • Default: 1
  • Applies to: Line breaks at structural boundaries.
  • Guarantee: Only whitespace trivia changes.
Input
class Example
{
int value;
void Run() { }
}
class Example
{
int value;
void Run() { }
}
dress_max_consecutive_blank_lines = 1

Controls line breaks at structural boundaries. Only whitespace trivia changes.

  • Values: non-negative integer
  • Default: 1
  • Applies to: Line breaks at structural boundaries.
  • Guarantee: Only whitespace trivia changes.
Input
class First { }
class Second { }
class First { }
class Second { }