Skip to content

Commit

Permalink
Merge pull request #1615 from json-api-dotnet/merge-master-into-openapi
Browse files Browse the repository at this point in the history
Merge master into openapi
  • Loading branch information
bkoelman authored Oct 1, 2024
2 parents be9165b + abfc8c8 commit 0a3fa63
Show file tree
Hide file tree
Showing 1,218 changed files with 20,067 additions and 16,696 deletions.
6 changes: 3 additions & 3 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"jetbrains.resharper.globaltools": {
"version": "2024.1.4",
"version": "2024.2.5",
"commands": [
"jb"
],
Expand All @@ -17,7 +17,7 @@
"rollForward": false
},
"dotnet-reportgenerator-globaltool": {
"version": "5.3.7",
"version": "5.3.10",
"commands": [
"reportgenerator"
],
Expand All @@ -31,7 +31,7 @@
"rollForward": false
},
"microsoft.openapi.kiota": {
"version": "1.15.0",
"version": "1.18.0",
"commands": [
"kiota"
],
Expand Down
158 changes: 120 additions & 38 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,60 +4,119 @@ root = true
[*]
indent_style = space
indent_size = 4
tab-width = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{config,csproj,css,js,json,props,ruleset,xslt,html}]
[*.{config,csproj,css,js,json,props,targets,xml,ruleset,xsd,xslt,html,yml,yaml}]
indent_size = 2
tab-width = 2
max_line_length = 160

[*.{cs,cshtml,ascx,aspx}]

[*.{cs}]
#### C#/.NET Coding Conventions ####

# Default severity for IDE* analyzers with category 'Style'
# Note: specific rules below use severity silent, because Resharper code cleanup auto-fixes them.
dotnet_analyzer_diagnostic.category-Style.severity = warning

# 'using' directive preferences
dotnet_sort_system_directives_first = true
csharp_using_directive_placement = outside_namespace:suggestion
csharp_using_directive_placement = outside_namespace:silent
# IDE0005: Remove unnecessary import
dotnet_diagnostic.IDE0005.severity = silent

# Namespace declarations
csharp_style_namespace_declarations = file_scoped:suggestion
csharp_style_namespace_declarations = file_scoped:silent
# IDE0160: Use block-scoped namespace
dotnet_diagnostic.IDE0160.severity = silent
# IDE0161: Use file-scoped namespace
dotnet_diagnostic.IDE0161.severity = silent

# this. preferences
dotnet_style_qualification_for_field = false:suggestion
dotnet_style_qualification_for_property = false:suggestion
dotnet_style_qualification_for_method = false:suggestion
dotnet_style_qualification_for_event = false:suggestion
dotnet_style_qualification_for_field = false:silent
dotnet_style_qualification_for_property = false:silent
dotnet_style_qualification_for_method = false:silent
dotnet_style_qualification_for_event = false:silent
# IDE0003: Remove this or Me qualification
dotnet_diagnostic.IDE0003.severity = silent
# IDE0009: Add this or Me qualification
dotnet_diagnostic.IDE0009.severity = silent

# Language keywords vs BCL types preferences
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
dotnet_style_predefined_type_for_member_access = true:suggestion
dotnet_style_predefined_type_for_locals_parameters_members = true:silent
dotnet_style_predefined_type_for_member_access = true:silent
# IDE0049: Use language keywords instead of framework type names for type references
dotnet_diagnostic.IDE0049.severity = silent

# Modifier preferences
dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion
csharp_preferred_modifier_order = public, private, protected, internal, new, static, abstract, virtual, sealed, readonly, override, extern, unsafe, volatile, async:suggestion
csharp_style_pattern_local_over_anonymous_function = false:silent
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
# IDE0040: Add accessibility modifiers
dotnet_diagnostic.IDE0040.severity = silent
csharp_preferred_modifier_order = public, private, protected, internal, new, static, abstract, virtual, sealed, readonly, override, extern, unsafe, volatile, async:silent
# IDE0036: Order modifiers
dotnet_diagnostic.IDE0036.severity = silent

# Expression-level preferences
dotnet_style_operator_placement_when_wrapping = end_of_line
dotnet_style_prefer_auto_properties = true:suggestion
dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion
dotnet_style_prefer_conditional_expression_over_return = true:suggestion
csharp_style_unused_value_expression_statement_preference = discard_variable:suggestion
dotnet_style_prefer_auto_properties = true:silent
# IDE0032: Use auto property
dotnet_diagnostic.IDE0032.severity = silent
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
# IDE0045: Use conditional expression for assignment
dotnet_diagnostic.IDE0045.severity = silent
dotnet_style_prefer_conditional_expression_over_return = true:silent
# IDE0046: Use conditional expression for return
dotnet_diagnostic.IDE0046.severity = silent
csharp_style_unused_value_expression_statement_preference = discard_variable:silent
# IDE0058: Remove unused expression value
dotnet_diagnostic.IDE0058.severity = silent

# Collection expression preferences (note: partially turned off in Directory.Build.props)
dotnet_style_prefer_collection_expression = when_types_exactly_match

