Skip to content

Commit c4087e3

Browse files
committed
Infra work
1 parent 523b72f commit c4087e3

File tree

10 files changed

+254
-140
lines changed

10 files changed

+254
-140
lines changed

.editorconfig

Lines changed: 2 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -6,133 +6,11 @@ root = true
66
indent_style = space
77

88
# Visual Studio XML project files
9-
[*.{csproj,vbproj,vcxproj,proj,projitems,shproj,props,targets}]
9+
[*.{csproj,vbproj,vcxproj,proj,projitems,shproj,props,targets,slnx}]
1010
indent_size = 2
1111
charset = utf-8-bom
1212

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

.github/workflows/ci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ env:
1414
TreatWarningsAsErrors: true
1515
ContinuousIntegrationBuild: true
1616
PublishRepositoryUrl: true
17-
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
18-
DOTNET_CLI_TELEMETRY_OPTOUT: true
1917

2018
jobs:
2119
build:

.github/workflows/release.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ env:
1919
TreatWarningsAsErrors: true
2020
ContinuousIntegrationBuild: true
2121
PublishRepositoryUrl: true
22-
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
23-
DOTNET_CLI_TELEMETRY_OPTOUT: true
2422

2523
jobs:
2624
build-and-pack:

.globalconfig

Lines changed: 241 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,241 @@
1+
# IDE0003 and IDE0009: this and Me preferences (option defaults are already false)
2+
dotnet_style_qualification_for_field = false
3+
dotnet_style_qualification_for_property = false
4+
dotnet_style_qualification_for_method = false
5+
dotnet_style_qualification_for_event = false
6+
dotnet_diagnostic.IDE0003.severity = warning
7+
8+
# IDE0005: Remove unnecessary imports
9+
dotnet_diagnostic.IDE0005.severity = warning
10+
11+
# IDE0011: Add braces
12+
dotnet_diagnostic.IDE0011.severity = none
13+
14+
# IDE0016: Use throw expression
15+
dotnet_diagnostic.IDE0016.severity = warning
16+
17+
# IDE0017: Use object initializers
18+
dotnet_style_object_initializer = true
19+
dotnet_diagnostic.IDE0017.severity = warning
20+
21+
# IDE0018: Inline variable declaration
22+
dotnet_diagnostic.IDE0018.severity = warning
23+
24+
# IDE0020 and IDE0038: Use pattern matching to avoid is check followed by a cast
25+
csharp_style_pattern_matching_over_is_with_cast_check = true
26+
csharp_style_pattern_matching_over_as_with_null_check = true
27+
dotnet_diagnostic.IDE0020.severity = warning
28+
dotnet_diagnostic.IDE0038.severity = warning
29+
30+
# IDE0022: Use expression body for methods
31+
csharp_style_expression_bodied_methods = true
32+
csharp_style_expression_bodied_constructors = true
33+
csharp_style_expression_bodied_operators = true
34+
csharp_style_expression_bodied_properties = true
35+
csharp_style_expression_bodied_indexers = true
36+
csharp_style_expression_bodied_accessors = true
37+
csharp_style_expression_bodied_lambdas = true
38+
csharp_style_expression_bodied_local_functions = true
39+
dotnet_diagnostic.IDE0022.severity = warning
40+
41+
# IDE0028: Use collection initializers or expressions
42+
# IDE0300: Use collection expression for array
43+
# IDE0301: Use collection expression for empty
44+
# IDE0302: Use collection expression for stackalloc
45+
# IDE0303: Use collection expression for Create()
46+
# IDE0304: Use collection expression for builder
47+
# IDE0305: Use collection expression for fluent
48+
# IDE0306: Use collection expression for new
49+
dotnet_style_collection_initializer = true
50+
dotnet_style_prefer_collection_expression = when_types_exactly_match
51+
dotnet_diagnostic.IDE0028.severity = none
52+
dotnet_diagnostic.IDE0300.severity = none
53+
dotnet_diagnostic.IDE0301.severity = none
54+
dotnet_diagnostic.IDE0302.severity = none
55+
dotnet_diagnostic.IDE0303.severity = none
56+
dotnet_diagnostic.IDE0304.severity = none
57+
dotnet_diagnostic.IDE0305.severity = none
58+
dotnet_diagnostic.IDE0306.severity = none
59+
60+
# IDE0029: Null check can be simplified (ternary conditional check)
61+
# IDE0030: Null check can be simplified (nullable ternary conditional check)
62+
# IDE0270: Null check can be simplified (if null check)
63+
dotnet_style_coalesce_expression = true
64+
dotnet_diagnostic.IDE0029.severity = warning
65+
dotnet_diagnostic.IDE0030.severity = warning
66+
dotnet_diagnostic.IDE0270.severity = warning
67+
68+
# IDE0031: Use null propagation
69+
dotnet_style_null_propagation = true
70+
dotnet_diagnostic.IDE0031.severity = warning
71+
72+
# IDE0032: Use auto-implemented property
73+
dotnet_style_prefer_auto_properties = true
74+
dotnet_diagnostic.IDE0032.severity = warning
75+
76+
# IDE0033: Use explicitly provided tuple name
77+
dotnet_style_explicit_tuple_names = true
78+
dotnet_diagnostic.IDE0033.severity = warning
79+
80+
# IDE0034: Simplify 'default' expression
81+
csharp_prefer_simple_default_expression = true
82+
dotnet_diagnostic.IDE0034.severity = warning
83+
84+
# IDE0036: Order modifiers
85+
# IDE0040: Add accessibility modifiers
86+
csharp_preferred_modifier_order = public,private,protected,internal,file,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async
87+
dotnet_diagnostic.IDE0036.severity = warning
88+
dotnet_diagnostic.IDE0040.severity = warning
89+
90+
# IDE0037: Use inferred member names
91+
dotnet_style_prefer_inferred_tuple_names = true
92+
dotnet_style_prefer_inferred_anonymous_type_member_names = true
93+
dotnet_diagnostic.IDE0037.severity = warning
94+
95+
# IDE0040: Add accessibility modifiers
96+
dotnet_style_require_accessibility_modifiers = for_non_interface_members
97+
dotnet_diagnostic.IDE0040.severity = warning
98+
99+
# IDE0041: Use 'is null' check
100+
dotnet_style_prefer_is_null_check_over_reference_equality_method = true
101+
dotnet_diagnostic.IDE0041.severity = warning
102+
103+
# IDE0044: Add readonly modifier
104+
dotnet_style_readonly_field = true
105+
dotnet_diagnostic.IDE0044.severity = warning
106+
107+
# IDE0045: Use conditional expression for assignment
108+
dotnet_style_prefer_conditional_expression_over_assignment = true
109+
dotnet_diagnostic.IDE0045.severity = none
110+
111+
# IDE0046: Use conditional expression for return
112+
dotnet_style_prefer_conditional_expression_over_return = true
113+
dotnet_diagnostic.IDE0046.severity = none
114+
115+
# IDE0049: Use language keywords instead of framework type names for type references
116+
# Default is already true. This rule is not enabled on build.
117+
dotnet_style_predefined_type_for_locals_parameters_members = true
118+
dotnet_style_predefined_type_for_member_access = true
119+
dotnet_diagnostic.IDE0049.severity = warning
120+
121+
# IDE0055: Fix formatting
122+
dotnet_diagnostic.IDE0055.severity = warning
123+
124+
# .NET formatting options - IDE0055
125+
dotnet_sort_system_directives_first = true
126+
dotnet_separate_import_directive_groups = false
127+
128+
# New line preferences - IDE0055
129+
csharp_new_line_before_open_brace = all
130+
csharp_new_line_before_else = true
131+
csharp_new_line_before_catch = true
132+
csharp_new_line_before_finally = true
133+
csharp_new_line_before_members_in_object_initializers = true
134+
csharp_new_line_before_members_in_anonymous_types = true
135+
csharp_new_line_between_query_expression_clauses = true
136+
137+
# Indentation preferences - IDE0055
138+
csharp_indent_block_contents = true
139+
csharp_indent_braces = false
140+
csharp_indent_case_contents = true
141+
csharp_indent_case_contents_when_block = false
142+
csharp_indent_switch_labels = true
143+
csharp_indent_labels = one_less_than_current
144+
145+
# Spacing preferences - IDE0055
146+
csharp_space_after_cast = false
147+
csharp_space_after_colon_in_inheritance_clause = true
148+
csharp_space_after_comma = true
149+
csharp_space_after_dot = false
150+
csharp_space_after_keywords_in_control_flow_statements = true
151+
csharp_space_after_semicolon_in_for_statement = true
152+
csharp_space_around_binary_operators = before_and_after
153+
csharp_space_around_declaration_statements = do_not_ignore
154+
csharp_space_before_colon_in_inheritance_clause = true
155+
csharp_space_before_comma = false
156+
csharp_space_before_dot = false
157+
csharp_space_before_open_square_brackets = false
158+
csharp_space_before_semicolon_in_for_statement = false
159+
csharp_space_between_empty_square_brackets = false
160+
csharp_space_between_method_call_empty_parameter_list_parentheses = false
161+
csharp_space_between_method_call_name_and_opening_parenthesis = false
162+
csharp_space_between_method_call_parameter_list_parentheses = false
163+
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
164+
csharp_space_between_method_declaration_name_and_open_parenthesis = false
165+
csharp_space_between_method_declaration_parameter_list_parentheses = false
166+
csharp_space_between_parentheses = false
167+
csharp_space_between_square_brackets = false
168+
169+
# Wrapping preferences - IDE0055
170+
csharp_preserve_single_line_blocks = true
171+
csharp_preserve_single_line_statements = false
172+
173+
# IDE0056: Use index operator
174+
csharp_style_prefer_index_operator = false
175+
dotnet_diagnostic.IDE0056.severity = warning
176+
177+
# IDE0057: Use range operator
178+
csharp_style_prefer_range_operator = false
179+
dotnet_diagnostic.IDE0057.severity = warning
180+
181+
# IDE0062: Make local function static
182+
csharp_prefer_static_local_function = true
183+
dotnet_diagnostic.IDE0062.severity = warning
184+
185+
# IDE0063: Use simple 'using' statement
186+
csharp_prefer_simple_using_statement = true
187+
dotnet_diagnostic.IDE0063.severity = warning
188+
189+
# IDE0066: Use switch expression
190+
csharp_style_prefer_switch_expression = true
191+
dotnet_diagnostic.IDE0066.severity = warning
192+
193+
# IDE1006: Naming rule violation
194+
dotnet_diagnostic.IDE1006.severity = warning
195+
196+
# Naming rules: name all constant fields using PascalCase (IDE1006)
197+
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = warning
198+
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
199+
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
200+
dotnet_naming_symbols.constant_fields.applicable_kinds = field
201+
dotnet_naming_symbols.constant_fields.required_modifiers = const
202+
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
203+
204+
# Naming rules: static fields should have s_ prefix (IDE1006)
205+
dotnet_naming_rule.static_fields_should_have_prefix.severity = suggestion
206+
dotnet_naming_rule.static_fields_should_have_prefix.symbols = static_fields
207+
dotnet_naming_rule.static_fields_should_have_prefix.style = static_prefix_style
208+
dotnet_naming_symbols.static_fields.applicable_kinds = field
209+
dotnet_naming_symbols.static_fields.required_modifiers = static
210+
dotnet_naming_symbols.static_fields.applicable_accessibilities = private, internal, private_protected
211+
dotnet_naming_style.static_prefix_style.required_prefix = s_
212+
dotnet_naming_style.static_prefix_style.capitalization = camel_case
213+
214+
# Naming rules: internal and private fields should be _camelCase (IDE1006)
215+
dotnet_naming_rule.camel_case_for_private_internal_fields.severity = suggestion
216+
dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields
217+
dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style
218+
dotnet_naming_symbols.private_internal_fields.applicable_kinds = field
219+
dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal
220+
dotnet_naming_style.camel_case_underscore_style.required_prefix = _
221+
dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case
222+
223+
# IDE1005
224+
csharp_style_conditional_delegate_call = true
225+
226+
227+
# IDE0160 and IDE0161
228+
csharp_style_namespace_declarations = file_scoped
229+
230+
231+
# CA1014: Mark assemblies with CLSCompliant
232+
dotnet_diagnostic.CA1014.severity = none
233+
234+
# CA1824: Mark assemblies with NeutralResourcesLanguageAttribute
235+
dotnet_diagnostic.CA1824.severity = none
236+
237+
# CA1062: Validate arguments of public methods
238+
dotnet_diagnostic.CA1062.severity = none
239+
240+
241+
# TODO: Use YAnalyzers for var vs explicit types.

0 commit comments

Comments
 (0)