|
1 | | -[*.cs] |
| 1 | +root = true |
2 | 2 |
|
3 | | -#Core editorconfig formatting - indentation |
4 | | - |
5 | | -#use soft tabs (spaces) for indentation |
| 3 | +[*] |
| 4 | +trim_trailing_whitespace = true |
| 5 | +insert_final_newline = true |
6 | 6 | indent_style = space |
| 7 | +indent_size = 4 |
| 8 | +charset = utf-8 |
| 9 | +end_of_line = lf |
| 10 | + |
| 11 | +[*.{csproj,json,config,yml,props}] |
| 12 | +indent_size = 2 |
7 | 13 |
|
8 | | -#Formatting - new line options |
| 14 | +# Do not insert newline for ApiApprovalTests |
| 15 | +[*.txt] |
| 16 | +insert_final_newline = false |
9 | 17 |
|
10 | | -#place catch statements on a new line |
11 | | -csharp_new_line_before_catch = true |
12 | | -#place else statements on a new line |
13 | | -csharp_new_line_before_else = true |
14 | | -#require finally statements to be on a new line after the closing brace |
15 | | -csharp_new_line_before_finally = true |
16 | | -#require braces to be on a new line for methods, control_blocks, types, object_collection, and properties (also known as "Allman" style) |
17 | | -csharp_new_line_before_open_brace = methods, control_blocks, types, object_collection, properties |
| 18 | +[*.sh] |
| 19 | +end_of_line = lf |
18 | 20 |
|
19 | | -#Formatting - organize using options |
| 21 | +[*.{cmd, bat}] |
| 22 | +end_of_line = crlf |
20 | 23 |
|
21 | | -#sort System.* using directives alphabetically, and place them before other usings |
22 | | -dotnet_sort_system_directives_first = true |
| 24 | +# C# formatting settings - Namespace options |
| 25 | +csharp_style_namespace_declarations = file_scoped:suggestion |
23 | 26 |
|
24 | | -#Formatting - spacing options |
| 27 | +csharp_style_prefer_switch_expression = true:suggestion |
25 | 28 |
|
26 | | -#require NO space between a cast and the value |
| 29 | +# C# formatting settings - Spacing options |
27 | 30 | csharp_space_after_cast = false |
28 | | -#require a space before the colon for bases or interfaces in a type declaration |
29 | | -csharp_space_after_colon_in_inheritance_clause = true |
30 | | -#require a space after a keyword in a control flow statement such as a for loop |
31 | 31 | csharp_space_after_keywords_in_control_flow_statements = true |
32 | | -#require a space before the colon for bases or interfaces in a type declaration |
| 32 | +csharp_space_between_parentheses = false |
33 | 33 | csharp_space_before_colon_in_inheritance_clause = true |
34 | | -#remove space within empty argument list parentheses |
| 34 | +csharp_space_after_colon_in_inheritance_clause = true |
| 35 | +csharp_space_around_binary_operators = before_and_after |
| 36 | +csharp_space_between_method_declaration_parameter_list_parentheses = false |
| 37 | +csharp_space_between_method_declaration_empty_parameter_list_parentheses = false |
| 38 | +csharp_space_between_method_declaration_name_and_open_parenthesis = false |
| 39 | +csharp_space_between_method_call_parameter_list_parentheses = false |
35 | 40 | csharp_space_between_method_call_empty_parameter_list_parentheses = false |
36 | | -#remove space between method call name and opening parenthesis |
37 | 41 | csharp_space_between_method_call_name_and_opening_parenthesis = false |
38 | | -#do not place space characters after the opening parenthesis and before the closing parenthesis of a method call |
39 | | -csharp_space_between_method_call_parameter_list_parentheses = false |
40 | | -#remove space within empty parameter list parentheses for a method declaration |
41 | | -csharp_space_between_method_declaration_empty_parameter_list_parentheses = false |
42 | | -#place a space character after the opening parenthesis and before the closing parenthesis of a method declaration parameter list. |
43 | | -csharp_space_between_method_declaration_parameter_list_parentheses = false |
44 | | - |
45 | | -#Formatting - wrapping options |
46 | | - |
47 | | -#leave code block on single line |
48 | | -csharp_preserve_single_line_blocks = true |
49 | | -#leave statements and member declarations on the same line |
50 | | -csharp_preserve_single_line_statements = true |
51 | | - |
52 | | -#Style - expression bodied member options |
53 | | - |
54 | | -#prefer expression-bodied members for accessors |
55 | | -csharp_style_expression_bodied_accessors = true:suggestion |
56 | | -#prefer block bodies for methods |
57 | | -csharp_style_expression_bodied_methods = false:suggestion |
58 | | -#prefer expression-bodied members for properties |
59 | | -csharp_style_expression_bodied_properties = true:suggestion |
60 | | - |
61 | | -#Style - expression level options |
62 | | - |
63 | | -#prefer out variables to be declared inline in the argument list of a method call when possible |
64 | | -csharp_style_inlined_variable_declaration = true:suggestion |
65 | | -#prefer the language keyword for member access expressions, instead of the type name, for types that have a keyword to represent them |
66 | | -dotnet_style_predefined_type_for_member_access = true:suggestion |
67 | | - |
68 | | -#Style - implicit and explicit types |
69 | | - |
70 | | -#prefer var is used to declare variables with built-in system types such as int |
71 | | -csharp_style_var_for_built_in_types = true:suggestion |
72 | | -#prefer var when the type is already mentioned on the right-hand side of a declaration expression |
73 | | -csharp_style_var_when_type_is_apparent = true:suggestion |
74 | | - |
75 | | -#Style - language keyword and framework type options |
76 | | - |
77 | | -#prefer the language keyword for local variables, method parameters, and class members, instead of the type name, for types that have a keyword to represent them |
78 | | -dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion |
79 | | - |
80 | | -#Style - qualification options |
81 | | - |
82 | | -#prefer fields not to be prefaced with this. or Me. in Visual Basic |
83 | | -dotnet_style_qualification_for_field = false:suggestion |
84 | | -#prefer methods not to be prefaced with this. or Me. in Visual Basic |
85 | | -dotnet_style_qualification_for_method = false:suggestion |
86 | | -#prefer properties not to be prefaced with this. or Me. in Visual Basic |
87 | | -dotnet_style_qualification_for_property = false:suggestion |
| 42 | +csharp_space_after_comma = true |
| 43 | +csharp_space_before_comma = false |
| 44 | +csharp_space_after_dot = false |
| 45 | +csharp_space_before_dot = false |
| 46 | +csharp_space_after_semicolon_in_for_statement = true |
| 47 | +csharp_space_before_semicolon_in_for_statement = false |
| 48 | +csharp_space_around_declaration_statements = false |
| 49 | +csharp_space_before_open_square_brackets = false |
| 50 | +csharp_space_between_empty_square_brackets = false |
| 51 | +csharp_space_between_square_brackets = false |
0 commit comments