# Parameter preferences
dotnet_code_quality_unused_parameters = non_public:suggestion
dotnet_code_quality_unused_parameters = non_public

# Local functions vs lambdas
csharp_style_prefer_local_over_anonymous_function = false:silent
# IDE0039: Use local function instead of lambda
dotnet_diagnostic.IDE0039.severity = silent

# Expression-bodied members
csharp_style_expression_bodied_accessors = true:suggestion
csharp_style_expression_bodied_constructors = false:suggestion
csharp_style_expression_bodied_indexers = true:suggestion
csharp_style_expression_bodied_lambdas = true:suggestion
csharp_style_expression_bodied_local_functions = false:suggestion
csharp_style_expression_bodied_methods = false:suggestion
csharp_style_expression_bodied_operators = false:suggestion
csharp_style_expression_bodied_properties = true:suggestion
csharp_style_expression_bodied_accessors = true:silent
# IDE0027: Use expression body for accessors
dotnet_diagnostic.IDE0027.severity = silent
csharp_style_expression_bodied_constructors = false:silent
# IDE0021: Use expression body for constructors
dotnet_diagnostic.IDE0021.severity = silent
csharp_style_expression_bodied_indexers = true:silent
# IDE0026: Use expression body for indexers
dotnet_diagnostic.IDE0026.severity = silent
csharp_style_expression_bodied_lambdas = true:silent
# IDE0053: Use expression body for lambdas
dotnet_diagnostic.IDE0053.severity = silent
csharp_style_expression_bodied_local_functions = false:silent
# IDE0061: Use expression body for local functions
dotnet_diagnostic.IDE0061.severity = silent
csharp_style_expression_bodied_methods = false:silent
# IDE0022: Use expression body for methods
dotnet_diagnostic.IDE0022.severity = silent
csharp_style_expression_bodied_operators = false:silent
# IDE0023: Use expression body for conversion operators
dotnet_diagnostic.IDE0023.severity = silent
# IDE0024: Use expression body for operators
dotnet_diagnostic.IDE0024.severity = silent
csharp_style_expression_bodied_properties = true:silent
# IDE0025: Use expression body for properties
dotnet_diagnostic.IDE0025.severity = silent

# Code-block preferences
csharp_prefer_braces = true:suggestion
csharp_prefer_braces = true:silent
# IDE0011: Add braces
dotnet_diagnostic.IDE0011.severity = silent

# Indentation preferences
csharp_indent_case_contents_when_block = false
Expand All @@ -66,19 +125,42 @@ csharp_indent_case_contents_when_block = false
csharp_preserve_single_line_statements = false

# 'var' usage preferences
csharp_style_var_for_built_in_types = false:none
csharp_style_var_when_type_is_apparent = true:none
csharp_style_var_elsewhere = false:none
csharp_style_var_for_built_in_types = false:silent
csharp_style_var_when_type_is_apparent = true:silent
csharp_style_var_elsewhere = false:silent
# IDE0007: Use var instead of explicit type
dotnet_diagnostic.IDE0007.severity = silent
# IDE0008: Use explicit type instead of var
dotnet_diagnostic.IDE0008.severity = silent

# Parentheses preferences
dotnet_style_parentheses_in_arithmetic_binary_operators = never_if_unnecessary:suggestion
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:suggestion
dotnet_style_parentheses_in_relational_binary_operators = never_if_unnecessary:suggestion

# Expression value is never used
dotnet_diagnostic.IDE0058.severity = none

#### Naming Style ####
dotnet_style_parentheses_in_arithmetic_binary_operators = never_if_unnecessary:silent
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
dotnet_style_parentheses_in_relational_binary_operators = never_if_unnecessary:silent
# IDE0047: Remove unnecessary parentheses
dotnet_diagnostic.IDE0047.severity = silent
# IDE0048: Add parentheses for clarity
dotnet_diagnostic.IDE0048.severity = silent

# IDE0010: Add missing cases to switch statement
dotnet_diagnostic.IDE0010.severity = silent
# IDE0072: Add missing cases to switch expression
dotnet_diagnostic.IDE0072.severity = silent

# IDE0029: Null check can be simplified
dotnet_diagnostic.IDE0029.severity = silent
# IDE0030: Null check can be simplified
dotnet_diagnostic.IDE0030.severity = silent
# IDE0270: Null check can be simplified
dotnet_diagnostic.IDE0270.severity = silent

# JSON002: Probable JSON string detected
dotnet_diagnostic.JSON002.severity = silent

# CA1062: Validate arguments of public methods
dotnet_code_quality.CA1062.excluded_symbol_names = Accept|DefaultVisit|Visit*|Apply*

#### .NET Naming Style ####

dotnet_diagnostic.IDE1006.severity = warning

