Option Reference
Curb implements 127 .editorconfig keys. Every key has a before/after example generated by running Curb.
Use the filter above to search by name. Each group below links to its own index.
- indent_style — Indent with spaces or tabs.
- indent_size — Columns per indent level.
- tab_width — Columns a tab occupies when measuring line width.
- end_of_line — Line ending to write. auto matches the platform's own (Environment.NewLine), the same default Roslyn uses.
- insert_final_newline — End the file with a newline, or without one. Not set, the file keeps what it has.
- trim_trailing_whitespace — Remove trailing whitespace from each line.
- charset — Byte-order mark handling. Not set, a file keeps whatever mark it arrived with.
- max_line_length — Column target for reflow. off disables reflow entirely and selects preservation mode.
- csharp_new_line_before_open_brace — Which constructs put their opening brace on a new line.
- csharp_new_line_before_else — Put else on its own line rather than joining it to the preceding brace.
- csharp_new_line_before_catch — Put catch on its own line.
- csharp_new_line_before_finally — Put finally on its own line.
- csharp_new_line_before_members_in_object_initializers — Put each member of an object initializer on its own line.
- csharp_new_line_before_members_in_anonymous_types — Put each member of an anonymous type on its own line.
- csharp_new_line_between_query_expression_clauses — Put each clause of a query expression on its own line.
- csharp_indent_case_contents — Indent statements inside a case label.
- csharp_indent_switch_labels — Indent case labels inside their switch.
- csharp_indent_labels — How goto labels are indented.
- csharp_indent_block_contents — Indent statements inside a block.
- csharp_indent_braces — Indent the brace tokens themselves an extra level.
- csharp_indent_case_contents_when_block — Indent a braced case body. csharp_indent_case_contents governs other statements.
- csharp_space_after_cast — Space between a cast and its operand.
- csharp_space_after_keywords_in_control_flow_statements — Space between a control-flow keyword and its opening parenthesis.
- csharp_space_before_colon_in_inheritance_clause — Space before the colon in a base list.
- csharp_space_after_colon_in_inheritance_clause — Space after the colon in a base list.
- csharp_space_around_binary_operators — Spaces around binary and assignment operators.
- csharp_space_around_declaration_statements — Extra spaces in declaration statements. false normalises; ignore leaves them alone.
- csharp_space_after_comma — Space after a comma.
- csharp_space_before_comma — Space before a comma.
- csharp_space_between_parentheses — Space just inside parentheses for specific constructs.
- csharp_space_between_method_declaration_parameter_list_parentheses — Space just inside the parentheses of a parameter list.
- csharp_space_between_method_declaration_empty_parameter_list_parentheses — Space inside an empty parameter list ().
- csharp_space_between_method_declaration_name_and_open_parenthesis — Space between the method name and its opening parenthesis.
- csharp_space_between_method_call_parameter_list_parentheses — Space just inside the parentheses of an argument list.
- csharp_space_between_method_call_empty_parameter_list_parentheses — Space inside an empty argument list ().
- csharp_space_between_method_call_name_and_opening_parenthesis — Space between the method name and its opening parenthesis at a call site.
- csharp_space_before_open_square_brackets — Space before an opening square bracket.
- csharp_space_between_empty_square_brackets — Space inside empty square brackets [].
- csharp_space_between_square_brackets — Space inside non-empty square brackets.
- csharp_space_before_dot — Space before a dot.
- csharp_space_after_dot — Space after a dot.
- csharp_space_before_semicolon_in_for_statement — Space before a semicolon in a for statement.
- csharp_space_after_semicolon_in_for_statement — Space after a semicolon in a for statement.
- csharp_space_after_unary_operator — Space after unary minus/plus, logical not, and the unsafe pointer prefix operators. Not bitwise complement or prefix increment/decrement.
- csharp_space_around_ternary_operator — Space around the ?/: of a ternary conditional expression.
- csharp_preserve_single_line_blocks — Allow a block the author wrote on one line to stay on one line.
- csharp_empty_block_style — How an empty method, constructor, accessor or control-flow body is laid out. together_same_line keeps { } on the signature's line.
- csharp_preserve_single_line_statements — Allow a control-flow body the author left on its header's line to stay there. Chained using statements are the exception and take their own lines unless this key is written out and set to true.
- csharp_keep_existing_linebreaks — Preservation mode. Defaults to true when max_line_length is off.
- csharp_wrap_before_first_method_call — When a chain breaks, break before the first call too, leaving the receiver on its own line.
- csharp_wrap_before_first_type_parameter_constraint — Put a where clause on its own line, or keep it on the signature's. Not set, a clause the author broke stays broken unless a width decides layout.
- csharp_wrap_before_extends_colon — Put a base list on its own line, colon first, or keep it on the declaration's. Not set, a list the author broke stays broken unless a width decides layout.
- csharp_place_constructor_initializer_on_same_line — Keep : base(...) on the constructor's line, or give it its own. Not set, one the author broke stays broken unless a width decides layout.
- csharp_wrap_before_arrow_with_expressions — When an expression body wraps, put => at the start of the new line.
- csharp_wrap_after_dot_in_method_calls — When a chain breaks, leave the dot at the end of the preceding line.
- csharp_wrap_chained_method_calls — Break a chain of three or more calls onto its own line per call once it does not fit. Curb's default behaviour either way; setting the key only makes it explicit.
- csharp_place_simple_enum_on_single_line — Allow a short enum body to stay on one line.
- csharp_place_simple_accessorholder_on_single_line — Allow { get; set; } to stay on the property's line.
- csharp_place_simple_declaration_blocks_on_single_line — Collapse a method, constructor, operator, destructor, local function or accessor body onto one line when it holds a single statement with no comment and the result fits.
- csharp_place_simple_blocks_on_single_line — The same, for a lambda or anonymous method's block body.
- csharp_wrap_chained_binary_expressions — Break each operand of a long && or || chain onto its own line. chop_always breaks regardless of width; wrap_if_long packs operands instead of breaking every one. Only honoured in deterministic mode (max_line_length set).
- csharp_wrap_before_binary_opsign — When a binary chain breaks, start the new line with the operator.
- csharp_wrap_parameters_style — chop_always gives every parameter its own line regardless of width; wrap_if_long packs parameters instead. wrap_if_long is only honoured in deterministic mode (max_line_length set) — chop_always and chop_if_long work in either.
- csharp_wrap_arguments_style — chop_always gives every argument its own line; wrap_if_long packs arguments instead. Only honoured in deterministic mode (max_line_length set).
- csharp_wrap_object_and_collection_initializer_style — chop_always gives every initializer element its own line. Only honoured in deterministic mode. wrap_if_long is not offered: dotnet format forces one member per line once an initializer opens out, so a packed layout could never stay put.
- csharp_max_formal_parameters_on_line — Chop a parameter list carrying more than this many parameters, regardless of width.
- csharp_max_invocation_arguments_on_line — Chop an argument list carrying more than this many arguments.
- csharp_max_initializer_elements_on_line — Chop an initializer carrying more than this many elements.
- csharp_max_chained_method_calls_on_line — Chop a chain carrying more than this many calls, regardless of width. Deterministic mode only.
- csharp_max_array_initializer_elements_on_line — Chop an array initializer carrying more than this many elements.
- csharp_wrap_before_declaration_rpar — Put a broken parameter list's ) on its own line.
- csharp_wrap_before_invocation_rpar — Put a broken argument list's ) on its own line.
- csharp_place_method_attribute_on_same_line — Where a method's attribute section goes. if_owner_is_single_line joins it when the method fits on one line. Deterministic mode only.
- csharp_place_field_attribute_on_same_line — Where a field's attribute section goes.
- csharp_place_property_attribute_on_same_line — Where a property's attribute section goes.
- csharp_place_event_attribute_on_same_line — Where an event's attribute section goes.
- csharp_keep_blank_lines_in_declarations — Maximum consecutive blank lines between members.
- csharp_keep_blank_lines_in_code — Maximum consecutive blank lines between statements.
- csharp_blank_lines_around_invocable — Blank lines before and after each method or constructor. 0 means leave the author's.
- csharp_blank_lines_around_local_method — Blank lines before and after each local function.
- csharp_blank_lines_around_type — Blank lines before and after each type declaration.
- csharp_blank_lines_around_property — Blank lines before and after each property, indexer or event.
- csharp_blank_lines_around_accessor — Blank lines between two accessors of the same property, indexer or event.
- csharp_blank_lines_around_field — Blank lines before and after each field.
- csharp_blank_lines_inside_type — Blank lines below the opening brace and above the closing brace of a type, forced exactly rather than floored.
- csharp_blank_lines_around_namespace — Blank lines before and after a namespace declaration.
- csharp_blank_lines_inside_namespace — Blank lines below the opening brace and above the closing brace of a block-scoped namespace, forced exactly rather than floored.
- csharp_blank_lines_around_region — Blank lines before a #region and after its matching #endregion, forced exactly rather than floored.
- csharp_blank_lines_inside_region — Blank lines below a #region and above its matching #endregion, forced exactly rather than floored.
- csharp_blank_lines_after_using_list — Blank lines below the last using directive, forced exactly rather than floored.
- csharp_blank_lines_after_file_scoped_namespace_directive — Blank lines after a file-scoped namespace declaration.
- csharp_blank_lines_before_block_statements — Blank lines above an if/while/for/foreach/do/switch/using/lock/try statement.
- csharp_blank_lines_after_block_statements — Blank lines below one of those statements.
- csharp_blank_lines_before_control_transfer_statements — Blank lines above a return/throw/break/continue/goto/yield statement.
- csharp_blank_lines_after_control_transfer_statements — Blank lines below one of those statements.
- csharp_blank_lines_before_case — Blank lines above a switch section's first label.
- csharp_blank_lines_after_case — Blank lines below a section's labels, above its first statement.
- csharp_blank_lines_before_single_line_comment — Blank lines above a // comment that follows real content.
- csharp_remove_blank_lines_near_braces_in_declarations — Force no blank line directly under a type/namespace's opening brace or above its closing one.
- csharp_remove_blank_lines_near_braces_in_code — The same, for a block's opening and closing braces.
- csharp_style_expression_bodied_methods — Convert eligible block-bodied methods to expression bodies. IDE0022. Skipped where the project compiles below C# 6, or below C# 7 for a body that only throws.
- csharp_style_expression_bodied_constructors — Convert eligible block-bodied constructors to expression bodies. IDE0021. Skipped where the project compiles below C# 7.
- csharp_style_expression_bodied_operators — Convert eligible block-bodied operators. IDE0023/IDE0024. Skipped where the project compiles below C# 6, or below C# 7 for a body that only throws.
- csharp_style_expression_bodied_local_functions — Convert eligible block-bodied local functions. IDE0061.
- csharp_style_expression_bodied_accessors — Convert eligible block-bodied accessors. IDE0027. Skipped where the project compiles below C# 7.
- csharp_style_expression_bodied_properties — Convert an eligible single-getter property to an expression body. IDE0025. Skipped where the project compiles below C# 6, or below C# 7 for a body that only throws.
- csharp_style_expression_bodied_indexers — Convert eligible block-bodied indexers. IDE0026. Skipped where the project compiles below C# 6, or below C# 7 for a body that only throws.
- dotnet_sort_system_directives_first — Put System.* usings before all others.
- dotnet_separate_import_directive_groups — Separate groups of usings by first namespace segment with a blank line.
- csharp_using_directive_placement — Move using directives inside or outside the namespace. IDE0065.
- csharp_preferred_modifier_order — Reorder modifiers to the specified preference. IDE0036. Applied without a compilation.
- csharp_prefer_braces — Add braces to unbraced control-flow bodies. IDE0011. Applied without a compilation.
- csharp_style_namespace_declarations — Convert block namespaces to file-scoped. IDE0161. Applied without a compilation, and skipped where the project compiles below C# 10.
- csharp_trailing_comma_in_multiline_lists — Add a trailing comma after the last element of a list that breaks across lines.
- csharp_trailing_comma_in_singleline_lists — Add a trailing comma after the last element even when the list is on one line.
- generated_code — Skip this file entirely. Curb never formats files marked as generated.
- dotnet_diagnostic.ide0055.severity — Set this to none to opt a file out of formatting.
- file_header_template — Insert or correct a // comment header at the top of the file. Supports {fileName}. IDE0073.
Which XML files Curb formats. Project, props, targets, solution and nuget.config files are formatted by default; set curb_xml_format = false to leave them alone, and name other XML extensions in curb_xml_extensions to opt them in. The curb MSBuild package never formats XML, only curb format and curb check do. The core keys apply to XML only from sections that name its files, such as [*.csproj] or [Directory.Packages.props]; [*], [**] and [*.*] are ignored for them. Without such a section XML indents by two, has no width, and keeps each file's own line endings, final newline and trailing whitespace. The curb_xml_* and xml_* keys apply from any section.
- curb_xml_format — Format project, props, targets, solution and nuget.config files. false leaves them unread.
- curb_xml_extensions — Further extensions to format as generic XML, comma-separated, such as .xml or .runsettings.
How Curb lays XML out. It keeps the author's layout: it re-indents the lines that start a child element, caps blank lines, and tidies the whitespace inside start tags. Text, comments, CDATA, attribute values and anything MSBuild reads as a value are never changed.
- xml_max_blank_lines_between_tags — The most blank lines kept between two tags of element-only content.
- xml_space_before_self_closing — Space before />. Unset keeps what each tag has, except in .slnx files, which always get one.
- xml_attribute_indent — Where an attribute on a line of its own starts. Unset keeps its offset from its element as written.
Experimental and off by default. Curb can format the C# inside @code and @functions blocks of .razor and .cshtml files and leave every other byte of the file as it is. Turn it on with curb_razor_format_code_blocks = true in a section that names those files, such as [*.{razor,cshtml}]; [*] does not count. The C# style comes from the same keys as a .cs file's, so a [*.{cs,razor,cshtml}] section gives both the same style. See Razor.
- curb_razor_format_code_blocks — Experimental. Format the C# in @code, @functions and @{ } blocks of .razor and .cshtml files, and nothing else in them. Read only from a section that names those files.
- curb_razor_format_markup — Experimental. With curb_razor_format_code_blocks, also re-indent markup by its nesting, as Microsoft's Razor formatter does. Only indentation changes. Read only from a section that names Razor files.
- razor_attribute_indent_style — With curb_razor_format_markup, where an attribute that starts a line inside a start tag goes. Microsoft's Razor formatter reads the same key.
- curb_razor_markup_engine_quirks — Experimental. With curb_razor_format_markup, indent markup by tab_width rather than indent_size, and align attributes with a tag that has none on its line, as Microsoft's Razor formatter does.
Core
charset Byte-order mark handling. Not set, a file keeps whatever mark it arrived with. Defaults to `(not set)` end_of_line Line ending to write. auto matches the platform's own (Environment.NewLine), the same default Roslyn uses. Defaults to `auto` indent_size Columns per indent level. Defaults to `4` indent_style Indent with spaces or tabs. Defaults to `space` insert_final_newline End the file with a newline, or without one. Not set, the file keeps what it has. Defaults to `(not set)` max_line_length Column target for reflow. off disables reflow entirely and selects preservation mode. Defaults to `off` tab_width Columns a tab occupies when measuring line width. Defaults to `4` trim_trailing_whitespace Remove trailing whitespace from each line. Defaults to `true`New Lines
csharp_new_line_before_catch Put catch on its own line. Defaults to `true` csharp_new_line_before_else Put else on its own line rather than joining it to the preceding brace. Defaults to `true` csharp_new_line_before_finally Put finally on its own line. Defaults to `true` csharp_new_line_before_members_in_anonymous_types Put each member of an anonymous type on its own line. Defaults to `true` csharp_new_line_before_members_in_object_initializers Put each member of an object initializer on its own line. Defaults to `true` csharp_new_line_before_open_brace Which constructs put their opening brace on a new line. Defaults to `all` csharp_new_line_between_query_expression_clauses Put each clause of a query expression on its own line. Defaults to `false`Indentation
csharp_indent_block_contents Indent statements inside a block. Defaults to `true` csharp_indent_braces Indent the brace tokens themselves an extra level. Defaults to `false` csharp_indent_case_contents Indent statements inside a case label. Defaults to `true` csharp_indent_case_contents_when_block Indent a braced case body. csharp_indent_case_contents governs other statements. Defaults to `true` csharp_indent_labels How goto labels are indented. Defaults to `one_less_than_current` csharp_indent_switch_labels Indent case labels inside their switch. Defaults to `true`Spacing
csharp_space_after_cast Space between a cast and its operand. Defaults to `false` csharp_space_after_colon_in_inheritance_clause Space after the colon in a base list. Defaults to `true` csharp_space_after_comma Space after a comma. Defaults to `true` csharp_space_after_dot Space after a dot. Defaults to `false` csharp_space_after_keywords_in_control_flow_statements Space between a control-flow keyword and its opening parenthesis. Defaults to `true` csharp_space_after_semicolon_in_for_statement Space after a semicolon in a for statement. Defaults to `true` csharp_space_after_unary_operator Space after unary minus/plus, logical not, and the unsafe pointer prefix operators. Not bitwise complement or prefix increment/decrement. Defaults to `false` csharp_space_around_binary_operators Spaces around binary and assignment operators. Defaults to `before_and_after` csharp_space_around_declaration_statements Extra spaces in declaration statements. false normalises; ignore leaves them alone. Defaults to `false` csharp_space_around_ternary_operator Space around the ?/: of a ternary conditional expression. Defaults to `true` csharp_space_before_colon_in_inheritance_clause Space before the colon in a base list. Defaults to `true` csharp_space_before_comma Space before a comma. Defaults to `false` csharp_space_before_dot Space before a dot. Defaults to `false` csharp_space_before_open_square_brackets Space before an opening square bracket. Defaults to `false` csharp_space_before_semicolon_in_for_statement Space before a semicolon in a for statement. Defaults to `false` csharp_space_between_empty_square_brackets Space inside empty square brackets []. Defaults to `false` csharp_space_between_method_call_empty_parameter_list_parentheses Space inside an empty argument list (). Defaults to `false` csharp_space_between_method_call_name_and_opening_parenthesis Space between the method name and its opening parenthesis at a call site. Defaults to `false` csharp_space_between_method_call_parameter_list_parentheses Space just inside the parentheses of an argument list. Defaults to `false` csharp_space_between_method_declaration_empty_parameter_list_parentheses Space inside an empty parameter list (). Defaults to `false` csharp_space_between_method_declaration_name_and_open_parenthesis Space between the method name and its opening parenthesis. Defaults to `false` csharp_space_between_method_declaration_parameter_list_parentheses Space just inside the parentheses of a parameter list. Defaults to `false` csharp_space_between_parentheses Space just inside parentheses for specific constructs. Defaults to `false` csharp_space_between_square_brackets Space inside non-empty square brackets. Defaults to `false`Wrapping
csharp_empty_block_style How an empty method, constructor, accessor or control-flow body is laid out. together_same_line keeps { } on the signature's line. Defaults to `(not set)` csharp_keep_existing_linebreaks Preservation mode. Defaults to true when max_line_length is off. Defaults to `(derived from max_line_length)` csharp_max_array_initializer_elements_on_line Chop an array initializer carrying more than this many elements. Defaults to `(not set)` csharp_max_chained_method_calls_on_line Chop a chain carrying more than this many calls, regardless of width. Deterministic mode only. Defaults to `(not set)` csharp_max_formal_parameters_on_line Chop a parameter list carrying more than this many parameters, regardless of width. Defaults to `(not set)` csharp_max_initializer_elements_on_line Chop an initializer carrying more than this many elements. Defaults to `(not set)` csharp_max_invocation_arguments_on_line Chop an argument list carrying more than this many arguments. Defaults to `(not set)` csharp_place_constructor_initializer_on_same_line Keep : base(...) on the constructor's line, or give it its own. Not set, one the author broke stays broken unless a width decides layout. Defaults to `(not set)` csharp_place_event_attribute_on_same_line Where an event's attribute section goes. Defaults to `false` csharp_place_field_attribute_on_same_line Where a field's attribute section goes. Defaults to `false` csharp_place_method_attribute_on_same_line Where a method's attribute section goes. if_owner_is_single_line joins it when the method fits on one line. Deterministic mode only. Defaults to `false` csharp_place_property_attribute_on_same_line Where a property's attribute section goes. Defaults to `false` csharp_place_simple_accessorholder_on_single_line Allow { get; set; } to stay on the property's line. Defaults to `true` csharp_place_simple_blocks_on_single_line The same, for a lambda or anonymous method's block body. Defaults to `false` csharp_place_simple_declaration_blocks_on_single_line Collapse a method, constructor, operator, destructor, local function or accessor body onto one line when it holds a single statement with no comment and the result fits. Defaults to `false` csharp_place_simple_enum_on_single_line Allow a short enum body to stay on one line. Defaults to `true` csharp_preserve_single_line_blocks Allow a block the author wrote on one line to stay on one line. Defaults to `true` csharp_preserve_single_line_statements Allow a control-flow body the author left on its header's line to stay there. Chained using statements are the exception and take their own lines unless this key is written out and set to true. Defaults to `true` csharp_wrap_after_dot_in_method_calls When a chain breaks, leave the dot at the end of the preceding line. Defaults to `false` csharp_wrap_arguments_style chop_always gives every argument its own line; wrap_if_long packs arguments instead. Only honoured in deterministic mode (max_line_length set). Defaults to `chop_if_long` csharp_wrap_before_arrow_with_expressions When an expression body wraps, put => at the start of the new line. Defaults to `false` csharp_wrap_before_binary_opsign When a binary chain breaks, start the new line with the operator. Defaults to `true` csharp_wrap_before_declaration_rpar Put a broken parameter list's ) on its own line. Defaults to `(not set)` csharp_wrap_before_extends_colon Put a base list on its own line, colon first, or keep it on the declaration's. Not set, a list the author broke stays broken unless a width decides layout. Defaults to `(not set)` csharp_wrap_before_first_method_call When a chain breaks, break before the first call too, leaving the receiver on its own line. Defaults to `(not set)` csharp_wrap_before_first_type_parameter_constraint Put a where clause on its own line, or keep it on the signature's. Not set, a clause the author broke stays broken unless a width decides layout. Defaults to `(not set)` csharp_wrap_before_invocation_rpar Put a broken argument list's ) on its own line. Defaults to `(not set)` csharp_wrap_chained_binary_expressions Break each operand of a long && or || chain onto its own line. chop_always breaks regardless of width; wrap_if_long packs operands instead of breaking every one. Only honoured in deterministic mode (max_line_length set). Defaults to `(not set)` csharp_wrap_chained_method_calls Break a chain of three or more calls onto its own line per call once it does not fit. Curb's default behaviour either way; setting the key only makes it explicit. Defaults to `chop_if_long` csharp_wrap_object_and_collection_initializer_style chop_always gives every initializer element its own line. Only honoured in deterministic mode. wrap_if_long is not offered: dotnet format forces one member per line once an initializer opens out, so a packed layout could never stay put. Defaults to `chop_if_long` csharp_wrap_parameters_style chop_always gives every parameter its own line regardless of width; wrap_if_long packs parameters instead. wrap_if_long is only honoured in deterministic mode (max_line_length set) — chop_always and chop_if_long work in either. Defaults to `chop_if_long`Blank Lines
csharp_blank_lines_after_block_statements Blank lines below one of those statements. Defaults to `0` csharp_blank_lines_after_case Blank lines below a section's labels, above its first statement. Defaults to `0` csharp_blank_lines_after_control_transfer_statements Blank lines below one of those statements. Defaults to `0` csharp_blank_lines_after_file_scoped_namespace_directive Blank lines after a file-scoped namespace declaration. Defaults to `1` csharp_blank_lines_after_using_list Blank lines below the last using directive, forced exactly rather than floored. Defaults to `1` csharp_blank_lines_around_accessor Blank lines between two accessors of the same property, indexer or event. Defaults to `0` csharp_blank_lines_around_field Blank lines before and after each field. Defaults to `0` csharp_blank_lines_around_invocable Blank lines before and after each method or constructor. 0 means leave the author's. Defaults to `0` csharp_blank_lines_around_local_method Blank lines before and after each local function. Defaults to `1` csharp_blank_lines_around_namespace Blank lines before and after a namespace declaration. Defaults to `0` csharp_blank_lines_around_property Blank lines before and after each property, indexer or event. Defaults to `0` csharp_blank_lines_around_region Blank lines before a #region and after its matching #endregion, forced exactly rather than floored. Defaults to `1` csharp_blank_lines_around_type Blank lines before and after each type declaration. Defaults to `1` csharp_blank_lines_before_block_statements Blank lines above an if/while/for/foreach/do/switch/using/lock/try statement. Defaults to `0` csharp_blank_lines_before_case Blank lines above a switch section's first label. Defaults to `0` csharp_blank_lines_before_control_transfer_statements Blank lines above a return/throw/break/continue/goto/yield statement. Defaults to `0` csharp_blank_lines_before_single_line_comment Blank lines above a // comment that follows real content. Defaults to `0` csharp_blank_lines_inside_namespace Blank lines below the opening brace and above the closing brace of a block-scoped namespace, forced exactly rather than floored. Defaults to `0` csharp_blank_lines_inside_region Blank lines below a #region and above its matching #endregion, forced exactly rather than floored. Defaults to `1` csharp_blank_lines_inside_type Blank lines below the opening brace and above the closing brace of a type, forced exactly rather than floored. Defaults to `0` csharp_keep_blank_lines_in_code Maximum consecutive blank lines between statements. Defaults to `1` csharp_keep_blank_lines_in_declarations Maximum consecutive blank lines between members. Defaults to `1` csharp_remove_blank_lines_near_braces_in_code The same, for a block's opening and closing braces. Defaults to `true` csharp_remove_blank_lines_near_braces_in_declarations Force no blank line directly under a type/namespace's opening brace or above its closing one. Defaults to `true`Expression Bodies
csharp_style_expression_bodied_accessors Convert eligible block-bodied accessors. IDE0027. Skipped where the project compiles below C# 7. Defaults to `false` csharp_style_expression_bodied_constructors Convert eligible block-bodied constructors to expression bodies. IDE0021. Skipped where the project compiles below C# 7. Defaults to `false` csharp_style_expression_bodied_indexers Convert eligible block-bodied indexers. IDE0026. Skipped where the project compiles below C# 6, or below C# 7 for a body that only throws. Defaults to `false` csharp_style_expression_bodied_local_functions Convert eligible block-bodied local functions. IDE0061. Defaults to `false` csharp_style_expression_bodied_methods Convert eligible block-bodied methods to expression bodies. IDE0022. Skipped where the project compiles below C# 6, or below C# 7 for a body that only throws. Defaults to `false` csharp_style_expression_bodied_operators Convert eligible block-bodied operators. IDE0023/IDE0024. Skipped where the project compiles below C# 6, or below C# 7 for a body that only throws. Defaults to `false` csharp_style_expression_bodied_properties Convert an eligible single-getter property to an expression body. IDE0025. Skipped where the project compiles below C# 6, or below C# 7 for a body that only throws. Defaults to `false`Usings
csharp_using_directive_placement Move using directives inside or outside the namespace. IDE0065. Defaults to `(as written)` dotnet_separate_import_directive_groups Separate groups of usings by first namespace segment with a blank line. Defaults to `(not set)` dotnet_sort_system_directives_first Put System.* usings before all others. Defaults to `(not set)`Modifiers and Braces
csharp_prefer_braces Add braces to unbraced control-flow bodies. IDE0011. Applied without a compilation. Defaults to `false` csharp_preferred_modifier_order Reorder modifiers to the specified preference. IDE0036. Applied without a compilation. Defaults to `(not set)` csharp_style_namespace_declarations Convert block namespaces to file-scoped. IDE0161. Applied without a compilation, and skipped where the project compiles below C# 10. Defaults to `(as written)`Trailing Commas
csharp_trailing_comma_in_multiline_lists Add a trailing comma after the last element of a list that breaks across lines. Defaults to `false` csharp_trailing_comma_in_singleline_lists Add a trailing comma after the last element even when the list is on one line. Defaults to `false`Suppression
dotnet_diagnostic.ide0055.severity Set this to none to opt a file out of formatting. Defaults to `warning` file_header_template Insert or correct a // comment header at the top of the file. Supports {fileName}. IDE0073. Defaults to `(not set)` generated_code Skip this file entirely. Curb never formats files marked as generated. Defaults to `false`Xml Files
curb_xml_extensions Further extensions to format as generic XML, comma-separated, such as .xml or .runsettings. Defaults to `(not set)` curb_xml_format Format project, props, targets, solution and nuget.config files. false leaves them unread. Defaults to `true`Xml Layout
xml_attribute_indent Where an attribute on a line of its own starts. Unset keeps its offset from its element as written. Defaults to `(not set)` xml_max_blank_lines_between_tags The most blank lines kept between two tags of element-only content. Defaults to `1` xml_space_before_self_closing Space before />. Unset keeps what each tag has, except in .slnx files, which always get one. Defaults to `(not set)`Razor
curb_razor_format_code_blocks Experimental. Format the C# in @code, @functions and @{ } blocks of .razor and .cshtml files, and nothing else in them. Read only from a section that names those files. Defaults to `false` curb_razor_format_markup Experimental. With curb_razor_format_code_blocks, also re-indent markup by its nesting, as Microsoft's Razor formatter does. Only indentation changes. Read only from a section that names Razor files. Defaults to `false` curb_razor_markup_engine_quirks Experimental. With curb_razor_format_markup, indent markup by tab_width rather than indent_size, and align attributes with a tag that has none on its line, as Microsoft's Razor formatter does. Defaults to `false` razor_attribute_indent_style With curb_razor_format_markup, where an attribute that starts a line inside a start tag goes. Microsoft's Razor formatter reads the same key. Defaults to `align_with_first`No pages match your filter.