Code Formatting

CodeRush code formatting tool formats your code as you need. You can set options for spaces, blank lines, alignment, line breaks, and indentation in a variety of code constructs.


By default CodeRush applies code formatting only to the code it generates. To apply CodeRush formatting whenever Visual Studio's active language service auto-formats the code, check the appropriate option on the General options page. This options page also enables you to specify other main options for the Code Formatting tool.


Other code formatting options are grouped into the following options pages.

Options page Description
Blank Lines Blank line usage rules.
Indentation Indentation insertion rules.
Line Breaks Line break usage rules.
Other / Language Specific Formatting options unrelated to other categories.
Spacing Space insertion rules.
Wrapping / Alignment Wrapping and alignment rules.