Expand Down
44 changes: 22 additions & 22 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
pull-request-branch-name:
separator: "-"
- package-ecosystem: nuget
directory: "/"
schedule:
interval: daily
pull-request-branch-name:
separator: "-"
open-pull-requests-limit: 25
ignore:
# Block updates to all exposed dependencies of the NuGet packages we produce, as updating them would be a breaking change.
- dependency-name: 'Ben.Demystifier'
- dependency-name: 'Humanizer*'
- dependency-name: 'Microsoft.CodeAnalysis*'
- dependency-name: 'Microsoft.EntityFrameworkCore*'
# Block major updates of packages that require a matching .NET version.
- dependency-name: 'Microsoft.AspNetCore*'
update-types: ["version-update:semver-major"]
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
pull-request-branch-name:
separator: "-"
- package-ecosystem: nuget
directory: "/"
schedule:
interval: daily
pull-request-branch-name:
separator: "-"
open-pull-requests-limit: 25
ignore:
# Block updates to all exposed dependencies of the NuGet packages we produce, as updating them would be a breaking change.
- dependency-name: "Ben.Demystifier"
- dependency-name: "Humanizer*"
- dependency-name: "Microsoft.CodeAnalysis*"
- dependency-name: "Microsoft.EntityFrameworkCore*"
# Block major updates of packages that require a matching .NET version.
- dependency-name: "Microsoft.AspNetCore*"
update-types: ["version-update:semver-major"]
48 changes: 35 additions & 13 deletions CodingGuidelines.ruleset
Original file line number Diff line number Diff line change
@@ -1,32 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Coding Guidelines" Description=" " ToolsVersion="16.0">
<RuleSet Name="Coding Guidelines" Description=" " ToolsVersion="17.0">
<Rules AnalyzerId="CSharpGuidelinesAnalyzer" RuleNamespace="CSharpGuidelinesAnalyzer">
<Rule Id="AV1008" Action="Warning" />
<Rule Id="AV1135" Action="None" />
<Rule Id="AV1500" Action="None" />
<Rule Id="AV1505" Action="Warning" />
<Rule Id="AV1506" Action="Warning" />
<Rule Id="AV1507" Action="Warning" />
<Rule Id="AV1008" Action="Warning" />
<Rule Id="AV1130" Action="Warning" />
<Rule Id="AV1135" Action="Info" />
<Rule Id="AV1536" Action="None" />
<Rule Id="AV1537" Action="None" />
<Rule Id="AV1551" Action="Info" />
<Rule Id="AV1555" Action="Warning" />
<Rule Id="AV1564" Action="Info" />
<Rule Id="AV1551" Action="None" />
<Rule Id="AV1564" Action="None" />
<Rule Id="AV1568" Action="Warning" />
<Rule Id="AV1580" Action="None" />
<Rule Id="AV1706" Action="Warning" />
<Rule Id="AV1710" Action="Info" />
<Rule Id="AV1711" Action="Info" />
<Rule Id="AV1704" Action="None" />
<Rule Id="AV1710" Action="None" />
<Rule Id="AV1711" Action="None" />
<Rule Id="AV1738" Action="Warning" />
<Rule Id="AV1739" Action="Warning" />
<Rule Id="AV1745" Action="Warning" />
<Rule Id="AV1755" Action="Warning" />
<Rule Id="AV2210" Action="Warning" />
<Rule Id="AV2220" Action="Warning" />
<Rule Id="AV2230" Action="Info" />
<Rule Id="AV2305" Action="None" />
<Rule Id="AV2310" Action="Info" />
<Rule Id="AV2318" Action="Warning" />
</Rules>
<Rules AnalyzerId="Microsoft.CodeAnalysis.NetAnalyzers" RuleNamespace="Microsoft.CodeAnalysis.NetAnalyzers">
<Rule Id="CA1027" Action="Warning" />
<Rule Id="CA1033" Action="Warning" />
<Rule Id="CA1062" Action="Warning" />
<Rule Id="CA1063" Action="Warning" />
<Rule Id="CA1064" Action="Warning" />
<Rule Id="CA1065" Action="Warning" />
<Rule Id="CA1066" Action="Warning" />
<Rule Id="CA1305" Action="None" />
<Rule Id="CA1716" Action="None" />
<Rule Id="CA1720" Action="None" />
<Rule Id="CA1725" Action="None" />
<Rule Id="CA1810" Action="Warning" />
<Rule Id="CA1820" Action="Warning" />
<Rule Id="CA1822" Action="None" />
<Rule Id="CA1849" Action="Warning" />
<Rule Id="CA2000" Action="Warning" />
<Rule Id="CA2119" Action="Warning" />
<Rule Id="CA2207" Action="Warning" />
<Rule Id="CA2217" Action="Warning" />
</Rules>
<Rules AnalyzerId="System.Text.RegularExpressions.Generator" RuleNamespace="System.Text.RegularExpressions.Generator">
<Rule Id="SYSLIB1045" Action="Warning" />
</Rules>
<Rules AnalyzerId="Microsoft.CodeAnalysis.CSharp.NetAnalyzers" RuleNamespace="Microsoft.CodeAnalysis.CSharp.NetAnalyzers">
<Rule Id="CA1508" Action="Info" />
</Rules>
</RuleSet>
Loading

0 comments on commit 0a3fa63

Please sign in to comment.