Skip to content

Commit ced9b5d

Browse files
author
ChristianHaase
committed
init
0 parents  commit ced9b5d

40 files changed

+3627
-0
lines changed

.editorconfig

Lines changed: 227 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,227 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Don't use tabs for indentation.
7+
[*]
8+
indent_style = space
9+
# (Please don't specify an indent_size here; that has too many unintended consequences.)
10+
spelling_exclusion_path = SpellingExclusions.dic
11+
12+
# Code files
13+
[*.{cs,csx,vb,vbx}]
14+
indent_size = 4
15+
insert_final_newline = true
16+
charset = utf-8-bom
17+
18+
# XML project files
19+
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
20+
indent_size = 2
21+
22+
# XML config files
23+
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
24+
indent_size = 2
25+
26+
# JSON files
27+
[*.json]
28+
indent_size = 2
29+
30+
# Powershell files
31+
[*.ps1]
32+
indent_size = 2
33+
34+
# Shell script files
35+
[*.sh]
36+
end_of_line = lf
37+
indent_size = 2
38+
39+
# Dotnet code style settings:
40+
[*.{cs,vb}]
41+
42+
# Sort using and Import directives with System.* appearing first
43+
dotnet_sort_system_directives_first = true
44+
dotnet_separate_import_directive_groups = false
45+
# Avoid "this." and "Me." if not necessary
46+
dotnet_style_qualification_for_field = false:refactoring
47+
dotnet_style_qualification_for_property = false:refactoring
48+
dotnet_style_qualification_for_method = false:refactoring
49+
dotnet_style_qualification_for_event = false:refactoring
50+
51+
# Use language keywords instead of framework type names for type references
52+
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
53+
dotnet_style_predefined_type_for_member_access = true:suggestion
54+
55+
# Suggest more modern language features when available
56+
dotnet_style_object_initializer = true:suggestion
57+
dotnet_style_collection_initializer = true:suggestion
58+
dotnet_style_coalesce_expression = true:suggestion
59+
dotnet_style_null_propagation = true:suggestion
60+
dotnet_style_explicit_tuple_names = true:suggestion
61+
62+
# Whitespace options
63+
dotnet_style_allow_multiple_blank_lines_experimental = false
64+
65+
# Non-private static fields are PascalCase
66+
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.severity = suggestion
67+
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.symbols = non_private_static_fields
68+
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.style = non_private_static_field_style
69+
70+
dotnet_naming_symbols.non_private_static_fields.applicable_kinds = field
71+
dotnet_naming_symbols.non_private_static_fields.applicable_accessibilities = public, protected, internal, protected_internal, private_protected
72+
dotnet_naming_symbols.non_private_static_fields.required_modifiers = static
73+
74+
dotnet_naming_style.non_private_static_field_style.capitalization = pascal_case
75+
76+
# Non-private readonly fields are PascalCase
77+
dotnet_naming_rule.non_private_readonly_fields_should_be_pascal_case.severity = suggestion
78+
dotnet_naming_rule.non_private_readonly_fields_should_be_pascal_case.symbols = non_private_readonly_fields
79+
dotnet_naming_rule.non_private_readonly_fields_should_be_pascal_case.style = non_private_readonly_field_style
80+
81+
dotnet_naming_symbols.non_private_readonly_fields.applicable_kinds = field
82+
dotnet_naming_symbols.non_private_readonly_fields.applicable_accessibilities = public, protected, internal, protected_internal, private_protected
83+
dotnet_naming_symbols.non_private_readonly_fields.required_modifiers = readonly
84+
85+
dotnet_naming_style.non_private_readonly_field_style.capitalization = pascal_case
86+
87+
# Constants are PascalCase
88+
dotnet_naming_rule.constants_should_be_pascal_case.severity = suggestion
89+
dotnet_naming_rule.constants_should_be_pascal_case.symbols = constants
90+
dotnet_naming_rule.constants_should_be_pascal_case.style = constant_style
91+
92+
dotnet_naming_symbols.constants.applicable_kinds = field, local
93+
dotnet_naming_symbols.constants.required_modifiers = const
94+
95+
dotnet_naming_style.constant_style.capitalization = pascal_case
96+
97+
# Static fields are camelCase and start with _
98+
dotnet_naming_rule.static_fields_should_be_camel_case.severity = suggestion
99+
dotnet_naming_rule.static_fields_should_be_camel_case.symbols = static_fields
100+
dotnet_naming_rule.static_fields_should_be_camel_case.style = static_field_style
101+
102+
dotnet_naming_symbols.static_fields.applicable_kinds = field
103+
dotnet_naming_symbols.static_fields.required_modifiers = static
104+
105+
dotnet_naming_style.static_field_style.capitalization = camel_case
106+
dotnet_naming_style.static_field_style.required_prefix = _
107+
108+
# Instance fields are camelCase and start with _
109+
dotnet_naming_rule.instance_fields_should_be_camel_case.severity = suggestion
110+
dotnet_naming_rule.instance_fields_should_be_camel_case.symbols = instance_fields
111+
dotnet_naming_rule.instance_fields_should_be_camel_case.style = instance_field_style
112+
113+
dotnet_naming_symbols.instance_fields.applicable_kinds = field
114+
115+
dotnet_naming_style.instance_field_style.capitalization = camel_case
116+
dotnet_naming_style.instance_field_style.required_prefix = _
117+
118+
# Locals and parameters are camelCase
119+
dotnet_naming_rule.locals_should_be_camel_case.severity = suggestion
120+
dotnet_naming_rule.locals_should_be_camel_case.symbols = locals_and_parameters
121+
dotnet_naming_rule.locals_should_be_camel_case.style = camel_case_style
122+
123+
dotnet_naming_symbols.locals_and_parameters.applicable_kinds = parameter, local
124+
125+
dotnet_naming_style.camel_case_style.capitalization = camel_case
126+
127+
# Local functions are PascalCase
128+
dotnet_naming_rule.local_functions_should_be_pascal_case.severity = suggestion
129+
dotnet_naming_rule.local_functions_should_be_pascal_case.symbols = local_functions
130+
dotnet_naming_rule.local_functions_should_be_pascal_case.style = local_function_style
131+
132+
dotnet_naming_symbols.local_functions.applicable_kinds = local_function
133+
134+
dotnet_naming_style.local_function_style.capitalization = pascal_case
135+
136+
# By default, name items with PascalCase
137+
dotnet_naming_rule.members_should_be_pascal_case.severity = suggestion
138+
dotnet_naming_rule.members_should_be_pascal_case.symbols = all_members
139+
dotnet_naming_rule.members_should_be_pascal_case.style = pascal_case_style
140+
141+
dotnet_naming_symbols.all_members.applicable_kinds = *
142+
143+
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
144+
145+
# RS0016: Only enable if API files are present
146+
dotnet_public_api_analyzer.require_api_files = true
147+
148+
# CSharp code style settings:
149+
[*.cs]
150+
# Newline settings
151+
csharp_new_line_before_open_brace = all
152+
csharp_new_line_before_else = true
153+
csharp_new_line_before_catch = true
154+
csharp_new_line_before_finally = true
155+
csharp_new_line_before_members_in_object_initializers = true
156+
csharp_new_line_before_members_in_anonymous_types = true
157+
csharp_new_line_between_query_expression_clauses = true
158+
159+
# Indentation preferences
160+
csharp_indent_block_contents = true
161+
csharp_indent_braces = false
162+
csharp_indent_case_contents = true
163+
csharp_indent_case_contents_when_block = true
164+
csharp_indent_switch_labels = true
165+
csharp_indent_labels = flush_left
166+
167+
# Whitespace options
168+
csharp_style_allow_embedded_statements_on_same_line_experimental = false
169+
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = false
170+
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = false
171+
csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = false
172+
csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = false
173+
174+
# Prefer "var" everywhere
175+
csharp_style_var_for_built_in_types = true:suggestion
176+
csharp_style_var_when_type_is_apparent = true:suggestion
177+
csharp_style_var_elsewhere = true:suggestion
178+
179+
# Prefer method-like constructs to have a block body
180+
csharp_style_expression_bodied_methods = false:none
181+
csharp_style_expression_bodied_constructors = false:none
182+
csharp_style_expression_bodied_operators = false:none
183+
184+
# Prefer property-like constructs to have an expression-body
185+
csharp_style_expression_bodied_properties = true:none
186+
csharp_style_expression_bodied_indexers = true:none
187+
csharp_style_expression_bodied_accessors = true:none
188+
189+
# Suggest more modern language features when available
190+
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
191+
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
192+
csharp_style_inlined_variable_declaration = true:suggestion
193+
csharp_style_throw_expression = true:suggestion
194+
csharp_style_conditional_delegate_call = true:suggestion
195+
csharp_style_prefer_extended_property_pattern = true:suggestion
196+
197+
# Space preferences
198+
csharp_space_after_cast = false
199+
csharp_space_after_colon_in_inheritance_clause = true
200+
csharp_space_after_comma = true
201+
csharp_space_after_dot = false
202+
csharp_space_after_keywords_in_control_flow_statements = true
203+
csharp_space_after_semicolon_in_for_statement = true
204+
csharp_space_around_binary_operators = before_and_after
205+
csharp_space_around_declaration_statements = do_not_ignore
206+
csharp_space_before_colon_in_inheritance_clause = true
207+
csharp_space_before_comma = false
208+
csharp_space_before_dot = false
209+
csharp_space_before_open_square_brackets = false
210+
csharp_space_before_semicolon_in_for_statement = false
211+
csharp_space_between_empty_square_brackets = false
212+
csharp_space_between_method_call_empty_parameter_list_parentheses = false
213+
csharp_space_between_method_call_name_and_opening_parenthesis = false
214+
csharp_space_between_method_call_parameter_list_parentheses = false
215+
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
216+
csharp_space_between_method_declaration_name_and_open_parenthesis = false
217+
csharp_space_between_method_declaration_parameter_list_parentheses = false
218+
csharp_space_between_parentheses = false
219+
csharp_space_between_square_brackets = false
220+
221+
# Blocks are allowed
222+
csharp_prefer_braces = true:silent
223+
csharp_preserve_single_line_blocks = true
224+
csharp_preserve_single_line_statements = true
225+
226+
# IDE0060: Remove unused parameter
227+
dotnet_diagnostic.IDE0060.severity = warning

0 commit comments

Comments
 (0)