Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 5f5ff6d

Browse files
authored
Change csharp_indent_labels from flush_left to one_less_than_current (#28121)
* Change csharp_indent_labels from flush_left to one_less_than_current * Update coding-style guidelines to include label formatting.
1 parent a985f20 commit 5f5ff6d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ csharp_indent_block_contents = true
3030
csharp_indent_braces = false
3131
csharp_indent_case_contents = true
3232
csharp_indent_switch_labels = true
33-
csharp_indent_labels = flush_left
33+
csharp_indent_labels = one_less_than_current
3434

3535
# avoid this. unless absolutely necessary
3636
dotnet_style_qualification_for_field = false:suggestion

Documentation/coding-guidelines/coding-style.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ The general rule we follow is "use Visual Studio defaults".
2929
13. We use ```nameof(...)``` instead of ```"..."``` whenever possible and relevant.
3030
14. Fields should be specified at the top within type declarations.
3131
15. When including non-ASCII characters in the source code use Unicode escape sequences (\uXXXX) instead of literal characters. Literal non-ASCII characters occasionally get garbled by a tool or editor.
32+
16. When using labels (for goto), indent the label one less than the current indentation.
3233

3334
We have provided a Visual Studio 2013 vssettings file (`corefx.vssettings`) at the root of the corefx repository, enabling C# auto-formatting conforming to the above guidelines. Note that rules 7 and 8 are not covered by the vssettings, since these are not rules currently supported by VS formatting.
3435

0 commit comments

Comments
 (0)