Skip to content

Commit 2e02fc8

Browse files
committed
✨ Migrate to new build system
1 parent ecb0c5a commit 2e02fc8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+1005
-722
lines changed

.config/dotnet-tools.json

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,34 @@
22
"version": 1,
33
"isRoot": true,
44
"tools": {
5-
"cake.tool": {
6-
"version": "2.2.0",
5+
"gitversion.tool": {
6+
"version": "5.12.0",
77
"commands": [
8-
"dotnet-cake"
8+
"dotnet-gitversion"
9+
]
10+
},
11+
"thirdlicense": {
12+
"version": "1.3.1",
13+
"commands": [
14+
"thirdlicense"
15+
]
16+
},
17+
"dotnet-reportgenerator-globaltool": {
18+
"version": "5.2.0",
19+
"commands": [
20+
"reportgenerator"
21+
]
22+
},
23+
"docfx": {
24+
"version": "2.74.0",
25+
"commands": [
26+
"docfx"
27+
]
28+
},
29+
"gitreleasemanager.tool": {
30+
"version": "0.16.0",
31+
"commands": [
32+
"dotnet-gitreleasemanager"
933
]
1034
}
1135
}

.devcontainer/Dockerfile

Lines changed: 0 additions & 9 deletions
This file was deleted.

.devcontainer/devcontainer.json

Lines changed: 0 additions & 29 deletions
This file was deleted.

src/.editorconfig renamed to .editorconfig

Lines changed: 103 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,39 @@
11
# Top-level config file
22
root = true
33

4+
# All files
5+
[*]
6+
indent_style = space
7+
8+
[*.yml]
9+
indent_size = 2
10+
11+
[*.md]
12+
charset = utf-8
13+
insert_final_newline = true
14+
end_of_line = unset # Leave it to git
15+
indent_style = space
16+
indent_size = 2
17+
max_line_length = 80
18+
19+
# XML project files
20+
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
21+
indent_size = 2
22+
23+
# XML config files
24+
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
25+
indent_size = 2
26+
427
# Generic C# files
5-
[*.cs]
28+
[*.{cs,vb}]
629

730
## Generic options
8-
charset = utf-8
31+
charset = utf-8-bom
932
indent_size = 4
1033
indent_style = space
1134
tab_width = 8
1235
trim_trailing_whitespace = true
13-
end_of_line = lf
36+
end_of_line = unset # Leave it to git
1437
insert_final_newline = true
1538

1639
## .NET style rules
@@ -31,6 +54,7 @@ dotnet_style_predefined_type_for_member_access = true:warning
3154

3255
### Modifier preferences
3356
dotnet_style_require_accessibility_modifiers = for_non_interface_members:warning
57+
dotnet_diagnostic.SA1400.severity = warning # it doesn't follow the above value
3458
dotnet_style_readonly_field = true:warning
3559

3660
### Parentheses preferences
@@ -45,16 +69,16 @@ dotnet_style_collection_initializer = true:warning
4569
dotnet_style_explicit_tuple_names = true:warning
4670
dotnet_style_prefer_inferred_tuple_names = true:suggestion
4771
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
48-
dotnet_style_prefer_auto_properties = true:warning
72+
dotnet_style_prefer_auto_properties = true:suggestion
4973
dotnet_style_prefer_conditional_expression_over_assignment = true:warning
50-
dotnet_style_prefer_conditional_expression_over_return = true:suggestion
51-
dotnet_style_prefer_compound_assignment = true:warning
74+
dotnet_style_prefer_conditional_expression_over_return = true:warning
75+
dotnet_style_prefer_compound_assignment = true:suggestion
5276
dotnet_style_prefer_simplified_interpolation = true:warning
5377
dotnet_style_prefer_simplified_boolean_expressions = true:warning
5478
dotnet_style_operator_placement_when_wrapping = end_of_line
5579

5680
### Null-checking preferences
57-
dotnet_style_coalesce_expression = true:warning
81+
dotnet_style_coalesce_expression = true:suggestion
5882
dotnet_style_null_propagation = true:warning
5983
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning
6084

@@ -67,23 +91,25 @@ dotnet_remove_unnecessary_suppression_exclusions = none
6791
csharp_style_var_for_built_in_types = false:warning
6892
csharp_style_var_when_type_is_apparent = true:suggestion
6993
csharp_style_var_elsewhere = false:suggestion
94+
dotnet_diagnostic.IDE0008.severity = suggestion # Doesn't follow above values
7095

7196
### Expression-bodied members
72-
csharp_style_expression_bodied_methods = when_on_single_line:suggestion
97+
csharp_style_expression_bodied_methods = false
7398
csharp_style_expression_bodied_constructors = false:suggestion
7499
csharp_style_expression_bodied_operators = true:suggestion
75-
csharp_style_expression_bodied_properties = when_on_single_line:warning
76-
csharp_style_expression_bodied_indexers = when_on_single_line:warning
77-
csharp_style_expression_bodied_accessors = when_on_single_line:warning
78-
csharp_style_expression_bodied_lambdas = when_on_single_line:warning
100+
csharp_style_expression_bodied_properties = when_on_single_line:suggestion
101+
csharp_style_expression_bodied_indexers = when_on_single_line:suggestion
102+
csharp_style_expression_bodied_accessors = when_on_single_line:suggestion
103+
csharp_style_expression_bodied_lambdas = when_on_single_line:suggestion
79104
csharp_style_expression_bodied_local_functions = when_on_single_line:suggestion
80105

81106
### Pattern matching preferences
82107
csharp_style_pattern_matching_over_is_with_cast_check = true:warning
83108
csharp_style_pattern_matching_over_as_with_null_check = true:warning
84-
csharp_style_prefer_switch_expression = true:warning
85-
csharp_style_prefer_pattern_matching = true:warning
109+
csharp_style_prefer_switch_expression = true:suggestion
110+
csharp_style_prefer_pattern_matching = true:suggestion
86111
csharp_style_prefer_not_pattern = true:warning
112+
csharp_style_prefer_null_check_over_type_check = true:suggestion
87113

88114
### Expression-level preferences
89115
csharp_style_inlined_variable_declaration = true:warning
@@ -95,25 +121,36 @@ csharp_style_prefer_range_operator = true:warning
95121
csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion
96122
csharp_style_unused_value_assignment_preference = discard_variable:warning
97123
csharp_style_unused_value_expression_statement_preference = discard_variable:suggestion
124+
csharp_style_prefer_method_group_conversion = true:suggestion
125+
csharp_style_prefer_local_over_anonymous_function = true:suggestion
98126

99127
### Null-checking preferences
100128
csharp_style_throw_expression = true:warning
101129
csharp_style_conditional_delegate_call = true:warning
102130

103131
### Code-block preferences
104-
csharp_prefer_braces = when_multiline:error
132+
csharp_prefer_braces = true:warning
133+
dotnet_diagnostic.SA1503.severity = warning # Doesn't follow above value
105134
csharp_prefer_simple_using_statement = true:suggestion
135+
csharp_style_prefer_tuple_swap = true:suggestion
106136

107137
### 'using' directive preferences
108-
csharp_using_directive_placement = outside_namespace:warning
138+
csharp_using_directive_placement = inside_namespace:warning
139+
dotnet_diagnostic.SA1200.severity = warning # Doesn't follow above value
109140

110141
### Modifier preferences
111142
csharp_prefer_static_local_function = true:warning
112143
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:warning
113144

145+
### New C# features
146+
csharp_style_prefer_primary_constructors = true:suggestion
147+
csharp_style_prefer_utf8_string_literals = true:suggestion
148+
csharp_style_prefer_readonly_struct = true:suggestion
149+
csharp_style_prefer_readonly_struct_member = true:suggestion
150+
114151
## C# formatting rules
115152
### New line preferences
116-
csharp_new_line_before_open_brace = local_functions,methods,types
153+
csharp_new_line_before_open_brace = methods,types
117154
csharp_new_line_before_else = false
118155
csharp_new_line_before_catch = false
119156
csharp_new_line_before_finally = false
@@ -128,6 +165,7 @@ csharp_indent_labels = one_less_than_current
128165
csharp_indent_block_contents = true
129166
csharp_indent_braces = false
130167
csharp_indent_case_contents_when_block = false
168+
csharp_style_namespace_declarations = file_scoped
131169

132170
### Spacing preferences
133171
csharp_space_after_cast = false
@@ -157,32 +195,65 @@ csharp_space_between_square_brackets = false
157195
csharp_preserve_single_line_statements = false
158196
csharp_preserve_single_line_blocks = true
159197

198+
### Top level statement
199+
csharp_style_prefer_top_level_statements = true:silent
200+
160201
## Naming styles rules
202+
dotnet_style_namespace_match_folder = true:warning
161203
dotnet_diagnostic.IDE1006.severity = warning
162204

205+
dotnet_naming_rule.interface_should_be_begins_with_i.severity = warning
206+
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
207+
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
208+
dotnet_naming_style.begins_with_i.required_prefix = I
209+
dotnet_naming_style.begins_with_i.required_suffix =
210+
dotnet_naming_style.begins_with_i.word_separator =
211+
dotnet_naming_style.begins_with_i.capitalization = pascal_case
212+
213+
dotnet_naming_rule.types_should_be_pascal_case.severity = warning
214+
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
215+
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
216+
dotnet_naming_style.pascal_case.required_prefix =
217+
dotnet_naming_style.pascal_case.required_suffix =
218+
dotnet_naming_style.pascal_case.word_separator =
219+
dotnet_naming_style.pascal_case.capitalization = pascal_case
220+
221+
dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = warning
222+
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
223+
dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
224+
225+
### Symbol specifications
226+
dotnet_naming_symbols.interface.applicable_kinds = interface
227+
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
228+
dotnet_naming_symbols.interface.required_modifiers =
229+
230+
dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
231+
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
232+
dotnet_naming_symbols.types.required_modifiers =
233+
234+
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
235+
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
236+
dotnet_naming_symbols.non_field_members.required_modifiers =
237+
163238
## Code analyzers
164239
### .NET SDK
165240
dotnet_diagnostic.CA1303.severity = none # We don't translate exception and log messages from English
241+
dotnet_diagnostic.SA1025.severity = none # Allow spaces in comments to structure info
242+
dotnet_diagnostic.IDE0045.severity = suggestion # Simplify ifs
243+
dotnet_diagnostic.IDE0046.severity = suggestion # Simplify ifs
166244

167245
### StyleCop
168-
dotnet_diagnostic.SA1009.severity = none # False positive due to nullables
169-
dotnet_diagnostic.SA1011.severity = none # False positive due to nullables
170246
dotnet_diagnostic.SA1101.severity = none # Do not force to prefix local calls with 'this'
171-
dotnet_diagnostic.SA1137.severity = none # False positive due to inline methods
247+
dotnet_diagnostic.SA1204.severity = suggestion # Static methods should be before non-static
172248
dotnet_diagnostic.SA1500.severity = none # Allow inline braces
173-
dotnet_diagnostic.SA1503.severity = suggestion # Braces can be omitted (guards can)
174249
dotnet_diagnostic.SA1633.severity = none # No XML-format header in source files
175-
dotnet_diagnostic.SA1200.severity = none # Namespace outside
176-
177-
### IDE
178-
dotnet_diagnostic.IDE0058.severity = suggestion # Expression value is never used
179250

180251
### SonarAnalyzer
252+
dotnet_diagnostic.S1133.severity = suggestion # Remove deprecated code -.-' I know, some day
181253
dotnet_diagnostic.S1135.severity = suggestion # It's almost inevitable to have TODO but add bug ID
182-
dotnet_diagnostic.S1172.severity = silent # Buggy
183254

184255
# Special rules for test projects
185-
[{*Tests/**,*Examples/**}]
256+
[{src/*Tests/**,src/*Examples/**}]
186257
dotnet_diagnostic.CS1591.severity = none # Disable documentation
187258
dotnet_diagnostic.CA1001.severity = none # No need to implement IDisposable in test classes with cleanup.
188259
dotnet_diagnostic.CA1034.severity = none # Public types in test classes for testing implementations
@@ -192,11 +263,15 @@ dotnet_diagnostic.CA1305.severity = none # No culture method for quick test code
192263
dotnet_diagnostic.CA1307.severity = none # No culture method for quick test code
193264
dotnet_diagnostic.SA0001.severity = none # Disable documentation
194265
dotnet_diagnostic.SA1600.severity = none # Disable documentation
266+
dotnet_diagnostic.SA1201.severity = none # Allow enums inside classes
267+
dotnet_diagnostic.S1144.severity = none # Remove unused setter
268+
dotnet_diagnostic.S2094.severity = none # Remove empty class
195269
dotnet_diagnostic.S2699.severity = none # Assert may be in helper methods
196270
dotnet_diagnostic.S3966.severity = none # Dispose twice to test implementation
271+
dotnet_code_quality_unused_parameters = all:none # Some test methods may not use all the source args
197272

198273
# Special rules for example projects
199-
[*Examples/**]
274+
[src/*Examples/**]
200275
dotnet_diagnostic.SA1123.severity = none # We can have regions inside methods
201276
dotnet_diagnostic.SA1515.severity = none # Allow comment lines after region
202277
dotnet_diagnostic.S1481.severity = none # Unused variables

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,22 @@ labels: ""
66
assignees: ""
77
---
88

9-
**Describe the bug**
10-
A clear and concise description of what the bug is.
9+
## Description
1110

12-
**To Reproduce**
13-
Steps to reproduce the behavior:
11+
TODO: describe the issue
1412

15-
1. Get the library from '...' and version '...'
16-
2. Use the class and method '....'
17-
3. See error
13+
## Reproducer
1814

19-
**Expected behavior**
20-
A clear and concise description of what you expected to happen.
15+
TODO: steps to reproduce the behavior.
2116

22-
**Exceptions**
23-
If applicable, the full exception stacktrace that you get.
17+
## Expected behavior
2418

25-
**Screenshots**
26-
If applicable, add screenshots to help explain your problem.
19+
TODO: description of the expected behavior.
2720

28-
**Desktop (please complete the following information):**
21+
## Report info
2922

30-
- OS: [e.g. Windows, Linux, Mac]
31-
- Version [e.g. 22]
23+
TODO: if applicable, the full exception stacktrace that you get.
3224

33-
**Additional context**
34-
Add any other context about the problem here.
25+
TODO: if applicable, add screenshots to help explain your problem.
26+
27+
TODO: describe your environment like OS, app/lib version

0 commit comments

Comments
 (0)