Skip to content

Commit e6ff348

Browse files
committed
Update build.
1 parent f3cee32 commit e6ff348

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

.editorconfig

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ csharp_indent_switch_labels = true
3434
csharp_indent_labels = one_less_than_current
3535

3636
; Modifier preferences
37-
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion
37+
csharp_preferred_modifier_order = public,private,protected,internal,file,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async:warning
3838

3939
; Avoid this. unless absolutely necessary
4040
dotnet_style_qualification_for_field = false:suggestion
@@ -48,31 +48,31 @@ dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
4848
dotnet_style_predefined_type_for_member_access = true:suggestion
4949

5050
; Name all constant fields using PascalCase
51-
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
51+
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = warning
5252
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
5353
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
5454
dotnet_naming_symbols.constant_fields.applicable_kinds = field
5555
dotnet_naming_symbols.constant_fields.required_modifiers = const
5656
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
5757

5858
; Static fields should be _camelCase
59-
dotnet_naming_rule.static_fields_should_be_camel_case.severity = suggestion
59+
dotnet_naming_rule.static_fields_should_be_camel_case.severity = warning
6060
dotnet_naming_rule.static_fields_should_be_camel_case.symbols = static_fields
6161
dotnet_naming_rule.static_fields_should_be_camel_case.style = camel_case_underscore_style
6262
dotnet_naming_symbols.static_fields.applicable_kinds = field
6363
dotnet_naming_symbols.static_fields.required_modifiers = static
6464
dotnet_naming_symbols.static_fields.applicable_accessibilities = private, internal, private_protected
6565

6666
; Static readonly fields should be PascalCase
67-
dotnet_naming_rule.static_readonly_fields_should_be_pascal_case.severity = suggestion
67+
dotnet_naming_rule.static_readonly_fields_should_be_pascal_case.severity = warning
6868
dotnet_naming_rule.static_readonly_fields_should_be_pascal_case.symbols = static_readonly_fields
6969
dotnet_naming_rule.static_readonly_fields_should_be_pascal_case.style = pascal_case_style
7070
dotnet_naming_symbols.static_readonly_fields.applicable_kinds = field
7171
dotnet_naming_symbols.static_readonly_fields.required_modifiers = static, readonly
7272
dotnet_naming_symbols.static_readonly_fields.applicable_accessibilities = private, internal, private_protected
7373

7474
; Internal and private fields should be _camelCase
75-
dotnet_naming_rule.camel_case_for_private_internal_fields.severity = suggestion
75+
dotnet_naming_rule.camel_case_for_private_internal_fields.severity = warning
7676
dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields
7777
dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style
7878
dotnet_naming_symbols.private_internal_fields.applicable_kinds = field

build/Analyzers.ruleset

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
<Rules AnalyzerId="Microsoft.Usage" RuleNamespace="Microsoft.Usage">
55
<!-- Implement standard exception constructors - not all of the exception constructors (e.g., parameterless) are desired in our system. -->
66
<Rule Id="CA1032" Action="None" />
7+
<!-- Use ArgumentNullException.ThrowIfNull instead of if/throw - netstandard2.0 and netstandard2.1 don't have ArgumentNullException.ThrowIfNull. -->
8+
<Rule Id="CA1510" Action="None" />
79
<!-- Change names to avoid reserved word overlaps (e.g., Delegate, GetType, etc.) - too many of these in the public API, we'd break if we fixed it. -->
810
<Rule Id="CA1716" Action="None" />
911
<!-- Implement serialization constructors - false positive when building .NET Core -->

build/Test.ruleset

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
<Rule Id="CA1816" Action="None" />
1313
<!-- Mark members static - test methods may not access member data but also can't be static. -->
1414
<Rule Id="CA1822" Action="None" />
15+
<!-- Seal internal types - tests use internal types for stubs and performance isn't a problem; this causes unnecessary ceremony. -->
16+
<Rule Id="CA1852" Action="None" />
1517
<!-- Implement serialization constructors - false positive when building .NET Core -->
1618
<Rule Id="CA2229" Action="None" />
1719
<!-- Mark ISerializable types with SerializableAttribute - false positive when building .NET Core -->

0 commit comments

Comments
 (0)