1+ # top-most EditorConfig file
2+ root = true
3+
4+ # Don't use tabs for indentation.
5+ [* ]
6+ indent_style = space
7+
8+ [* .cs ]
9+ indent_style = space
10+ indent_size = 4
11+ insert_final_newline = true
12+ charset = utf-8-bom
13+
14+ # Formatting - new line options
15+
16+ # place else statements on a new line
17+ csharp_new_line_before_else = true
18+ # require members of object intializers to be on separate lines
19+ csharp_new_line_before_members_in_object_initializers = true
20+ # require braces to be on a new line for methods, object_collection_array_initializers, types, and control_blocks (also known as "Allman" style)
21+ csharp_new_line_before_open_brace = methods, object_collection_array_initializers, types, control_blocks
22+
23+ # Formatting - organize using options
24+
25+ # do not place System.* using directives before other using directives
26+ dotnet_sort_system_directives_first = true
27+
28+ # Formatting - spacing options
29+
30+ # require NO space between a cast and the value
31+ csharp_space_after_cast = false
32+ # require a space before the colon for bases or interfaces in a type declaration
33+ csharp_space_after_colon_in_inheritance_clause = true
34+ # require a space after a keyword in a control flow statement such as a for loop
35+ csharp_space_after_keywords_in_control_flow_statements = true
36+ # require a space before the colon for bases or interfaces in a type declaration
37+ csharp_space_before_colon_in_inheritance_clause = true
38+ # remove space within empty argument list parentheses
39+ csharp_space_between_method_call_empty_parameter_list_parentheses = false
40+ # remove space between method call name and opening parenthesis
41+ csharp_space_between_method_call_name_and_opening_parenthesis = false
42+ # do not place space characters after the opening parenthesis and before the closing parenthesis of a method call
43+ csharp_space_between_method_call_parameter_list_parentheses = false
44+ # remove space within empty parameter list parentheses for a method declaration
45+ csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
46+ # place a space character after the opening parenthesis and before the closing parenthesis of a method declaration parameter list.
47+ csharp_space_between_method_declaration_parameter_list_parentheses = false
48+
49+ # Formatting - wrapping options
50+
51+ # leave code block on single line
52+ csharp_preserve_single_line_blocks = true
53+
54+ # Style - Code block preferences
55+
56+ # prefer curly braces even for one line of code
57+ csharp_prefer_braces = true :suggestion
58+
59+ # Style - expression bodied member options
60+
61+ # prefer expression-bodied members for methods
62+ csharp_style_expression_bodied_methods = true :suggestion
63+ # prefer expression-bodied members for properties
64+ csharp_style_expression_bodied_properties = true :suggestion
65+
66+ # Style - expression level options
67+
68+ # prefer out variables to be declared inline in the argument list of a method call when possible
69+ csharp_style_inlined_variable_declaration = true :suggestion
70+
71+ # Style - Expression-level preferences
72+
73+ # prefer default over default(T)
74+ csharp_prefer_simple_default_expression = true :suggestion
75+ # prefer objects to be initialized using object initializers when possible
76+ dotnet_style_object_initializer = true :suggestion
77+
78+ # Style - language keyword and framework type options
79+
80+ # 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
81+ dotnet_style_predefined_type_for_locals_parameters_members = true :warning
82+
83+ # Style - modifier options
84+
85+ # prefer accessibility modifiers to be declared except for public interface members. This will currently not differ from always and will act as future proofing for if C# adds default interface methods.
86+ dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion
87+
88+ # Style - Modifier preferences
89+
90+ # when this rule is set to a list of modifiers, prefer the specified ordering.
91+ csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:warning
92+
93+ # Style - Pattern matching
94+
95+ # prefer pattern matching instead of is expression with type casts
96+ csharp_style_pattern_matching_over_as_with_null_check = true :suggestion
97+
98+ # Style - qualification options
99+
100+ # prefer methods not to be prefaced with this. or Me. in Visual Basic
101+ dotnet_style_qualification_for_method = false :suggestion
102+
103+ # static fields should have s_ prefix
104+ dotnet_naming_rule.static_fields_should_have_prefix.severity = warning
105+ dotnet_naming_rule.static_fields_should_have_prefix.symbols = static_fields
106+ dotnet_naming_rule.static_fields_should_have_prefix.style = static_prefix_style
107+ dotnet_naming_symbols.static_fields.applicable_kinds = field
108+ dotnet_naming_symbols.static_fields.required_modifiers = static
109+ dotnet_naming_symbols.static_fields.applicable_accessibilities = private, internal, protected, private_protected
110+ dotnet_naming_style.static_prefix_style.required_prefix = s_
111+ dotnet_naming_style.static_prefix_style.capitalization = camel_case
112+
113+ # name all constant fields using PascalCase
114+ dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = warning
115+ dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
116+ dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
117+ dotnet_naming_symbols.constant_fields.applicable_kinds = field
118+ dotnet_naming_symbols.constant_fields.required_modifiers = const
119+ dotnet_naming_style.pascal_case_style.capitalization = pascal_case
120+
121+ # IDE0005: Remove unnecessary imports
122+ dotnet_diagnostic.IDE0005.severity = warning
123+
124+ # CA1014: Mark assemblies with CLSCompliant
125+ dotnet_diagnostic.CA1014.severity = none
126+
127+ # CA1824: Mark assemblies with NeutralResourcesLanguageAttribute
128+ dotnet_diagnostic.CA1824.severity = none
129+
130+ # CA1062: Validate arguments of public methods
131+ dotnet_diagnostic.CA1062.severity = none
0 commit comments