Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: json-api-dotnet/JsonApiDotNetCore
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4.1.0
Choose a base ref
...
head repository: json-api-dotnet/JsonApiDotNetCore
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing 3,956 changed files with 422,801 additions and 87,389 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
33 changes: 28 additions & 5 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -3,16 +3,39 @@
"isRoot": true,
"tools": {
"jetbrains.resharper.globaltools": {
"version": "2020.3.3",
"version": "2025.1.5",
"commands": [
"jb"
]
],
"rollForward": false
},
"regitlint": {
"version": "2.1.3",
"version": "6.3.13",
"commands": [
"regitlint"
]
],
"rollForward": false
},
"dotnet-reportgenerator-globaltool": {
"version": "5.4.11",
"commands": [
"reportgenerator"
],
"rollForward": false
},
"docfx": {
"version": "2.78.2",
"commands": [
"docfx"
],
"rollForward": false
},
"microsoft.openapi.kiota": {
"version": "1.28.0",
"commands": [
"kiota"
],
"rollForward": false
}
}
}
}
201 changes: 149 additions & 52 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -4,88 +4,186 @@ root = true
[*]
indent_style = space
indent_size = 4
tab-width = 4
charset = utf-8
trim_trailing_whitespace = true
end_of_line = lf
insert_final_newline = true

[*.{csproj,json}]
[*.{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}]
#### .NET Coding Conventions ####
[*.{cs,cshtml,ascx,aspx}]

# Organize usings
#### 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:silent
# IDE0005: Remove unnecessary import
dotnet_diagnostic.IDE0005.severity = silent

# Namespace declarations
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_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
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

# Member preferences (these analyzers are unreliable)
# IDE0051: Remove unused private member
dotnet_diagnostic.IDE0051.severity = silent
# IDE0052: Remove unread private member
dotnet_diagnostic.IDE0052.severity = silent

# Code-block preferences
csharp_prefer_braces = true:suggestion

# Expression-level preferences
csharp_style_unused_value_expression_statement_preference = discard_variable:suggestion

# 'using' directive preferences
csharp_using_directive_placement = outside_namespace:suggestion


#### C# Formatting Rules ####
csharp_prefer_braces = true:silent
# IDE0011: Add braces
dotnet_diagnostic.IDE0011.severity = silent

# Indentation preferences
csharp_indent_case_contents_when_block = false

# Wrapping preferences
csharp_preserve_single_line_statements = false


#### Naming styles ####
# 'var' usage preferences
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: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

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

# Null check preferences
# 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

# Naming rules
dotnet_naming_rule.private_const_fields_should_be_pascal_case.symbols = private_const_fields
dotnet_naming_rule.private_const_fields_should_be_pascal_case.style = pascal_case
dotnet_naming_rule.private_const_fields_should_be_pascal_case.severity = warning
dotnet_naming_rule.const_fields_should_be_pascal_case.symbols = const_fields
dotnet_naming_rule.const_fields_should_be_pascal_case.style = pascal_case
dotnet_naming_rule.const_fields_should_be_pascal_case.severity = warning

dotnet_naming_rule.private_static_readonly_fields_should_be_pascal_case.symbols = private_static_readonly_fields
dotnet_naming_rule.private_static_readonly_fields_should_be_pascal_case.style = pascal_case
dotnet_naming_rule.private_static_readonly_fields_should_be_pascal_case.severity = warning

dotnet_naming_rule.private_static_or_readonly_fields_should_start_with_underscore.symbols = private_static_or_readonly_fields
dotnet_naming_rule.private_static_or_readonly_fields_should_start_with_underscore.style = camel_case_prefix_with_underscore
dotnet_naming_rule.private_static_or_readonly_fields_should_start_with_underscore.severity = warning
dotnet_naming_rule.private_fields_should_start_with_underscore.symbols = private_fields
dotnet_naming_rule.private_fields_should_start_with_underscore.style = camel_case_prefix_with_underscore
dotnet_naming_rule.private_fields_should_start_with_underscore.severity = warning

dotnet_naming_rule.locals_and_parameters_should_be_camel_case.symbols = locals_and_parameters
dotnet_naming_rule.locals_and_parameters_should_be_camel_case.style = camel_case
@@ -96,25 +194,24 @@ dotnet_naming_rule.types_and_members_should_be_pascal_case.style = pascal_case
dotnet_naming_rule.types_and_members_should_be_pascal_case.severity = warning

# Symbol specifications
dotnet_naming_symbols.private_const_fields.applicable_kinds = field
dotnet_naming_symbols.private_const_fields.applicable_accessibilities = private
dotnet_naming_symbols.private_const_fields.required_modifiers = const
dotnet_naming_symbols.const_fields.applicable_kinds = field
dotnet_naming_symbols.const_fields.applicable_accessibilities = *
dotnet_naming_symbols.const_fields.required_modifiers = const

dotnet_naming_symbols.private_static_readonly_fields.applicable_kinds = field
dotnet_naming_symbols.private_static_readonly_fields.applicable_accessibilities = private
dotnet_naming_symbols.private_static_readonly_fields.required_modifiers = static,readonly
dotnet_naming_symbols.private_static_readonly_fields.required_modifiers = static, readonly

dotnet_naming_symbols.private_static_or_readonly_fields.applicable_kinds = field
dotnet_naming_symbols.private_static_or_readonly_fields.applicable_accessibilities = private
dotnet_naming_symbols.private_static_or_readonly_fields.required_modifiers = static readonly
dotnet_naming_symbols.private_fields.applicable_kinds = field
dotnet_naming_symbols.private_fields.applicable_accessibilities = private

dotnet_naming_symbols.locals_and_parameters.applicable_kinds = local,parameter
dotnet_naming_symbols.locals_and_parameters.applicable_kinds = local, parameter
dotnet_naming_symbols.locals_and_parameters.applicable_accessibilities = *

dotnet_naming_symbols.types_and_members.applicable_kinds = *
dotnet_naming_symbols.types_and_members.applicable_accessibilities = *

# Naming styles
# Style specifications
dotnet_naming_style.pascal_case.capitalization = pascal_case

dotnet_naming_style.camel_case_prefix_with_underscore.required_prefix = _
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# When running OpenAPI tests, these committed files are downloaded and written to disk (so we'll know when something changes).
# On Windows, these text files are auto-converted to crlf on git fetch, while the written downloaded files use lf line endings.
# Therefore, running the tests on Windows creates local changes. Staging them auto-converts back to crlf, which undoes the changes.
# To avoid this annoyance, the next line opts out of the auto-conversion and forces line endings to lf.
**/GeneratedSwagger/**/*.json text eol=lf
Loading