From 7d8ff8eec671da2563a01da2b2e26ae0e1d2aa6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Zaj=C4=85c?= Date: Thu, 29 Dec 2022 17:57:30 +0100 Subject: [PATCH] Improvements (#36) Improvements - Refresh NuGet key. - Use Visual Studio 2022 appveyor image. - Improve logic for unit test run in appveyor. - Retarget test projects from netcoreapp3.1 to net7.0. - Drop net46 support as it reached End of Support. - Update from net47 to net472 because of the System.Net.Http conflicts. - Prevent source projects from being discovered as test projects. - Use NetAnalyzers instead of FxCopAnalyzers. - Bump NuGet packages. - Switch from .ruleset to .editorconfig - Introduce Roslynator - Introduce SonarAnalyzer.CSharp - Fix static code analysis issues - Use latest LangVersion --- appveyor.yml | 87 +- src/.editorconfig | 3496 +++++++++++++++++ src/Analysers.Tests.ruleset | 413 -- src/Analysers.ruleset | 413 -- src/GlobalAssemblyInfo.cs | 4 +- .../.editorconfig | 22 + .../Attributes/AutoMockDataAttributeTests.cs | 9 +- .../InlineAutoMockDataAttributeTests.cs | 9 +- .../MemberAutoMockDataAttributeTests.cs | 15 +- ...Fixture.XUnit2.AutoFakeItEasy.Tests.csproj | 73 +- .../Properties/AssemblyInfo.cs | 2 +- .../Attributes/AutoMockDataAttribute.cs | 2 + .../Attributes/InlineAutoMockDataAttribute.cs | 4 +- .../Attributes/MemberAutoMockDataAttribute.cs | 4 +- ...y.AutoFixture.XUnit2.AutoFakeItEasy.csproj | 52 +- .../Properties/AssemblyInfo.cs | 2 +- .../.editorconfig | 22 + .../Attributes/AutoMockDataAttributeTests.cs | 11 +- .../InlineAutoMockDataAttributeTests.cs | 11 +- .../MemberAutoMockDataAttributeTests.cs | 17 +- ...ty.AutoFixture.XUnit2.AutoMoq.Tests.csproj | 74 +- .../Attributes/AutoMockDataAttribute.cs | 4 +- .../Attributes/InlineAutoMockDataAttribute.cs | 4 +- .../Attributes/MemberAutoMockDataAttribute.cs | 4 +- ...ectivity.AutoFixture.XUnit2.AutoMoq.csproj | 52 +- .../.editorconfig | 22 + .../Attributes/AutoMockDataAttributeTests.cs | 11 +- .../InlineAutoMockDataAttributeTests.cs | 11 +- .../MemberAutoMockDataAttributeTests.cs | 17 +- ...ixture.XUnit2.AutoNSubstitute.Tests.csproj | 73 +- .../Properties/AssemblyInfo.cs | 2 +- .../Attributes/AutoMockDataAttribute.cs | 2 + .../Attributes/InlineAutoMockDataAttribute.cs | 4 +- .../Attributes/MemberAutoMockDataAttribute.cs | 4 +- ....AutoFixture.XUnit2.AutoNSubstitute.csproj | 50 +- .../Properties/AssemblyInfo.cs | 2 +- .../.editorconfig | 22 + .../AutoDataAdapterAttributeTests.cs | 7 +- .../Attributes/AutoDataBaseAttributeTests.cs | 6 +- .../Attributes/CustomizeWithAttributeTests.cs | 3 + .../IgnoreVirtualMembersAttributeTests.cs | 2 + .../InlineAutoDataBaseAttributeTests.cs | 6 +- .../MemberAutoDataBaseAttributeTests.cs | 5 +- .../Common/CheckTests.cs | 3 + .../CustomizeAttributeComparerTests.cs | 11 +- .../AutoDataCommonCustomizationTests.cs | 1 + ...DoNotThrowOnRecursionCustomizationTests.cs | 3 +- .../IgnoreVirtualMembersCustomizationTests.cs | 11 +- .../OmitOnRecursionCustomizationTests.cs | 3 +- .../FixtureAssertionExtensions.cs | 5 +- .../MemberAutoDataItemConverterTests.cs | 16 +- ...ivity.AutoFixture.XUnit2.Core.Tests.csproj | 71 +- .../Properties/AssemblyInfo.cs | 2 +- .../AutoDataAttributeProviderTests.cs | 3 + .../InlineAutoDataAttributeProviderTests.cs | 3 + ...gnoreVirtualMembersSpecimenBuilderTests.cs | 15 +- .../Attributes/AutoDataAdapterAttribute.cs | 5 +- .../Attributes/AutoDataBaseAttribute.cs | 4 + .../Attributes/CustomizeWithAttribute.cs | 7 +- .../IgnoreVirtualMembersAttribute.cs | 1 + .../Attributes/InlineAutoDataBaseAttribute.cs | 17 +- .../Attributes/MemberAutoDataBaseAttribute.cs | 5 + .../Common/Check.cs | 7 +- .../Common/ValidatedNotNullAttribute.cs | 2 +- .../Comparers/CustomizeAttributeComparer.cs | 13 +- .../AutoDataCommonCustomization.cs | 3 +- .../DoNotThrowOnRecursionCustomization.cs | 4 +- .../IgnoreVirtualMembersCustomization.cs | 4 +- .../OmitOnRecursionCustomization.cs | 3 +- .../MemberData/IDataItemConverter.cs | 2 +- .../MemberData/MemberAutoDataItemConverter.cs | 6 +- ...Objectivity.AutoFixture.XUnit2.Core.csproj | 44 +- .../Properties/AssemblyInfo.cs | 2 +- .../Providers/AutoDataAttributeProvider.cs | 4 +- .../IAutoFixtureAttributeProvider.cs | 3 +- .../IAutoFixtureInlineAttributeProvider.cs | 3 +- .../InlineAutoDataAttributeProvider.cs | 6 +- .../IgnoreVirtualMembersSpecimenBuilder.cs | 8 +- 78 files changed, 4198 insertions(+), 1157 deletions(-) create mode 100644 src/.editorconfig delete mode 100644 src/Analysers.Tests.ruleset delete mode 100644 src/Analysers.ruleset create mode 100644 src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Tests/.editorconfig create mode 100644 src/Objectivity.AutoFixture.XUnit2.AutoMoq.Tests/.editorconfig create mode 100644 src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Tests/.editorconfig create mode 100644 src/Objectivity.AutoFixture.XUnit2.Core.Tests/.editorconfig diff --git a/appveyor.yml b/appveyor.yml index 5de14a32..67e9b937 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,13 +1,12 @@ version: 3.1.{build} -image: Visual Studio 2019 +image: Visual Studio 2022 skip_commits: files: - '**/*.md' configuration: Release init: -- ps: >- - if ($env:APPVEYOR_REPO_TAG -eq "true") - { +- ps: | + if ($env:APPVEYOR_REPO_TAG -eq "true") { Update-AppveyorBuild -Version "$($env:APPVEYOR_REPO_TAG_NAME.split("-")[0])" } assembly_info: @@ -37,61 +36,55 @@ environment: - package_module: AutoNSubstitute - package_module: AutoFakeItEasy install: -- ps: >- +- ps: | choco install codecov --no-progress - - if ($env:StrongNameKey) - { + if ($env:StrongNameKey) { Set-AppveyorBuildVariable "StrongNameKeyPath" "..\$env:StrongNameKeyName" [IO.File]::WriteAllBytes("$env:APPVEYOR_BUILD_FOLDER\src\$env:StrongNameKeyName",[Convert]::FromBase64String($env:StrongNameKey)) } build_script: -- ps: >- - dotnet build ./src/$env:namespace.$env:package_module.sln - - if ($env:APPVEYOR_REPO_TAG -eq "true") - { - dotnet pack ./src/$env:namespace.$env:package_module --no-restore -p:PackageVersion=$env:APPVEYOR_REPO_TAG_NAME +- ps: | + $packageName = "$($env:namespace).$($env:package_module)" + Write-Host "Building package $($packageName)" -ForegroundColor Cyan + dotnet build ./src/$packageName.sln --nologo + Write-Host "Building package complete" -ForegroundColor Green + $packageVersion = if ($env:APPVEYOR_REPO_TAG -eq "true") {$env:APPVEYOR_REPO_TAG_NAME} else {$env:APPVEYOR_BUILD_VERSION} + Write-Host "Preparing package $($packageName) with $($packageVersion) version" -ForegroundColor Cyan + dotnet pack ./src/$packageName --no-restore --nologo -p:PackageVersion=$packageVersion + Write-Host "Preparing package complete" -ForegroundColor Green +test_script: +- ps: | + $modules = ($env:core_module, $env:package_module) + $frameworks = [ordered]@{ + 'net472' = $false + 'net48' = $false + 'net7.0' = $true } - else - { - dotnet pack ./src/$env:namespace.$env:package_module --no-restore -p:PackageVersion=$env:APPVEYOR_BUILD_VERSION + foreach ($module in $modules) { + $project = "$($env:namespace).$($module).Tests" + cd "$($env:APPVEYOR_BUILD_FOLDER)\src\$($project)" + foreach ($framework in $frameworks.GetEnumerator()) { + Write-Host "Running tests from $($project) against $($framework.Name) framework " -NoNewline -ForegroundColor Cyan + $collectCoverage = $framework.Value + if ($collectCoverage) { + Write-Host "collecting Code Coverage" -ForegroundColor Cyan + $coverletFile="$($env:APPVEYOR_BUILD_FOLDER)\src\$($env:cc)\$($env:namespace).$($module)" + # Use environment variables (-e) instead of build parameters (-p) because of the net7.0 issue: https://github.com/coverlet-coverage/coverlet/issues/1391 + dotnet test -f $framework.Name --no-restore --nologo -e:CollectCoverage=true -e:CoverletOutputFormat=$env:cc -e:Exclude="[xunit*]*" -e:CoverletOutput=$coverletFile.xml + codecov -f "$($coverletFile).$($framework.Name).xml" --flag unittests + } else { + Write-Host "without Code Coverage" -ForegroundColor Cyan + dotnet test -f $framework.Name --no-restore --nologo + } + Write-Host "Running tests from $($project) against $($framework.Name) framework complete" -ForegroundColor Green + } } -test_script: -- ps: >- - cd $env:APPVEYOR_BUILD_FOLDER/src/$env:namespace.$env:core_module.Tests - - dotnet test -f net46 --no-restore - - dotnet test -f net47 --no-restore - - dotnet test -f net48 --no-restore - - dotnet test -f netcoreapp2.1 --no-restore - - dotnet test -f netcoreapp3.1 --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=$env:cc /p:Exclude="[xunit*]*" /p:CoverletOutput=$env:APPVEYOR_BUILD_FOLDER\$env:cc\$env:namespace.$env:core_module.xml - - cd $env:APPVEYOR_BUILD_FOLDER/src/$env:namespace.$env:package_module.Tests - - dotnet test -f net46 --no-restore - - dotnet test -f net47 --no-restore - - dotnet test -f net48 --no-restore - - dotnet test -f netcoreapp2.1 --no-restore - - dotnet test -f netcoreapp3.1 --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=$env:cc /p:Exclude="[xunit*]*" /p:CoverletOutput=$env:APPVEYOR_BUILD_FOLDER\$env:cc\$env:namespace.$env:package_module.xml - - codecov -f $env:APPVEYOR_BUILD_FOLDER\$env:cc\$env:namespace.$env:core_module.netcoreapp3.1.xml --flag unittests - - codecov -f $env:APPVEYOR_BUILD_FOLDER\$env:cc\$env:namespace.$env:package_module.netcoreapp3.1.xml --flag unittests artifacts: - path: '**\*.nupkg' deploy: - provider: NuGet api_key: - secure: BdIlSFzb2tK9ExTFFK9EvN1CIbK3vK/9/ggHZG37CXArUIOjvBs6GYWD8jP7C9Ss + secure: xBvG0ZGp+DwXGNFCXf7IbKIIFYxIlFrF1vg7LdfHBZyaR/C6qd9Ax6sEIKhi6ujy on: appveyor_repo_tag: true skip_symbols: true \ No newline at end of file diff --git a/src/.editorconfig b/src/.editorconfig new file mode 100644 index 00000000..fb8139f9 --- /dev/null +++ b/src/.editorconfig @@ -0,0 +1,3496 @@ +root = true + +# To learn more about .editorconfig see https://aka.ms/editorconfigdocs +############################### +# Core EditorConfig Options # +############################### +# All files +[*] +indent_style = space + +# XML project files +[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}] +indent_size = 2 + +# XML config files +[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}] +indent_size = 2 + +# Code files +[*.{cs,csx,vb,vbx}] +indent_size = 4 +insert_final_newline = true +charset = utf-8-bom +############################### +# .NET Coding Conventions # +############################### +[*.{cs,vb}] +# Organize usings +dotnet_sort_system_directives_first = true +# this. preferences +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 +# Language keywords vs BCL types preferences +dotnet_style_predefined_type_for_locals_parameters_members = true:silent +dotnet_style_predefined_type_for_member_access = true:silent +# Parentheses preferences +dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent +dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent +dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent +dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent +# Modifier preferences +dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent +dotnet_style_readonly_field = true:suggestion +# Expression-level preferences +dotnet_style_object_initializer = true:suggestion +dotnet_style_collection_initializer = true:suggestion +dotnet_style_explicit_tuple_names = true:suggestion +dotnet_style_null_propagation = true:suggestion +dotnet_style_coalesce_expression = true:suggestion +dotnet_style_prefer_is_null_check_over_reference_equality_method = true:silent +dotnet_style_prefer_inferred_tuple_names = true:suggestion +dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion +dotnet_style_prefer_auto_properties = true:silent +dotnet_style_prefer_conditional_expression_over_assignment = true:silent +dotnet_style_prefer_conditional_expression_over_return = true:silent +############################### +# Naming Conventions # +############################### +# Style Definitions +dotnet_naming_style.pascal_case_style.capitalization = pascal_case +# Use PascalCase for constant fields +dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields +dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style +dotnet_naming_symbols.constant_fields.applicable_kinds = field +dotnet_naming_symbols.constant_fields.applicable_accessibilities = * +dotnet_naming_symbols.constant_fields.required_modifiers = const + +dotnet_naming_rule.private_members_with_underscore.symbols = private_fields +dotnet_naming_rule.private_members_with_underscore.style = prefix_underscore +dotnet_naming_rule.private_members_with_underscore.severity = warning +dotnet_naming_symbols.private_fields.applicable_kinds = field +dotnet_naming_symbols.private_fields.applicable_accessibilities = private +dotnet_naming_style.prefix_underscore.capitalization = camel_case +dotnet_naming_style.prefix_underscore.required_prefix = _ +dotnet_style_operator_placement_when_wrapping = beginning_of_line +tab_width = 4 +end_of_line = crlf + +############################### +# C# Coding Conventions # +############################### +[*.cs] + +# var preferences +csharp_style_var_for_built_in_types = true:silent +csharp_style_var_when_type_is_apparent = true:silent +csharp_style_var_elsewhere = true:silent + +# Expression-bodied members +csharp_style_expression_bodied_methods = false:silent +csharp_style_expression_bodied_constructors = false:silent +csharp_style_expression_bodied_operators = false:silent +csharp_style_expression_bodied_properties = true:silent +csharp_style_expression_bodied_indexers = true:silent +csharp_style_expression_bodied_accessors = true:silent + +# Pattern matching preferences +csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion +csharp_style_pattern_matching_over_as_with_null_check = true:suggestion + +# Null-checking preferences +csharp_style_throw_expression = true:suggestion +csharp_style_conditional_delegate_call = true:suggestion + +# Modifier preferences +csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion + +# Expression-level preferences +csharp_prefer_braces = true:silent +csharp_style_deconstructed_variable_declaration = true:suggestion +csharp_prefer_simple_default_expression = true:suggestion +csharp_style_pattern_local_over_anonymous_function = true:suggestion +csharp_style_inlined_variable_declaration = true:suggestion + +############################### +# C# Formatting Rules # +############################### +# New line preferences +csharp_new_line_before_open_brace = all +csharp_new_line_before_else = true +csharp_new_line_before_catch = true +csharp_new_line_before_finally = true +csharp_new_line_before_members_in_object_initializers = false +csharp_new_line_before_members_in_anonymous_types = false +csharp_new_line_between_query_expression_clauses = true + +# Indentation preferences +csharp_indent_case_contents = true +csharp_indent_switch_labels = true +csharp_indent_labels = flush_left + +# Space preferences +csharp_space_after_cast = false +csharp_space_after_keywords_in_control_flow_statements = true +csharp_space_between_method_call_parameter_list_parentheses = false +csharp_space_between_method_declaration_parameter_list_parentheses = false +csharp_space_between_parentheses = false +csharp_space_before_colon_in_inheritance_clause = true +csharp_space_after_colon_in_inheritance_clause = true +csharp_space_around_binary_operators = before_and_after +csharp_space_between_method_declaration_empty_parameter_list_parentheses = false +csharp_space_between_method_call_name_and_opening_parenthesis = false +csharp_space_between_method_call_empty_parameter_list_parentheses = false + +# Wrapping preferences +csharp_preserve_single_line_statements = true +csharp_preserve_single_line_blocks = true + +csharp_using_directive_placement = outside_namespace:silent +csharp_prefer_simple_using_statement = true:suggestion +csharp_style_namespace_declarations = file_scoped:silent +csharp_style_prefer_method_group_conversion = true:silent +csharp_style_expression_bodied_lambdas = true:silent +csharp_style_expression_bodied_local_functions = false:silent + +############################### +# Analyzers Rules # +############################### + +## Roslynator.CSharp.Analyzers + +roslynator_accessibility_modifiers = explicit +roslynator_accessor_braces_style = single_line_when_expression_is_on_single_line +roslynator_array_creation_type_style = implicit +roslynator_arrow_token_new_line = after +roslynator_binary_operator_new_line = before +roslynator_blank_line_between_closing_brace_and_switch_section = true +roslynator_blank_line_between_single_line_accessors = false +roslynator_blank_line_between_using_directives = separate_groups +roslynator_block_braces_style = multi_line +roslynator_body_style = expression +roslynator_conditional_operator_condition_parentheses_style = omit_when_condition_is_single_token +roslynator_conditional_operator_new_line = before +roslynator_configure_await = true +roslynator_doc_comment_summary_style = multi_line +roslynator_empty_string_style = field +roslynator_enum_flag_value_style = decimal_number +roslynator_enum_has_flag_style = method +roslynator_equals_token_new_line = after +roslynator_infinite_loop_style = while +roslynator_max_line_length = 500 +roslynator_new_line_at_end_of_file = true +roslynator_new_line_before_while_in_do_statement = false +roslynator_null_conditional_operator_new_line = after +roslynator_null_check_style = pattern_matching +roslynator_object_creation_parentheses_style = include +roslynator_object_creation_type_style = implicit_when_type_is_obvious +roslynator_prefix_field_identifier_with_underscore = false +roslynator_suppress_unity_script_methods = true +roslynator_use_anonymous_function_or_method_group = method_group +roslynator_use_block_body_when_declaration_spans_over_multiple_lines = true +roslynator_use_block_body_when_expression_spans_over_multiple_lines = true +roslynator_use_var_instead_of_implicit_object_creation = true + +roslynator_refactoring.add_all_properties_to_initializer.enabled = true +roslynator_refactoring.add_argument_name.enabled = true +roslynator_refactoring.add_braces.enabled = true +roslynator_refactoring.add_braces_to_if_else.enabled = true +roslynator_refactoring.add_braces_to_switch_section.enabled = true +roslynator_refactoring.add_braces_to_switch_sections.enabled = true +roslynator_refactoring.add_default_value_to_parameter.enabled = true +roslynator_refactoring.add_empty_line_between_declarations.enabled = true +roslynator_refactoring.add_exception_element_to_documentation_comment.enabled = true +roslynator_refactoring.add_generic_parameter_to_declaration.enabled = true +roslynator_refactoring.add_member_to_interface.enabled = true +roslynator_refactoring.add_missing_cases_to_switch.enabled = true +roslynator_refactoring.add_parameter_to_interface_member.enabled = true +roslynator_refactoring.add_tag_to_documentation_comment.enabled = true +roslynator_refactoring.add_using_directive.enabled = true +roslynator_refactoring.add_using_static_directive.enabled = true +roslynator_refactoring.call_extension_method_as_instance_method.enabled = true +roslynator_refactoring.call_indexof_instead_of_contains.enabled = true +roslynator_refactoring.comment_out_member_declaration.enabled = true +roslynator_refactoring.comment_out_statement.enabled = true +roslynator_refactoring.convert_auto_property_to_full_property.enabled = true +roslynator_refactoring.convert_auto_property_to_full_property_without_backing_field.enabled = true +roslynator_refactoring.convert_block_body_to_expression_body.enabled = true +roslynator_refactoring.convert_comment_to_documentation_comment.enabled = true +roslynator_refactoring.convert_conditional_expression_to_if_else.enabled = true +roslynator_refactoring.convert_do_to_while.enabled = true +roslynator_refactoring.convert_expression_body_to_block_body.enabled = true +roslynator_refactoring.convert_for_to_foreach.enabled = true +roslynator_refactoring.convert_for_to_while.enabled = true +roslynator_refactoring.convert_foreach_to_for.enabled = true +roslynator_refactoring.convert_foreach_to_for_and_reverse_loop.enabled = true +roslynator_refactoring.convert_hasflag_call_to_bitwise_operation.enabled = true +roslynator_refactoring.convert_hexadecimal_literal_to_decimal_literal.enabled = true +roslynator_refactoring.convert_if_to_conditional_expression.enabled = true +roslynator_refactoring.convert_if_to_switch.enabled = true +roslynator_refactoring.convert_interpolated_string_to_concatenation.enabled = true +roslynator_refactoring.convert_interpolated_string_to_string_format.enabled = true +roslynator_refactoring.convert_interpolated_string_to_string_literal.enabled = true +roslynator_refactoring.convert_lambda_block_body_to_expression_body.enabled = true +roslynator_refactoring.convert_lambda_expression_body_to_block_body.enabled = true +roslynator_refactoring.convert_method_group_to_lambda.enabled = true +roslynator_refactoring.convert_regular_string_literal_to_verbatim_string_literal.enabled = true +roslynator_refactoring.convert_return_statement_to_if.enabled = true +roslynator_refactoring.convert_statements_to_if_else.enabled = true +roslynator_refactoring.convert_string_format_to_interpolated_string.enabled = true +roslynator_refactoring.convert_switch_expression_to_switch_statement.enabled = true +roslynator_refactoring.convert_switch_to_if.enabled = true +roslynator_refactoring.convert_verbatim_string_literal_to_regular_string_literal.enabled = true +roslynator_refactoring.convert_verbatim_string_literal_to_regular_string_literals.enabled = true +roslynator_refactoring.convert_while_to_do.enabled = true +roslynator_refactoring.convert_while_to_for.enabled = true +roslynator_refactoring.copy_argument.enabled = true +roslynator_refactoring.copy_documentation_comment_from_base_member.enabled = true +roslynator_refactoring.copy_member_declaration.enabled = true +roslynator_refactoring.copy_parameter.enabled = true +roslynator_refactoring.copy_statement.enabled = true +roslynator_refactoring.copy_switch_section.enabled = true +roslynator_refactoring.deconstruct_foreach_variable.enabled = true +roslynator_refactoring.expand_coalesce_expression.enabled = true +roslynator_refactoring.expand_compound_assignment.enabled = true +roslynator_refactoring.expand_event_declaration.enabled = true +roslynator_refactoring.expand_initializer.enabled = true +roslynator_refactoring.expand_positional_constructor.enabled = true +roslynator_refactoring.extract_event_handler_method.enabled = true +roslynator_refactoring.extract_expression_from_condition.enabled = true +roslynator_refactoring.extract_type_declaration_to_new_file.enabled = true +roslynator_refactoring.generate_base_constructors.enabled = true +roslynator_refactoring.generate_combined_enum_member.enabled = true +roslynator_refactoring.generate_enum_member.enabled = true +roslynator_refactoring.generate_enum_values.enabled = true +roslynator_refactoring.generate_event_invoking_method.enabled = true +roslynator_refactoring.generate_property_for_debuggerdisplay_attribute.enabled = true +roslynator_refactoring.change_accessibility.enabled = true +roslynator_refactoring.change_method_return_type_to_void.enabled = true +roslynator_refactoring.change_type_according_to_expression.enabled = true +roslynator_refactoring.check_expression_for_null.enabled = true +roslynator_refactoring.check_parameter_for_null.enabled = true +roslynator_refactoring.implement_custom_enumerator.enabled = true +roslynator_refactoring.implement_iequatable.enabled = true +roslynator_refactoring.initialize_field_from_constructor.enabled = true +roslynator_refactoring.initialize_local_variable_with_default_value.enabled = true +roslynator_refactoring.inline_alias_expression.enabled = true +roslynator_refactoring.inline_constant.enabled = true +roslynator_refactoring.inline_constant_value.enabled = true +roslynator_refactoring.inline_method.enabled = true +roslynator_refactoring.inline_property.enabled = true +roslynator_refactoring.inline_using_static.enabled = true +roslynator_refactoring.insert_string_interpolation.enabled = true +roslynator_refactoring.introduce_and_initialize_field.enabled = true +roslynator_refactoring.introduce_and_initialize_property.enabled = true +roslynator_refactoring.introduce_constructor.enabled = true +roslynator_refactoring.introduce_field_to_lock_on.enabled = true +roslynator_refactoring.introduce_local_variable.enabled = true +roslynator_refactoring.invert_binary_expression.enabled = true +roslynator_refactoring.invert_boolean_literal.enabled = true +roslynator_refactoring.invert_conditional_expression.enabled = true +roslynator_refactoring.invert_if.enabled = true +roslynator_refactoring.invert_if_else.enabled = true +roslynator_refactoring.invert_is_expression.enabled = true +roslynator_refactoring.invert_linq_method_call.enabled = true +roslynator_refactoring.invert_operator.enabled = true +roslynator_refactoring.invert_prefix_or_postfix_unary_expression.enabled = true +roslynator_refactoring.join_string_expressions.enabled = true +roslynator_refactoring.make_member_abstract.enabled = true +roslynator_refactoring.make_member_virtual.enabled = true +roslynator_refactoring.merge_attributes.enabled = true +roslynator_refactoring.merge_if_statements.enabled = true +roslynator_refactoring.merge_if_with_parent_if.enabled = true +roslynator_refactoring.merge_local_declarations.enabled = true +roslynator_refactoring.merge_switch_sections.enabled = true +roslynator_refactoring.move_unsafe_context_to_containing_declaration.enabled = true +roslynator_refactoring.notify_when_property_changes.enabled = true +roslynator_refactoring.parenthesize_expression.enabled = true +roslynator_refactoring.promote_local_variable_to_parameter.enabled = true +roslynator_refactoring.remove_all_comments.enabled = true +roslynator_refactoring.remove_all_comments_except_documentation_comments.enabled = true +roslynator_refactoring.remove_all_documentation_comments.enabled = true +roslynator_refactoring.remove_all_member_declarations.enabled = true +roslynator_refactoring.remove_all_preprocessor_directives.enabled = true +roslynator_refactoring.remove_all_region_directives.enabled = true +roslynator_refactoring.remove_all_statements.enabled = true +roslynator_refactoring.remove_all_switch_sections.enabled = true +roslynator_refactoring.remove_argument_name.enabled = true +roslynator_refactoring.remove_async_await.enabled = true +roslynator_refactoring.remove_braces.enabled = true +roslynator_refactoring.remove_braces_from_if_else.enabled = true +roslynator_refactoring.remove_braces_from_switch_section.enabled = true +roslynator_refactoring.remove_braces_from_switch_sections.enabled = true +roslynator_refactoring.remove_comment.enabled = true +roslynator_refactoring.remove_condition_from_last_else.enabled = true +roslynator_refactoring.remove_containing_statement.enabled = true +roslynator_refactoring.remove_empty_lines.enabled = true +roslynator_refactoring.remove_enum_member_value.enabled = true +roslynator_refactoring.remove_instantiation_of_local_variable.enabled = true +roslynator_refactoring.remove_interpolation.enabled = true +roslynator_refactoring.remove_member_declaration.enabled = true +roslynator_refactoring.remove_member_declarations_above_or_below.enabled = true +roslynator_refactoring.remove_parentheses.enabled = true +roslynator_refactoring.remove_preprocessor_directive.enabled = true +roslynator_refactoring.remove_property_initializer.enabled = true +roslynator_refactoring.remove_region.enabled = true +roslynator_refactoring.remove_statement.enabled = true +roslynator_refactoring.remove_unnecessary_assignment.enabled = true +roslynator_refactoring.rename_identifier_according_to_type_name.enabled = true +roslynator_refactoring.rename_method_according_to_type_name.enabled = true +roslynator_refactoring.rename_parameter_according_to_type_name.enabled = true +roslynator_refactoring.rename_property_according_to_type_name.enabled = true +roslynator_refactoring.replace_as_expression_with_explicit_cast.enabled = true +roslynator_refactoring.replace_conditional_expression_with_true_or_false_branch.enabled = true +roslynator_refactoring.replace_equality_operator_with_string_equals.enabled = true +roslynator_refactoring.replace_equality_operator_with_string_isnullorempty.enabled = true +roslynator_refactoring.replace_equality_operator_with_string_isnullorwhitespace.enabled = true +roslynator_refactoring.replace_explicit_cast_with_as_expression.enabled = true +roslynator_refactoring.replace_interpolated_string_with_interpolation_expression.enabled = true +roslynator_refactoring.replace_method_with_property.enabled = true +roslynator_refactoring.replace_null_literal_with_default_expression.enabled = true +roslynator_refactoring.replace_prefix_operator_with_postfix_operator.enabled = true +roslynator_refactoring.replace_property_with_method.enabled = true +roslynator_refactoring.reverse_for_statement.enabled = true +roslynator_refactoring.simplify_if.enabled = true +roslynator_refactoring.sort_case_labels.enabled = true +roslynator_refactoring.sort_member_declarations.enabled = true +roslynator_refactoring.split_attributes.enabled = true +roslynator_refactoring.split_if.enabled = true +roslynator_refactoring.split_if_else.enabled = true +roslynator_refactoring.split_local_declaration_and_assignment.enabled = true +roslynator_refactoring.split_switch_labels.enabled = true +roslynator_refactoring.split_variable_declaration.enabled = true +roslynator_refactoring.swap_binary_operands.enabled = true +roslynator_refactoring.swap_member_declarations.enabled = true +roslynator_refactoring.sync_property_name_and_backing_field_name.enabled = true +roslynator_refactoring.uncomment_multiline_comment.enabled = true +roslynator_refactoring.uncomment_singleline_comment.enabled = true +roslynator_refactoring.use_coalesce_expression_instead_of_if.enabled = true +roslynator_refactoring.use_constant_instead_of_readonly_field.enabled = true +roslynator_refactoring.use_element_access_instead_of_linq_method.enabled = true +roslynator_refactoring.use_enumerator_explicitly.enabled = true +roslynator_refactoring.use_explicit_type.enabled = true +roslynator_refactoring.use_implicit_type.enabled = true +roslynator_refactoring.use_index_initializer.enabled = true +roslynator_refactoring.use_lambda_instead_of_anonymous_method.enabled = true +roslynator_refactoring.use_list_instead_of_yield.enabled = true +roslynator_refactoring.use_object_initializer.enabled = true +roslynator_refactoring.use_readonly_field_instead_of_constant.enabled = true +roslynator_refactoring.use_string_empty_instead_of_empty_string_literal.enabled = true +roslynator_refactoring.use_stringbuilder_instead_of_concatenation.enabled = true +roslynator_refactoring.wrap_arguments.enabled = true +roslynator_refactoring.wrap_binary_expression.enabled = true +roslynator_refactoring.wrap_call_chain.enabled = true +roslynator_refactoring.wrap_conditional_expression.enabled = true +roslynator_refactoring.wrap_constraint_clauses.enabled = true +roslynator_refactoring.wrap_initializer_expressions.enabled = true +roslynator_refactoring.wrap_lines_in_preprocessor_directive.enabled = true +roslynator_refactoring.wrap_lines_in_region.enabled = true +roslynator_refactoring.wrap_lines_in_try_catch.enabled = true +roslynator_refactoring.wrap_parameters.enabled = true +roslynator_refactoring.wrap_statements_in_condition.enabled = true +roslynator_refactoring.wrap_statements_in_using_statement.enabled = true + +roslynator_compiler_diagnostic_fix.cs0019.enabled = true +roslynator_compiler_diagnostic_fix.cs0021.enabled = true +roslynator_compiler_diagnostic_fix.cs0023.enabled = true +roslynator_compiler_diagnostic_fix.cs0029.enabled = true +roslynator_compiler_diagnostic_fix.cs0030.enabled = true +roslynator_compiler_diagnostic_fix.cs0037.enabled = true +roslynator_compiler_diagnostic_fix.cs0069.enabled = true +roslynator_compiler_diagnostic_fix.cs0077.enabled = true +roslynator_compiler_diagnostic_fix.cs0080.enabled = true +roslynator_compiler_diagnostic_fix.cs0101.enabled = true +roslynator_compiler_diagnostic_fix.cs0102.enabled = true +roslynator_compiler_diagnostic_fix.cs0103.enabled = true +roslynator_compiler_diagnostic_fix.cs0106.enabled = true +roslynator_compiler_diagnostic_fix.cs0107.enabled = true +roslynator_compiler_diagnostic_fix.cs0108.enabled = true +roslynator_compiler_diagnostic_fix.cs0109.enabled = true +roslynator_compiler_diagnostic_fix.cs0112.enabled = true +roslynator_compiler_diagnostic_fix.cs0114.enabled = true +roslynator_compiler_diagnostic_fix.cs0115.enabled = true +roslynator_compiler_diagnostic_fix.cs0119.enabled = true +roslynator_compiler_diagnostic_fix.cs0120.enabled = true +roslynator_compiler_diagnostic_fix.cs0123.enabled = true +roslynator_compiler_diagnostic_fix.cs0126.enabled = true +roslynator_compiler_diagnostic_fix.cs0127.enabled = true +roslynator_compiler_diagnostic_fix.cs0128.enabled = true +roslynator_compiler_diagnostic_fix.cs0131.enabled = true +roslynator_compiler_diagnostic_fix.cs0132.enabled = true +roslynator_compiler_diagnostic_fix.cs0133.enabled = true +roslynator_compiler_diagnostic_fix.cs0136.enabled = true +roslynator_compiler_diagnostic_fix.cs0139.enabled = true +roslynator_compiler_diagnostic_fix.cs0152.enabled = true +roslynator_compiler_diagnostic_fix.cs0161.enabled = true +roslynator_compiler_diagnostic_fix.cs0162.enabled = true +roslynator_compiler_diagnostic_fix.cs0163.enabled = true +roslynator_compiler_diagnostic_fix.cs0164.enabled = true +roslynator_compiler_diagnostic_fix.cs0165.enabled = true +roslynator_compiler_diagnostic_fix.cs0168.enabled = true +roslynator_compiler_diagnostic_fix.cs0173.enabled = true +roslynator_compiler_diagnostic_fix.cs0177.enabled = true +roslynator_compiler_diagnostic_fix.cs0191.enabled = true +roslynator_compiler_diagnostic_fix.cs0192.enabled = true +roslynator_compiler_diagnostic_fix.cs0201.enabled = true +roslynator_compiler_diagnostic_fix.cs0214.enabled = true +roslynator_compiler_diagnostic_fix.cs0216.enabled = true +roslynator_compiler_diagnostic_fix.cs0219.enabled = true +roslynator_compiler_diagnostic_fix.cs0221.enabled = true +roslynator_compiler_diagnostic_fix.cs0225.enabled = true +roslynator_compiler_diagnostic_fix.cs0238.enabled = true +roslynator_compiler_diagnostic_fix.cs0246.enabled = true +roslynator_compiler_diagnostic_fix.cs0260.enabled = true +roslynator_compiler_diagnostic_fix.cs0262.enabled = true +roslynator_compiler_diagnostic_fix.cs0266.enabled = true +roslynator_compiler_diagnostic_fix.cs0267.enabled = true +roslynator_compiler_diagnostic_fix.cs0272.enabled = true +roslynator_compiler_diagnostic_fix.cs0275.enabled = true +roslynator_compiler_diagnostic_fix.cs0305.enabled = true +roslynator_compiler_diagnostic_fix.cs0401.enabled = true +roslynator_compiler_diagnostic_fix.cs0403.enabled = true +roslynator_compiler_diagnostic_fix.cs0405.enabled = true +roslynator_compiler_diagnostic_fix.cs0407.enabled = true +roslynator_compiler_diagnostic_fix.cs0409.enabled = true +roslynator_compiler_diagnostic_fix.cs0428.enabled = true +roslynator_compiler_diagnostic_fix.cs0441.enabled = true +roslynator_compiler_diagnostic_fix.cs0442.enabled = true +roslynator_compiler_diagnostic_fix.cs0449.enabled = true +roslynator_compiler_diagnostic_fix.cs0450.enabled = true +roslynator_compiler_diagnostic_fix.cs0451.enabled = true +roslynator_compiler_diagnostic_fix.cs0472.enabled = true +roslynator_compiler_diagnostic_fix.cs0500.enabled = true +roslynator_compiler_diagnostic_fix.cs0501.enabled = true +roslynator_compiler_diagnostic_fix.cs0507.enabled = true +roslynator_compiler_diagnostic_fix.cs0508.enabled = true +roslynator_compiler_diagnostic_fix.cs0513.enabled = true +roslynator_compiler_diagnostic_fix.cs0515.enabled = true +roslynator_compiler_diagnostic_fix.cs0524.enabled = true +roslynator_compiler_diagnostic_fix.cs0525.enabled = true +roslynator_compiler_diagnostic_fix.cs0527.enabled = true +roslynator_compiler_diagnostic_fix.cs0531.enabled = true +roslynator_compiler_diagnostic_fix.cs0539.enabled = true +roslynator_compiler_diagnostic_fix.cs0541.enabled = true +roslynator_compiler_diagnostic_fix.cs0549.enabled = true +roslynator_compiler_diagnostic_fix.cs0558.enabled = true +roslynator_compiler_diagnostic_fix.cs0567.enabled = true +roslynator_compiler_diagnostic_fix.cs0568.enabled = true +roslynator_compiler_diagnostic_fix.cs0573.enabled = true +roslynator_compiler_diagnostic_fix.cs0574.enabled = true +roslynator_compiler_diagnostic_fix.cs0575.enabled = true +roslynator_compiler_diagnostic_fix.cs0579.enabled = true +roslynator_compiler_diagnostic_fix.cs0592.enabled = true +roslynator_compiler_diagnostic_fix.cs0621.enabled = true +roslynator_compiler_diagnostic_fix.cs0628.enabled = true +roslynator_compiler_diagnostic_fix.cs0659.enabled = true +roslynator_compiler_diagnostic_fix.cs0660.enabled = true +roslynator_compiler_diagnostic_fix.cs0661.enabled = true +roslynator_compiler_diagnostic_fix.cs0678.enabled = true +roslynator_compiler_diagnostic_fix.cs0693.enabled = true +roslynator_compiler_diagnostic_fix.cs0708.enabled = true +roslynator_compiler_diagnostic_fix.cs0710.enabled = true +roslynator_compiler_diagnostic_fix.cs0713.enabled = true +roslynator_compiler_diagnostic_fix.cs0714.enabled = true +roslynator_compiler_diagnostic_fix.cs0718.enabled = true +roslynator_compiler_diagnostic_fix.cs0750.enabled = true +roslynator_compiler_diagnostic_fix.cs0751.enabled = true +roslynator_compiler_diagnostic_fix.cs0753.enabled = true +roslynator_compiler_diagnostic_fix.cs0756.enabled = true +roslynator_compiler_diagnostic_fix.cs0759.enabled = true +roslynator_compiler_diagnostic_fix.cs0766.enabled = true +roslynator_compiler_diagnostic_fix.cs0815.enabled = true +roslynator_compiler_diagnostic_fix.cs0819.enabled = true +roslynator_compiler_diagnostic_fix.cs0822.enabled = true +roslynator_compiler_diagnostic_fix.cs1002.enabled = true +roslynator_compiler_diagnostic_fix.cs1003.enabled = true +roslynator_compiler_diagnostic_fix.cs1004.enabled = true +roslynator_compiler_diagnostic_fix.cs1012.enabled = true +roslynator_compiler_diagnostic_fix.cs1023.enabled = true +roslynator_compiler_diagnostic_fix.cs1031.enabled = true +roslynator_compiler_diagnostic_fix.cs1057.enabled = true +roslynator_compiler_diagnostic_fix.cs1061.enabled = true +roslynator_compiler_diagnostic_fix.cs1100.enabled = true +roslynator_compiler_diagnostic_fix.cs1105.enabled = true +roslynator_compiler_diagnostic_fix.cs1106.enabled = true +roslynator_compiler_diagnostic_fix.cs1503.enabled = true +roslynator_compiler_diagnostic_fix.cs1522.enabled = true +roslynator_compiler_diagnostic_fix.cs1526.enabled = true +roslynator_compiler_diagnostic_fix.cs1527.enabled = true +roslynator_compiler_diagnostic_fix.cs1591.enabled = true +roslynator_compiler_diagnostic_fix.cs1597.enabled = true +roslynator_compiler_diagnostic_fix.cs1609.enabled = true +roslynator_compiler_diagnostic_fix.cs1615.enabled = true +roslynator_compiler_diagnostic_fix.cs1620.enabled = true +roslynator_compiler_diagnostic_fix.cs1621.enabled = true +roslynator_compiler_diagnostic_fix.cs1622.enabled = true +roslynator_compiler_diagnostic_fix.cs1623.enabled = true +roslynator_compiler_diagnostic_fix.cs1624.enabled = true +roslynator_compiler_diagnostic_fix.cs1643.enabled = true +roslynator_compiler_diagnostic_fix.cs1674.enabled = true +roslynator_compiler_diagnostic_fix.cs1689.enabled = true +roslynator_compiler_diagnostic_fix.cs1715.enabled = true +roslynator_compiler_diagnostic_fix.cs1717.enabled = true +roslynator_compiler_diagnostic_fix.cs1722.enabled = true +roslynator_compiler_diagnostic_fix.cs1737.enabled = true +roslynator_compiler_diagnostic_fix.cs1741.enabled = true +roslynator_compiler_diagnostic_fix.cs1743.enabled = true +roslynator_compiler_diagnostic_fix.cs1750.enabled = true +roslynator_compiler_diagnostic_fix.cs1751.enabled = true +roslynator_compiler_diagnostic_fix.cs1955.enabled = true +roslynator_compiler_diagnostic_fix.cs1983.enabled = true +roslynator_compiler_diagnostic_fix.cs1988.enabled = true +roslynator_compiler_diagnostic_fix.cs1994.enabled = true +roslynator_compiler_diagnostic_fix.cs1997.enabled = true +roslynator_compiler_diagnostic_fix.cs3000.enabled = true +roslynator_compiler_diagnostic_fix.cs3001.enabled = true +roslynator_compiler_diagnostic_fix.cs3002.enabled = true +roslynator_compiler_diagnostic_fix.cs3003.enabled = true +roslynator_compiler_diagnostic_fix.cs3005.enabled = true +roslynator_compiler_diagnostic_fix.cs3006.enabled = true +roslynator_compiler_diagnostic_fix.cs3007.enabled = true +roslynator_compiler_diagnostic_fix.cs3008.enabled = true +roslynator_compiler_diagnostic_fix.cs3009.enabled = true +roslynator_compiler_diagnostic_fix.cs3016.enabled = true +roslynator_compiler_diagnostic_fix.cs3024.enabled = true +roslynator_compiler_diagnostic_fix.cs3027.enabled = true +roslynator_compiler_diagnostic_fix.cs7036.enabled = true +roslynator_compiler_diagnostic_fix.cs8050.enabled = true +roslynator_compiler_diagnostic_fix.cs8070.enabled = true +roslynator_compiler_diagnostic_fix.cs8112.enabled = true +roslynator_compiler_diagnostic_fix.cs8139.enabled = true +roslynator_compiler_diagnostic_fix.cs8340.enabled = true +roslynator_compiler_diagnostic_fix.cs8403.enabled = true +roslynator_compiler_diagnostic_fix.cs8602.enabled = true +roslynator_compiler_diagnostic_fix.cs8604.enabled = true +roslynator_compiler_diagnostic_fix.cs8618.enabled = true +roslynator_compiler_diagnostic_fix.cs8625.enabled = true +roslynator_compiler_diagnostic_fix.cs8632.enabled = true + +# RCS0001: Add empty line after embedded statement. +dotnet_diagnostic.RCS0001.severity = warning + +# RCS0002: Add empty line after #region. +dotnet_diagnostic.RCS0002.severity = warning + +# RCS0003: Add empty line after using directive list. +dotnet_diagnostic.RCS0003.severity = warning + +# RCS0004: Add empty line before closing brace of 'do' statement. +dotnet_diagnostic.RCS0004.severity = none + +# RCS0005: Add empty line before #endregion. +dotnet_diagnostic.RCS0005.severity = warning + +# RCS0006: Add empty line before using directive list. +dotnet_diagnostic.RCS0006.severity = warning + +# RCS0007: Add empty line between accessors. +dotnet_diagnostic.RCS0007.severity = warning + +# RCS0008: Add empty line between block and statement. +dotnet_diagnostic.RCS0008.severity = warning + +# RCS0009: Add empty line between declaration and documentation comment. +dotnet_diagnostic.RCS0009.severity = warning + +# RCS0010: Add empty line between declarations. +dotnet_diagnostic.RCS0010.severity = warning + +# RCS0011: Add empty line between single-line accessors (or vice versa). +dotnet_diagnostic.RCS0011.severity = warning + +# RCS0012: Add empty line between single-line declarations. +dotnet_diagnostic.RCS0012.severity = none + +# RCS0013: Add empty line between single-line declarations of different kind. +dotnet_diagnostic.RCS0013.severity = warning + +# RCS0014: Add empty line between switch sections. +dotnet_diagnostic.RCS0014.severity = warning + +# RCS0015: Add empty line between using directives with different root namespace (or vice versa). +dotnet_diagnostic.RCS0015.severity = warning + +# RCS0016: Add newline after attribute list. +dotnet_diagnostic.RCS0016.severity = warning + +# RCS0020: Add newline after opening brace of accessor. +dotnet_diagnostic.RCS0020.severity = warning + +# RCS0021: Add newline after opening brace of block. +dotnet_diagnostic.RCS0021.severity = warning + +# RCS0022: Add newline after opening brace of empty block. +dotnet_diagnostic.RCS0022.severity = warning + +# RCS0023: Add newline after opening brace of type declaration. +dotnet_diagnostic.RCS0023.severity = warning + +# RCS0024: Add newline after switch label. +dotnet_diagnostic.RCS0024.severity = warning + +# RCS0025: Add newline before accessor of full property. +dotnet_diagnostic.RCS0025.severity = warning + +# RCS0027: Add newline before binary operator instead of after it (or vice versa). +dotnet_diagnostic.RCS0027.severity = warning + +# RCS0028: Add newline before conditional operator instead of after it (or vice versa). +dotnet_diagnostic.RCS0028.severity = warning + +# RCS0029: Add newline before constructor initializer. +dotnet_diagnostic.RCS0029.severity = none + +# RCS0030: Add newline before embedded statement. +dotnet_diagnostic.RCS0030.severity = warning + +# RCS0031: Add newline before enum member. +dotnet_diagnostic.RCS0031.severity = warning + +# RCS0032: Add newline before expression-body arrow instead of after it (or vice versa). +dotnet_diagnostic.RCS0032.severity = warning + +# RCS0033: Add newline before statement. +dotnet_diagnostic.RCS0033.severity = warning + +# RCS0034: Add newline before type parameter constraint. +dotnet_diagnostic.RCS0034.severity = warning + +# RCS0036: Remove empty line between single-line declarations of same kind. +dotnet_diagnostic.RCS0036.severity = none + +# RCS0038: Remove empty line between using directives with same root namespace. +dotnet_diagnostic.RCS0038.severity = warning + +# RCS0039: Remove newline before base list. +dotnet_diagnostic.RCS0039.severity = warning + +# RCS0041: Remove newline between 'if' keyword and 'else' keyword. +dotnet_diagnostic.RCS0041.severity = warning + +# RCS0042: Remove newlines from accessor list of auto-property. +dotnet_diagnostic.RCS0042.severity = warning + +# RCS0043: Remove newlines from accessor with single-line expression. +dotnet_diagnostic.RCS0043.severity = none + +# RCS0044: Use carriage return + linefeed as newline. +dotnet_diagnostic.RCS0044.severity = none + +# RCS0045: Use linefeed as newline. +dotnet_diagnostic.RCS0045.severity = none + +# RCS0046: Use spaces instead of tab. +dotnet_diagnostic.RCS0046.severity = none + +# RCS0047: [deprecated] Wrap and indent each node in list +dotnet_diagnostic.RCS0047.severity = none + +# RCS0048: Remove newlines from initializer with single-line expression. +dotnet_diagnostic.RCS0048.severity = none + +# RCS0049: Add empty line after top comment. +dotnet_diagnostic.RCS0049.severity = warning + +# RCS0050: Add empty line before top declaration. +dotnet_diagnostic.RCS0050.severity = warning + +# RCS0051: Add newline between closing brace and 'while' keyword (or vice versa). +dotnet_diagnostic.RCS0051.severity = warning + +# RCS0052: Add newline before equals sign instead of after it (or vice versa). +dotnet_diagnostic.RCS0052.severity = warning + +# RCS0053: Fix formatting of a list. +dotnet_diagnostic.RCS0053.severity = warning + +# RCS0054: Fix formatting of a call chain. +dotnet_diagnostic.RCS0054.severity = none + +# RCS0055: Fix formatting of a binary expression chain. +dotnet_diagnostic.RCS0055.severity = warning + +# RCS0056: A line is too long. +dotnet_diagnostic.RCS0056.severity = suggestion + +# RCS0057: Normalize whitespace at the beginning of a file. +dotnet_diagnostic.RCS0057.severity = warning + +# RCS0058: Normalize whitespace at the end of a file. +dotnet_diagnostic.RCS0058.severity = warning + +# RCS0059: Place new line after/before null-conditional operator. +dotnet_diagnostic.RCS0059.severity = warning + +# RCS1001: Add braces (when expression spans over multiple lines). +dotnet_diagnostic.RCS1001.severity = warning + +# RCS1002: Remove braces. +dotnet_diagnostic.RCS1002.severity = none + +# RCS1002FadeOut: Remove braces. (NotConfigurable) +#dotnet_diagnostic.RCS1002FadeOut.severity = silent + +# RCS1003: Add braces to if-else (when expression spans over multiple lines). +dotnet_diagnostic.RCS1003.severity = warning + +# RCS1004: Remove braces from if-else. +dotnet_diagnostic.RCS1004.severity = none + +# RCS1004FadeOut: Remove braces from if-else. (NotConfigurable) +#dotnet_diagnostic.RCS1004FadeOut.severity = silent + +# RCS1005: Simplify nested using statement. +dotnet_diagnostic.RCS1005.severity = warning + +# RCS1005FadeOut: Simplify nested using statement. (NotConfigurable) +#dotnet_diagnostic.RCS1005FadeOut.severity = silent + +# RCS1006: Merge 'else' with nested 'if'. +dotnet_diagnostic.RCS1006.severity = warning + +# RCS1006FadeOut: Merge 'else' with nested 'if'. (NotConfigurable) +#dotnet_diagnostic.RCS1006FadeOut.severity = silent + +# RCS1007: Add braces. +dotnet_diagnostic.RCS1007.severity = warning + +# RCS1008: Use explicit type instead of 'var' (when the type is not obvious). +dotnet_diagnostic.RCS1008.severity = none + +# RCS1009: Use explicit type instead of 'var' (foreach variable). +dotnet_diagnostic.RCS1009.severity = none + +# RCS1010: Use 'var' instead of explicit type (when the type is obvious). +dotnet_diagnostic.RCS1010.severity = warning + +# RCS1012: Use explicit type instead of 'var' (when the type is obvious). +dotnet_diagnostic.RCS1012.severity = none + +# RCS1013: Use predefined type. +dotnet_diagnostic.RCS1013.severity = warning + +# RCS1014: Use explicitly typed array (or vice versa). +dotnet_diagnostic.RCS1014.severity = none + +# RCS1015: Use nameof operator. +dotnet_diagnostic.RCS1015.severity = warning + +# RCS1015FadeOut: Use nameof operator. (NotConfigurable) +#dotnet_diagnostic.RCS1015FadeOut.severity = silent + +# RCS1016: Use expression-bodied member. +dotnet_diagnostic.RCS1016.severity = none + +# RCS1016FadeOut: Convert block body to expression-body (or vice versa). (NotConfigurable) +#dotnet_diagnostic.RCS1016FadeOut.severity = silent + +# RCS1018: Add accessibility modifiers. +dotnet_diagnostic.RCS1018.severity = warning + +# RCS1019: Order modifiers. Set to none because it conflicts with IDE0036: Order modifiers when it comes to public new +dotnet_diagnostic.RCS1019.severity = none + +# RCS1020: Simplify Nullable to T?. +dotnet_diagnostic.RCS1020.severity = warning + +# RCS1021: Convert lambda expression body to expression-body. +dotnet_diagnostic.RCS1021.severity = warning + +# RCS1021FadeOut: Convert lambda expression body to expression-body. (NotConfigurable) +#dotnet_diagnostic.RCS1021FadeOut.severity = silent + +# RCS1031: Remove unnecessary braces. +dotnet_diagnostic.RCS1031.severity = none + +# RCS1031FadeOut: Remove unnecessary braces. (NotConfigurable) +#dotnet_diagnostic.RCS1031FadeOut.severity = silent + +# RCS1032: Remove redundant parentheses. +dotnet_diagnostic.RCS1032.severity = warning + +# RCS1032FadeOut: Remove redundant parentheses. (NotConfigurable) +#dotnet_diagnostic.RCS1032FadeOut.severity = silent + +# RCS1033: Remove redundant boolean literal. +dotnet_diagnostic.RCS1033.severity = warning + +# RCS1034: Remove redundant 'sealed' modifier. +dotnet_diagnostic.RCS1034.severity = warning + +# RCS1035: Remove redundant comma in initializer. +dotnet_diagnostic.RCS1035.severity = none + +# RCS1036: Remove redundant empty line. +dotnet_diagnostic.RCS1036.severity = warning + +# RCS1037: Remove trailing white-space. +dotnet_diagnostic.RCS1037.severity = warning + +# RCS1038: Remove empty statement. +dotnet_diagnostic.RCS1038.severity = warning + +# RCS1039: Remove argument list from attribute. +dotnet_diagnostic.RCS1039.severity = warning + +# RCS1040: Remove empty 'else' clause. +dotnet_diagnostic.RCS1040.severity = warning + +# RCS1041: Remove empty initializer. +dotnet_diagnostic.RCS1041.severity = warning + +# RCS1042: Remove enum default underlying type. +dotnet_diagnostic.RCS1042.severity = warning + +# RCS1043: Remove 'partial' modifier from type with a single part. +dotnet_diagnostic.RCS1043.severity = warning + +# RCS1044: Remove original exception from throw statement. +dotnet_diagnostic.RCS1044.severity = warning + +# RCS1046: Asynchronous method name should end with 'Async'. +dotnet_diagnostic.RCS1046.severity = none + +# RCS1047: Non-asynchronous method name should not end with 'Async'. +dotnet_diagnostic.RCS1047.severity = warning + +# RCS1047FadeOut: Non-asynchronous method name should not end with 'Async'. (NotConfigurable) +#dotnet_diagnostic.RCS1047FadeOut.severity = silent + +# RCS1048: Use lambda expression instead of anonymous method. +dotnet_diagnostic.RCS1048.severity = warning + +# RCS1048FadeOut: Use lambda expression instead of anonymous method. (NotConfigurable) +#dotnet_diagnostic.RCS1048FadeOut.severity = silent + +# RCS1049: Simplify boolean comparison. +dotnet_diagnostic.RCS1049.severity = warning + +# RCS1049FadeOut: Simplify boolean comparison. (NotConfigurable) +#dotnet_diagnostic.RCS1049FadeOut.severity = silent + +# RCS1050: Add argument list to object creation expression (or vice versa). +dotnet_diagnostic.RCS1050.severity = none + +# RCS1051: Parenthesize condition of conditional expression. +dotnet_diagnostic.RCS1051.severity = none + +# RCS1052: Declare each attribute separately. +dotnet_diagnostic.RCS1052.severity = warning + +# RCS1055: Avoid semicolon at the end of declaration. +dotnet_diagnostic.RCS1055.severity = warning + +# RCS1056: Avoid usage of using alias directive. +dotnet_diagnostic.RCS1056.severity = none + +# RCS1058: Use compound assignment. +dotnet_diagnostic.RCS1058.severity = warning + +# RCS1058FadeOut: Use compound assignment. (NotConfigurable) +#dotnet_diagnostic.RCS1058FadeOut.severity = silent + +# RCS1059: Avoid locking on publicly accessible instance. +dotnet_diagnostic.RCS1059.severity = warning + +# RCS1060: Declare each type in separate file. +dotnet_diagnostic.RCS1060.severity = warning + +# RCS1061: Merge 'if' with nested 'if'. +dotnet_diagnostic.RCS1061.severity = warning + +# RCS1061FadeOut: Merge 'if' with nested 'if'. (NotConfigurable) +#dotnet_diagnostic.RCS1061FadeOut.severity = silent + +# RCS1063: Avoid usage of do statement to create an infinite loop. +dotnet_diagnostic.RCS1063.severity = warning + +# RCS1064: Avoid usage of for statement to create an infinite loop. +dotnet_diagnostic.RCS1064.severity = warning + +# RCS1065: Avoid usage of while statement to create an inifinite loop. +dotnet_diagnostic.RCS1065.severity = none + +# RCS1066: Remove empty 'finally' clause. +dotnet_diagnostic.RCS1066.severity = warning + +# RCS1066FadeOut: Remove empty 'finally' clause. (NotConfigurable) +#dotnet_diagnostic.RCS1066FadeOut.severity = silent + +# RCS1068: Simplify logical negation. +dotnet_diagnostic.RCS1068.severity = warning + +# RCS1069: Remove unnecessary case label. +dotnet_diagnostic.RCS1069.severity = warning + +# RCS1070: Remove redundant default switch section. +dotnet_diagnostic.RCS1070.severity = warning + +# RCS1071: Remove redundant base constructor call. +dotnet_diagnostic.RCS1071.severity = warning + +# RCS1072: Remove empty namespace declaration. +dotnet_diagnostic.RCS1072.severity = warning + +# RCS1073: Convert 'if' to 'return' statement. +dotnet_diagnostic.RCS1073.severity = warning + +# RCS1073FadeOut: Convert 'if' to 'return' statement. (NotConfigurable) +#dotnet_diagnostic.RCS1073FadeOut.severity = silent + +# RCS1074: Remove redundant constructor. +dotnet_diagnostic.RCS1074.severity = warning + +# RCS1075: Avoid empty catch clause that catches System.Exception. +dotnet_diagnostic.RCS1075.severity = warning + +# RCS1077: Optimize LINQ method call. +dotnet_diagnostic.RCS1077.severity = warning + +# RCS1078: Use "" instead of string.Empty. +dotnet_diagnostic.RCS1078.severity = warning + +# RCS1079: Throwing of new NotImplementedException. +dotnet_diagnostic.RCS1079.severity = none + +# RCS1080: Use 'Count/Length' property instead of 'Any' method. +dotnet_diagnostic.RCS1080.severity = none + +# RCS1081: Split variable declaration. +dotnet_diagnostic.RCS1081.severity = warning + +# RCS1084: Use coalesce expression instead of conditional expression. +dotnet_diagnostic.RCS1084.severity = warning + +# RCS1085: Use auto-implemented property. +dotnet_diagnostic.RCS1085.severity = warning + +# RCS1085FadeOut: Use auto-implemented property. (NotConfigurable) +#dotnet_diagnostic.RCS1085FadeOut.severity = silent + +# RCS1089: Use --/++ operator instead of assignment. +dotnet_diagnostic.RCS1089.severity = warning + +# RCS1089: Use --/++ operator instead of assignment. (NotConfigurable) +#dotnet_diagnostic.RCS1089FadeOut.severity = silent + +# RCS1090: Call 'ConfigureAwait(false)'. +dotnet_diagnostic.RCS1090.severity = warning + +# RCS1091: Remove empty region. +dotnet_diagnostic.RCS1091.severity = warning + +# RCS1091FadeOut: Remove empty region. (NotConfigurable) +#dotnet_diagnostic.RCS1091FadeOut.severity = silent + +# RCS1093: Remove file with no code. +dotnet_diagnostic.RCS1093.severity = warning + +# RCS1094: Declare using directive on top level. +dotnet_diagnostic.RCS1094.severity = none + +# RCS1096: Convert 'HasFlag' call to bitwise operation (or vice versa). +dotnet_diagnostic.RCS1096.severity = warning + +# RCS1097: Remove redundant 'ToString' call. +dotnet_diagnostic.RCS1097.severity = warning + +# RCS1098: Constant values should be placed on right side of comparisons. +dotnet_diagnostic.RCS1098.severity = warning + +# RCS1099: Default label should be the last label in a switch section. +dotnet_diagnostic.RCS1099.severity = warning + +# RCS1100: [deprecated] Format documentation summary on a single line. +dotnet_diagnostic.RCS1100.severity = none + +# RCS1101: [deprecated] Format documentation summary on multiple lines. +dotnet_diagnostic.RCS1101.severity = none + +# RCS1102: Make class static. +dotnet_diagnostic.RCS1102.severity = warning + +# RCS1103: Convert 'if' to assignment. +dotnet_diagnostic.RCS1103.severity = warning + +# RCS1104: Simplify conditional expression. +dotnet_diagnostic.RCS1104.severity = warning + +# RCS1105: Unncessary interpolation. +dotnet_diagnostic.RCS1105.severity = warning + +# RCS1106: Remove empty destructor. +dotnet_diagnostic.RCS1106.severity = warning + +# RCS1107: Remove redundant 'ToCharArray' call. +dotnet_diagnostic.RCS1107.severity = warning + +# RCS1108: Add 'static' modifier to all partial class declarations. +dotnet_diagnostic.RCS1108.severity = warning + +# RCS1110: Declare type inside namespace. +dotnet_diagnostic.RCS1110.severity = warning + +# RCS1111: Add braces to switch section with multiple statements. +dotnet_diagnostic.RCS1111.severity = warning + +# RCS1112: Combine 'Enumerable.Where' method chain. +dotnet_diagnostic.RCS1112.severity = warning + +# RCS1112FadeOut: Combine 'Enumerable.Where' method chain. (NotConfigurable) +#dotnet_diagnostic.RCS1112FadeOut.severity = silent + +# RCS1113: Use 'string.IsNullOrEmpty' method. +dotnet_diagnostic.RCS1113.severity = warning + +# RCS1114: Remove redundant delegate creation. +dotnet_diagnostic.RCS1114.severity = warning + +# RCS1114FadeOut: Remove redundant delegate creation. (NotConfigurable) +#dotnet_diagnostic.RCS1114FadeOut.severity = silent + +# RCS1118: Mark local variable as const. +dotnet_diagnostic.RCS1118.severity = warning + +# RCS1123: Add parentheses when necessary. +dotnet_diagnostic.RCS1123.severity = warning + +# RCS1124: Inline local variable. +dotnet_diagnostic.RCS1124.severity = suggestion + +# RCS1124FadeOut: Inline local variable. (NotConfigurable) +#dotnet_diagnostic.RCS1124FadeOut.severity = silent + +# RCS1126: Add braces to if-else. +dotnet_diagnostic.RCS1126.severity = warning + +# RCS1128: Use coalesce expression. +dotnet_diagnostic.RCS1128.severity = warning + +# RCS1129: Remove redundant field initalization. +dotnet_diagnostic.RCS1129.severity = warning + +# RCS1130: Bitwise operation on enum without Flags attribute. +dotnet_diagnostic.RCS1130.severity = warning + +# RCS1132: Remove redundant overriding member. +dotnet_diagnostic.RCS1132.severity = warning + +# RCS1133: Remove redundant Dispose/Close call. +dotnet_diagnostic.RCS1133.severity = warning + +# RCS1134: Remove redundant statement. +dotnet_diagnostic.RCS1134.severity = warning + +# RCS1135: Declare enum member with zero value (when enum has FlagsAttribute). +dotnet_diagnostic.RCS1135.severity = warning + +# RCS1136: Merge switch sections with equivalent content. +dotnet_diagnostic.RCS1136.severity = warning + +# RCS1138: Add summary to documentation comment. +dotnet_diagnostic.RCS1138.severity = warning + +# RCS1139: Add summary element to documentation comment. +dotnet_diagnostic.RCS1139.severity = warning + +# RCS1140: Add exception to documentation comment. +dotnet_diagnostic.RCS1140.severity = warning + +# RCS1141: Add 'param' element to documentation comment. +dotnet_diagnostic.RCS1141.severity = warning + +# RCS1142: Add 'typeparam' element to documentation comment. +dotnet_diagnostic.RCS1142.severity = warning + +# RCS1143: Simplify coalesce expression. +dotnet_diagnostic.RCS1143.severity = warning + +# RCS1145: Remove redundant 'as' operator. +dotnet_diagnostic.RCS1145.severity = warning + +# RCS1146: Use conditional access. +dotnet_diagnostic.RCS1146.severity = warning + +# RCS1151: Remove redundant cast. +dotnet_diagnostic.RCS1151.severity = warning + +# RCS1154: Sort enum members. +dotnet_diagnostic.RCS1154.severity = warning + +# RCS1155: Use StringComparison when comparing strings. +dotnet_diagnostic.RCS1155.severity = warning + +# RCS1156: Use string.Length instead of comparison with empty string. +dotnet_diagnostic.RCS1156.severity = warning + +# RCS1157: Composite enum value contains undefined flag. +dotnet_diagnostic.RCS1157.severity = warning + +# RCS1158: Static member in generic type should use a type parameter. +dotnet_diagnostic.RCS1158.severity = warning + +# RCS1159: Use EventHandler. +dotnet_diagnostic.RCS1159.severity = warning + +# RCS1160: Abstract type should not have public constructors. +dotnet_diagnostic.RCS1160.severity = warning + +# RCS1161: Enum should declare explicit values. +dotnet_diagnostic.RCS1161.severity = warning + +# RCS1162: Avoid chain of assignments. +dotnet_diagnostic.RCS1162.severity = warning + +# RCS1163: Unused parameter. +dotnet_diagnostic.RCS1163.severity = warning + +# RCS1164: Unused type parameter. +dotnet_diagnostic.RCS1164.severity = warning + +# RCS1165: Unconstrained type parameter checked for null. +dotnet_diagnostic.RCS1165.severity = warning + +# RCS1166: Value type object is never equal to null. +dotnet_diagnostic.RCS1166.severity = warning + +# RCS1168: Parameter name differs from base name. +dotnet_diagnostic.RCS1168.severity = warning + +# RCS1169: Make field read-only. +dotnet_diagnostic.RCS1169.severity = warning + +# RCS1170: Use read-only auto-implemented property. +dotnet_diagnostic.RCS1170.severity = warning + +# RCS1171: Simplify lazy initialization. +dotnet_diagnostic.RCS1171.severity = suggestion + +# RCS1172: Use 'is' operator instead of 'as' operator. +dotnet_diagnostic.RCS1172.severity = warning + +# RCS1173: Use coalesce expression instead of 'if'. +dotnet_diagnostic.RCS1173.severity = warning + +# RCS1174: Remove redundant async/await. +dotnet_diagnostic.RCS1174.severity = none + +# RCS1174FadeOut: Remove redundant async/await. (NotConfigurable) +#dotnet_diagnostic.RCS1174FadeOut.severity = silent + +# RCS1175: Unused this parameter. +dotnet_diagnostic.RCS1175.severity = warning + +# RCS1176: Use 'var' instead of explicit type (when the type is not obvious). +dotnet_diagnostic.RCS1176.severity = warning + +# RCS1177: Use 'var' instead of explicit type (in foreach). +dotnet_diagnostic.RCS1177.severity = warning + +# RCS1179: Unnecessary assignment. +dotnet_diagnostic.RCS1179.severity = warning + +# RCS1180: Inline lazy initialization. +dotnet_diagnostic.RCS1180.severity = suggestion + +# RCS1181: Convert comment to documentation comment. +dotnet_diagnostic.RCS1181.severity = warning + +# RCS1182: Remove redundant base interface. +dotnet_diagnostic.RCS1182.severity = warning + +# RCS1186: Use Regex instance instead of static method. +dotnet_diagnostic.RCS1186.severity = warning + +# RCS1187: Use constant instead of field. +dotnet_diagnostic.RCS1187.severity = warning + +# RCS1188: Remove redundant auto-property initialization. +dotnet_diagnostic.RCS1188.severity = warning + +# RCS1189: Add or remove region name. +dotnet_diagnostic.RCS1189.severity = warning + +# RCS1190: Join string expressions. +dotnet_diagnostic.RCS1190.severity = warning + +# RCS1191: Declare enum value as combination of names. +dotnet_diagnostic.RCS1191.severity = warning + +# RCS1192: Unnecessary usage of verbatim string literal. +dotnet_diagnostic.RCS1192.severity = warning + +# RCS1193: Overriding member should not change 'params' modifier. +dotnet_diagnostic.RCS1193.severity = warning + +# RCS1194: Implement exception constructors. +dotnet_diagnostic.RCS1194.severity = warning + +# RCS1195: Use ^ operator. +dotnet_diagnostic.RCS1195.severity = warning + +# RCS1196: Call extension method as instance method. +dotnet_diagnostic.RCS1196.severity = warning + +# RCS1197: Optimize StringBuilder.Append/AppendLine call. +dotnet_diagnostic.RCS1197.severity = warning + +# RCS1198: Avoid unnecessary boxing of value type. +dotnet_diagnostic.RCS1198.severity = warning + +# RCS1199: Unnecessary null check. +dotnet_diagnostic.RCS1199.severity = warning + +# RCS1200: Call 'Enumerable.ThenBy' instead of 'Enumerable.OrderBy'. +dotnet_diagnostic.RCS1200.severity = warning + +# RCS1201: Use method chaining. +dotnet_diagnostic.RCS1201.severity = warning + +# RCS1202: Avoid NullReferenceException. +dotnet_diagnostic.RCS1202.severity = warning + +# RCS1203: Use AttributeUsageAttribute. +dotnet_diagnostic.RCS1203.severity = warning + +# RCS1204: Use EventArgs.Empty. +dotnet_diagnostic.RCS1204.severity = warning + +# RCS1205: Order named arguments according to the order of parameters. +dotnet_diagnostic.RCS1205.severity = warning + +# RCS1206: Use conditional access instead of conditional expression. +dotnet_diagnostic.RCS1206.severity = warning + +# RCS1207: Convert anonymous function to method group. +dotnet_diagnostic.RCS1207.severity = warning + +# RCS1207FadeOut: Convert anonymous function to method group. (NotConfigurable) +#dotnet_diagnostic.RCS1207FadeOut.severity = silent + +# RCS1208: Reduce 'if' nesting. +dotnet_diagnostic.RCS1208.severity = none + +# RCS1209: Order type parameter constraints. +dotnet_diagnostic.RCS1209.severity = warning + +# RCS1210: Return Task.FromResult instead of returning null. +dotnet_diagnostic.RCS1210.severity = warning + +# RCS1211: Remove unnecessary 'else'. +dotnet_diagnostic.RCS1211.severity = warning + +# RCS1212: Remove redundant assignment. +dotnet_diagnostic.RCS1212.severity = warning + +# RCS1212FadeOut: Remove redundant assignment. (NotConfigurable) +#dotnet_diagnostic.RCS1212FadeOut.severity = silent + +# RCS1213: Remove unused member declaration. +dotnet_diagnostic.RCS1213.severity = warning + +# RCS1214: Unnecessary interpolated string. +dotnet_diagnostic.RCS1214.severity = warning + +# RCS1214FadeOut: Unnecessary interpolated string. (NotConfigurable) +#dotnet_diagnostic.RCS1214FadeOut.severity = silent + +# RCS1215: Expression is always equal to true/false. +dotnet_diagnostic.RCS1215.severity = warning + +# RCS1216: Unnecessary unsafe context. +dotnet_diagnostic.RCS1216.severity = warning + +# RCS1217: Convert interpolated string to concatenation. +dotnet_diagnostic.RCS1217.severity = warning + +# RCS1217FadeOut: Convert interpolated string to concatenation. (NotConfigurable) +#dotnet_diagnostic.RCS1217FadeOut.severity = silent + +# RCS1218: Simplify code branching. +dotnet_diagnostic.RCS1218.severity = warning + +# RCS1220: Use pattern matching instead of combination of 'is' operator and cast operator. +dotnet_diagnostic.RCS1220.severity = warning + +# RCS1221: Use pattern matching instead of combination of 'as' operator and null check. +dotnet_diagnostic.RCS1221.severity = warning + +# RCS1222: Merge preprocessor directives. +dotnet_diagnostic.RCS1222.severity = warning + +# RCS1223: Mark publicly visible type with DebuggerDisplay attribute. +dotnet_diagnostic.RCS1223.severity = silent + +# RCS1224: Make method an extension method. +dotnet_diagnostic.RCS1224.severity = warning + +# RCS1225: Make class sealed. +dotnet_diagnostic.RCS1225.severity = warning + +# RCS1226: Add paragraph to documentation comment. +dotnet_diagnostic.RCS1226.severity = warning + +# RCS1227: Validate arguments correctly. +dotnet_diagnostic.RCS1227.severity = warning + +# RCS1228: Unused element in documentation comment. +dotnet_diagnostic.RCS1228.severity = warning + +# RCS1228FadeOut: Unused element in documentation comment. (NotConfigurable) +#dotnet_diagnostic.RCS1228FadeOut.severity = silent + +# RCS1229: Use async/await when necessary. +dotnet_diagnostic.RCS1229.severity = warning + +# RCS1230: Unnecessary explicit use of enumerator. +dotnet_diagnostic.RCS1230.severity = warning + +# RCS1231: Make parameter ref read-only. +dotnet_diagnostic.RCS1231.severity = suggestion + +# RCS1232: Order elements in documentation comment. +dotnet_diagnostic.RCS1232.severity = warning + +# RCS1233: Use short-circuiting operator. +dotnet_diagnostic.RCS1233.severity = warning + +# RCS1234: Duplicate enum value. +dotnet_diagnostic.RCS1234.severity = warning + +# RCS1235: Optimize method call. +dotnet_diagnostic.RCS1235.severity = warning + +# RCS1236: Use exception filter. +dotnet_diagnostic.RCS1236.severity = warning + +# RCS1237: Use bit shift operator. +dotnet_diagnostic.RCS1237.severity = suggestion + +# RCS1238: Avoid nested ?: operators. +dotnet_diagnostic.RCS1238.severity = suggestion + +# RCS1239: Use 'for' statement instead of 'while' statement. +dotnet_diagnostic.RCS1239.severity = warning + +# RCS1240: Operator is unnecessary. +dotnet_diagnostic.RCS1240.severity = warning + +# RCS1241: Implement non-generic counterpart. +dotnet_diagnostic.RCS1241.severity = warning + +# RCS1242: Do not pass non-read-only struct by read-only reference. +dotnet_diagnostic.RCS1242.severity = warning + +# RCS1243: Duplicate word in a comment. +dotnet_diagnostic.RCS1243.severity = warning + +# RCS1244: Simplify 'default' expression. +dotnet_diagnostic.RCS1244.severity = warning + +# RCS1246: Use element access. +dotnet_diagnostic.RCS1246.severity = none + +# RCS1247: Fix documentation comment tag. +dotnet_diagnostic.RCS1247.severity = warning + +# RCS1248: Normalize null check. +dotnet_diagnostic.RCS1248.severity = warning + +# RCS1249: Unnecessary null-forgiving operator. +dotnet_diagnostic.RCS1249.severity = warning + +# RCS1250: Use implicit/explicit object creation. +dotnet_diagnostic.RCS1250.severity = warning + +# RCS1251: Remove unnecessary braces from record declaration. +dotnet_diagnostic.RCS1251.severity = warning + +# RCS1252: Normalize usage of infinite loop. +dotnet_diagnostic.RCS1252.severity = warning + +# RCS1253: Format documentation comment summary. +dotnet_diagnostic.RCS1253.severity = warning + +# RCS1254: Normalize format of enum flag value. +dotnet_diagnostic.RCS1254.severity = warning + +# ROS0001: Analyzer is obsolete. +dotnet_diagnostic.ROS0001.severity = warning + +# ROS0002: Analyzer option is obsolete. +dotnet_diagnostic.ROS0002.severity = warning + +# ROS0003: Analyzer requires config option to be specified. +dotnet_diagnostic.ROS0003.severity = warning + +## Microsoft.CodeAnalysis.CSharp.CodeStyle + +# IDE0001: Simplify name +dotnet_diagnostic.IDE0001.severity = warning + +# IDE0002: Simplify member access +dotnet_diagnostic.IDE0002.severity = warning + +# IDE0003: Remove this or Me qualification +dotnet_diagnostic.IDE0003.severity = none + +# IDE0004: Remove unnecessary cast +dotnet_diagnostic.IDE0004.severity = warning + +# IDE0005: Using directive is unnecessary. +dotnet_diagnostic.IDE0005.severity = warning + +# IDE0007: Use implicit type +dotnet_diagnostic.IDE0007.severity = warning + +# IDE0008: Use explicit type instead of 'var' +dotnet_diagnostic.IDE0008.severity = warning + +# IDE0009: Add this or Me qualification +dotnet_diagnostic.IDE0009.severity = warning + +# IDE0010: Add missing cases to switch statement +dotnet_diagnostic.IDE0010.severity = warning + +# IDE0011: Add braces +dotnet_diagnostic.IDE0011.severity = warning + +# IDE0016: Use throw expression +dotnet_diagnostic.IDE0016.severity = warning + +# IDE0017: Use object initializers +dotnet_diagnostic.IDE0017.severity = warning + +# IDE0018: Inline variable declaration +dotnet_diagnostic.IDE0018.severity = warning + +# IDE0019: Use pattern matching to avoid 'as' followed by a 'null' check +dotnet_diagnostic.IDE0019.severity = warning + +# IDE0020: Use pattern matching to avoid 'is' check followed by a cast (with variable) +dotnet_diagnostic.IDE0020.severity = warning + +# IDE0021: Use expression body for constructors +dotnet_diagnostic.IDE0021.severity = suggestion + +# IDE0022: Use expression body for methods +dotnet_diagnostic.IDE0022.severity = suggestion + +# IDE0023: Use expression body for conversion operators +dotnet_diagnostic.IDE0023.severity = suggestion + +# IDE0024: Use expression body for operators +dotnet_diagnostic.IDE0024.severity = suggestion + +# IDE0025: Use expression body for properties +dotnet_diagnostic.IDE0025.severity = suggestion + +# IDE0026: Use expression body for indexers +dotnet_diagnostic.IDE0026.severity = suggestion + +# IDE0027: Use expression body for accessors +dotnet_diagnostic.IDE0027.severity = suggestion + +# IDE0028: Use collection initializers +dotnet_diagnostic.IDE0028.severity = warning + +# IDE0029: Use coalesce expression (non-nullable types) +dotnet_diagnostic.IDE0029.severity = warning + +# IDE0030: Use coalesce expression (nullable types) +dotnet_diagnostic.IDE0030.severity = warning + +# IDE0031: Use null propagation +dotnet_diagnostic.IDE0031.severity = warning + +# IDE0032: Use auto property +dotnet_diagnostic.IDE0032.severity = warning + +# IDE0033: Use explicitly provided tuple name +dotnet_diagnostic.IDE0033.severity = warning + +# IDE0034: Simplify default expression +dotnet_diagnostic.IDE0034.severity = warning + +# IDE0035: Remove unreachable code +dotnet_diagnostic.IDE0035.severity = warning + +# IDE0036: Order modifiers +dotnet_diagnostic.IDE0036.severity = warning + +# IDE0037: Use inferred member name +dotnet_diagnostic.IDE0037.severity = warning + +# IDE0038: Use pattern matching to avoid 'is' check followed by a cast (without variable) +dotnet_diagnostic.IDE0038.severity = warning + +# IDE0039: Use local function instead of lambda +dotnet_diagnostic.IDE0039.severity = warning + +# IDE0040: Add accessibility modifiers +dotnet_diagnostic.IDE0040.severity = warning + +# IDE0041: Use 'is null' check +dotnet_diagnostic.IDE0041.severity = warning + +# IDE0042: Deconstruct variable declaration +dotnet_diagnostic.IDE0042.severity = warning + +# IDE0043: Invalid format string +dotnet_diagnostic.IDE0043.severity = warning + +# IDE0044: Add readonly modifier +dotnet_diagnostic.IDE0044.severity = warning + +# IDE0045: Use conditional expression for assignment +dotnet_diagnostic.IDE0045.severity = warning + +# IDE0046: Use conditional expression for return +dotnet_diagnostic.IDE0046.severity = none + +# IDE0047: Remove unnecessary parentheses +dotnet_diagnostic.IDE0047.severity = warning + +# IDE0048: Add parentheses for clarity +dotnet_diagnostic.IDE0048.severity = warning + +# IDE0049: Use language keywords instead of framework type names for type references +dotnet_diagnostic.IDE0049.severity = warning + +# IDE0050: Convert anonymous type to tuple +dotnet_diagnostic.IDE0050.severity = warning + +# IDE0051: Remove unused private member +dotnet_diagnostic.IDE0051.severity = warning + +# IDE0052: Remove unused private member +dotnet_diagnostic.IDE0052.severity = warning + +# IDE0053: Use expression body for lambdas +dotnet_diagnostic.IDE0053.severity = suggestion + +# IDE0054: Use compound assignment +dotnet_diagnostic.IDE0054.severity = warning + +# IDE0055: Fix formatting +dotnet_diagnostic.IDE0055.severity = warning + +# IDE0056: Use index operator +dotnet_diagnostic.IDE0056.severity = warning + +# IDE0057: Use range operator +dotnet_diagnostic.IDE0057.severity = none + +# IDE0058: Remove unnecessary expression value +dotnet_diagnostic.IDE0058.severity = none + +# IDE0059: Remove unnecessary value assignment +dotnet_diagnostic.IDE0059.severity = warning + +# IDE0060: Remove unused parameter +dotnet_diagnostic.IDE0060.severity = warning + +# IDE0061: Use expression body for local functions +dotnet_diagnostic.IDE0061.severity = suggestion + +# IDE0062: Make local function static +dotnet_diagnostic.IDE0062.severity = warning + +# IDE0063: Use simple using statement +dotnet_diagnostic.IDE0063.severity = warning + +# IDE0064: Make struct fields writable +dotnet_diagnostic.IDE0064.severity = warning + +# IDE0065: using directive placement +dotnet_diagnostic.IDE0065.severity = none + +# IDE0066: Use switch expression +dotnet_diagnostic.IDE0066.severity = warning + +# IDE0070: Use 'System.HashCode' +dotnet_diagnostic.IDE0070.severity = warning + +# IDE0071: Simplify interpolation +dotnet_diagnostic.IDE0071.severity = warning + +# IDE0072: Add missing cases to switch expression +dotnet_diagnostic.IDE0072.severity = warning + +# IDE0073: Require file header +dotnet_diagnostic.IDE0073.severity = warning + +# IDE0074: Use coalesce compound assignment +dotnet_diagnostic.IDE0074.severity = warning + +# IDE0075: Simplify conditional expression +dotnet_diagnostic.IDE0075.severity = warning + +# IDE0076: Remove invalid global 'SuppressMessageAttribute' +dotnet_diagnostic.IDE0076.severity = warning + +# IDE0077: Avoid legacy format target in global 'SuppressMessageAttribute' +dotnet_diagnostic.IDE0077.severity = warning + +# IDE0078: Use pattern matching +dotnet_diagnostic.IDE0078.severity = warning + +# IDE0079: Remove unnecessary suppression +dotnet_diagnostic.IDE0079.severity = none + +# IDE0080: Remove unnecessary suppression operator +dotnet_diagnostic.IDE0080.severity = warning + +# IDE0081: Remove 'ByVal' +dotnet_diagnostic.IDE0081.severity = warning + +# IDE0082: Convert 'typeof' to 'nameof' +dotnet_diagnostic.IDE0082.severity = warning + +# IDE0083: Use pattern matching ('not' operator) +dotnet_diagnostic.IDE0083.severity = warning + +# IDE0084: Use pattern matching ('IsNot' operator) +dotnet_diagnostic.IDE0084.severity = warning + +# IDE0090: Simplify new expression +dotnet_diagnostic.IDE0090.severity = warning + +# IDE0100: Remove unnecessary equality operator +dotnet_diagnostic.IDE0100.severity = warning + +# IDE0110: Remove unnecessary discard +dotnet_diagnostic.IDE0110.severity = warning + +# IDE0120: Simplify LINQ expression +dotnet_diagnostic.IDE0120.severity = warning + +# IDE0130: Namespace does not match folder structure +dotnet_diagnostic.IDE0130.severity = warning + +# IDE0140: Simplify object creation +dotnet_diagnostic.IDE0140.severity = warning + +# IDE0150: Prefer 'null' check over type check +dotnet_diagnostic.IDE0150.severity = warning + +# IDE0160: Convert to block scoped namespace +dotnet_diagnostic.IDE0160.severity = none + +# IDE0161: Convert to file-scoped namespace +dotnet_diagnostic.IDE0161.severity = none + +# IDE0170: Property pattern can be simplified +dotnet_diagnostic.IDE0170.severity = warning + +# IDE0180: Use tuple to swap values +dotnet_diagnostic.IDE0180.severity = warning + +# IDE0190: Null check can be simplified +dotnet_diagnostic.IDE0190.severity = warning + +# IDE0200: Remove unnecessary lambda expression +dotnet_diagnostic.IDE0200.severity = warning + +# IDE1005: Use conditional delegate call +dotnet_diagnostic.IDE1005.severity = warning + +# IDE1006: Naming Styles +dotnet_diagnostic.IDE1006.severity = none + +# IDE2000: Avoid multiple blank lines +dotnet_diagnostic.IDE2000.severity = warning + +# IDE2001: Embedded statements must be on their own line +dotnet_diagnostic.IDE2001.severity = warning + +# IDE2002: Consecutive braces must not have blank line between them +dotnet_diagnostic.IDE2002.severity = warning + +# IDE2003: Blank line required between block and subsequent statement +dotnet_diagnostic.IDE2003.severity = warning + +# IDE2004: Blank line not allowed after constructor initializer colon +dotnet_diagnostic.IDE2004.severity = warning + +## Microsoft.CodeAnalysis.CSharp.NetAnalyzers + +# CA1000: Do not declare static members on generic types +dotnet_diagnostic.CA1000.severity = warning +dotnet_code_quality.CA1000.api_surface = all + +# CA1001: Types that own disposable fields should be disposable +dotnet_diagnostic.CA1001.severity = warning +dotnet_code_quality.CA1001.excluded_symbol_names = +dotnet_code_quality.CA1001.excluded_type_names_with_derived_types = + +# CA1002: Do not expose generic lists +dotnet_diagnostic.CA1002.severity = warning +dotnet_code_quality.CA1002.api_surface = all + +# CA1003: Use generic event handler instances +dotnet_diagnostic.CA1003.severity = warning +dotnet_code_quality.CA1003.api_surface = all + +# CA1005: Avoid excessive parameters on generic types +dotnet_diagnostic.CA1005.severity = suggestion +dotnet_code_quality.CA1005.api_surface = all + +# CA1008: Enums should have zero value +dotnet_diagnostic.CA1008.severity = warning +dotnet_code_quality.CA1008.api_surface = all + +# CA1010: Generic interface should also be implemented +dotnet_diagnostic.CA1010.severity = warning +dotnet_code_quality.CA1010.api_surface = all +dotnet_code_quality.CA1010.additional_required_generic_interfaces = + +# CA1012: Abstract types should not have public constructors +dotnet_diagnostic.CA1012.severity = warning +dotnet_code_quality.CA1012.api_surface = all + +# CA1014: Mark assemblies with CLSCompliant +dotnet_diagnostic.CA1014.severity = warning + +# CA1016: Mark assemblies with assembly version +dotnet_diagnostic.CA1016.severity = warning + +# CA1017: Mark assemblies with ComVisible +dotnet_diagnostic.CA1017.severity = warning + +# CA1018: Mark attributes with AttributeUsageAttribute +dotnet_diagnostic.CA1018.severity = warning + +# CA1019: Define accessors for attribute arguments +dotnet_diagnostic.CA1019.severity = warning + +# CA1021: Avoid out parameters +dotnet_diagnostic.CA1021.severity = suggestion +dotnet_code_quality.CA1021.api_surface = all + +# CA1024: Use properties where appropriate +dotnet_diagnostic.CA1024.severity = suggestion +dotnet_code_quality.CA1024.api_surface = all + +# CA1027: Mark enums with FlagsAttribute +dotnet_diagnostic.CA1027.severity = suggestion +dotnet_code_quality.CA1027.api_surface = all + +# CA1028: Enum Storage should be Int32 +dotnet_diagnostic.CA1028.severity = warning +dotnet_code_quality.CA1028.api_surface = all + +# CA1030: Use events where appropriate +dotnet_diagnostic.CA1030.severity = suggestion +dotnet_code_quality.CA1030.api_surface = all + +# CA1031: Do not catch general exception types +dotnet_diagnostic.CA1031.severity = warning +dotnet_code_quality.CA1031.disallowed_symbol_names = + +# CA1032: Implement standard exception constructors +dotnet_diagnostic.CA1032.severity = warning + +# CA1033: Interface methods should be callable by child types +dotnet_diagnostic.CA1033.severity = warning + +# CA1034: Nested types should not be visible +dotnet_diagnostic.CA1034.severity = warning + +# CA1036: Override methods on comparable types +dotnet_diagnostic.CA1036.severity = warning +dotnet_code_quality.CA1036.api_surface = all + +# CA1040: Avoid empty interfaces +dotnet_diagnostic.CA1040.severity = suggestion +dotnet_code_quality.CA1040.api_surface = all + +# CA1041: Provide ObsoleteAttribute message +dotnet_diagnostic.CA1041.severity = warning +dotnet_code_quality.CA1041.api_surface = all + +# CA1043: Use Integral Or String Argument For Indexers +dotnet_diagnostic.CA1043.severity = warning +dotnet_code_quality.CA1043.api_surface = all + +# CA1044: Properties should not be write only +dotnet_diagnostic.CA1044.severity = warning +dotnet_code_quality.CA1044.api_surface = all + +# CA1045: Do not pass types by reference +dotnet_diagnostic.CA1045.severity = suggestion +dotnet_code_quality.CA1045.api_surface = all + +# CA1046: Do not overload equality operator on reference types +dotnet_diagnostic.CA1046.severity = warning +dotnet_code_quality.CA1046.api_surface = all + +# CA1047: Do not declare protected member in sealed type +dotnet_diagnostic.CA1047.severity = warning +dotnet_code_quality.CA1047.api_surface = all + +# CA1050: Declare types in namespaces +dotnet_diagnostic.CA1050.severity = warning + +# CA1051: Do not declare visible instance fields +dotnet_diagnostic.CA1051.severity = warning +dotnet_code_quality.CA1051.api_surface = all +dotnet_code_quality.CA1051.exclude_structs = false + +# CA1052: Static holder types should be Static or NotInheritable +dotnet_diagnostic.CA1052.severity = warning +dotnet_code_quality.CA1052.api_surface = all + +# CA1053: Static holder types should not have default constructors +dotnet_diagnostic.CA1053.severity = warning +dotnet_code_quality.CA1053.api_surface = all + +# CA1054: URI-like parameters should not be strings +dotnet_diagnostic.CA1054.severity = warning +dotnet_code_quality.CA1054.api_surface = all + +# CA1055: URI-like return values should not be strings +dotnet_diagnostic.CA1055.severity = warning +dotnet_code_quality.CA1055.api_surface = all + +# CA1056: URI-like properties should not be strings +dotnet_diagnostic.CA1056.severity = warning +dotnet_code_quality.CA1056.api_surface = all + +# CA1058: Types should not extend certain base types +dotnet_diagnostic.CA1058.severity = warning +dotnet_code_quality.CA1058.api_surface = all + +# CA1060: Move pinvokes to native methods class +dotnet_diagnostic.CA1060.severity = warning + +# CA1061: Do not hide base class methods +dotnet_diagnostic.CA1061.severity = warning + +# CA1062: Validate arguments of public methods +dotnet_diagnostic.CA1062.severity = warning +dotnet_code_quality.CA1062.excluded_symbol_names = +dotnet_code_quality.CA1062.excluded_type_names_with_derived_types = +dotnet_code_quality.CA1062.exclude_extension_method_this_parameter = false +dotnet_code_quality.CA1062.null_check_validation_methods = + +# CA1063: Implement IDisposable Correctly +dotnet_diagnostic.CA1063.severity = warning +dotnet_code_quality.CA1063.api_surface = all + +# CA1064: Exceptions should be public +dotnet_diagnostic.CA1064.severity = warning + +# CA1065: Do not raise exceptions in unexpected locations +dotnet_diagnostic.CA1065.severity = warning + +# CA1066: Implement IEquatable when overriding Object.Equals +dotnet_diagnostic.CA1066.severity = warning + +# CA1067: Override Object.Equals(object) when implementing IEquatable +dotnet_diagnostic.CA1067.severity = warning + +# CA1068: CancellationToken parameters must come last +dotnet_diagnostic.CA1068.severity = warning +dotnet_code_quality.CA1068.api_surface = all +dotnet_code_quality.CA1068.excluded_symbol_names = +dotnet_code_quality.CA1068.excluded_type_names_with_derived_types = + +# CA1069: Enums values should not be duplicated +dotnet_diagnostic.CA1069.severity = warning + +# CA1070: Do not declare event fields as virtual +dotnet_diagnostic.CA1070.severity = warning +dotnet_code_quality.CA1070.api_surface = all + +# CA1200: Avoid using cref tags with a prefix +dotnet_diagnostic.CA1200.severity = warning + +# CA1303: Do not pass literals as localized parameters +dotnet_diagnostic.CA1303.severity = none +dotnet_code_quality.CA1303.excluded_symbol_names = +dotnet_code_quality.CA1303.excluded_type_names_with_derived_types = +dotnet_code_quality.CA1303.use_naming_heuristic = true + +# CA1304: Specify CultureInfo +dotnet_diagnostic.CA1304.severity = warning +dotnet_code_quality.CA1304.excluded_symbol_names = +dotnet_code_quality.CA1304.excluded_type_names_with_derived_types = + +# CA1305: Specify IFormatProvider +dotnet_diagnostic.CA1305.severity = warning + +# CA1307: Specify StringComparison for clarity +dotnet_diagnostic.CA1307.severity = none + +# CA1308: Normalize strings to uppercase +dotnet_diagnostic.CA1308.severity = warning + +# CA1309: Use ordinal string comparison +dotnet_diagnostic.CA1309.severity = warning + +# CA1310: Specify StringComparison for correctness +dotnet_diagnostic.CA1310.severity = warning + +# CA1401: P/Invokes should not be visible +dotnet_diagnostic.CA1401.severity = warning + +# CA1416: Validate platform compatibility +dotnet_diagnostic.CA1416.severity = warning +dotnet_code_quality.CA1416.enable_platform_analyzer_on_pre_net5_target = true + +# CA1417: Do not use 'OutAttribute' on string parameters for P/Invokes +dotnet_diagnostic.CA1417.severity = warning + +# CA1418: Use valid platform string +dotnet_diagnostic.CA1418.severity = warning + +# CA1419: Provide a parameterless constructor that is as visible as the containing type for concrete types derived from 'System.Runtime.InteropServices.SafeHandle' +dotnet_diagnostic.CA1419.severity = warning + +# CA1501: Avoid excessive inheritance +dotnet_diagnostic.CA1501.severity = suggestion +dotnet_code_quality.CA1501.additional_inheritance_excluded_symbol_names = + +# CA1502: Avoid excessive complexity +dotnet_diagnostic.CA1502.severity = suggestion + +# CA1505: Avoid unmaintainable code +dotnet_diagnostic.CA1505.severity = suggestion + +# CA1506: Avoid excessive class coupling +dotnet_diagnostic.CA1506.severity = suggestion + +# CA1507: Use nameof to express symbol names +dotnet_diagnostic.CA1507.severity = warning + +# CA1508: Avoid dead conditional code +dotnet_diagnostic.CA1508.severity = warning +dotnet_code_quality.CA1508.excluded_symbol_names = +dotnet_code_quality.CA1508.excluded_type_names_with_derived_types = + +# CA1509: Invalid entry in code metrics rule specification file +dotnet_diagnostic.CA1509.severity = warning + +# CA1700: Do not name enum values 'Reserved' +dotnet_diagnostic.CA1700.severity = warning +dotnet_code_quality.CA1700.api_surface = all + +# CA1707: Identifiers should not contain underscores +dotnet_diagnostic.CA1707.severity = none +dotnet_code_quality.CA1707.api_surface = all + +# CA1708: Identifiers should differ by more than case +dotnet_diagnostic.CA1708.severity = warning +dotnet_code_quality.CA1708.api_surface = all + +# CA1710: Identifiers should have correct suffix +dotnet_diagnostic.CA1710.severity = warning +dotnet_code_quality.CA1710.api_surface = all +dotnet_code_quality.CA1710.exclude_indirect_base_types = true +dotnet_code_quality.CA1710.additional_required_suffixes = T:System.Collections.Generic.IReadOnlyList`1->List|T:System.Collections.Generic.IList`1->List|T:System.Collections.Generic.IReadOnlySet`1->Set|T:System.Collections.Generic.ISet`1->Set|T:System.Collections.Generic.IReadOnlyCollection`1->Collection + +# CA1711: Identifiers should not have incorrect suffix +dotnet_diagnostic.CA1711.severity = warning +dotnet_code_quality.CA1711.api_surface = all +dotnet_code_quality.CA1711.allowed_suffixes = + +# CA1712: Do not prefix enum values with type name +dotnet_diagnostic.CA1712.severity = warning +dotnet_code_quality.CA1712.enum_values_prefix_trigger = AnyEnumValue + +# CA1713: Events should not have 'Before' or 'After' prefix +dotnet_diagnostic.CA1713.severity = warning + +# CA1714: Flags enums should have plural names +dotnet_diagnostic.CA1714.severity = warning +dotnet_code_quality.CA1714.api_surface = all + +# CA1715: Identifiers should have correct prefix +dotnet_diagnostic.CA1715.severity = warning +dotnet_code_quality.CA1715.api_surface = all +dotnet_code_quality.CA1715.exclude_single_letter_type_parameters = false + +# CA1716: Identifiers should not match keywords +dotnet_diagnostic.CA1716.severity = warning +dotnet_code_quality.CA1716.api_surface = all +dotnet_code_quality.CA1716.analyzed_symbol_kinds = Namespace, NamedType, Method, Property, Event, Parameter + +# CA1717: Only FlagsAttribute enums should have plural names +dotnet_diagnostic.CA1717.severity = warning +dotnet_code_quality.CA1717.api_surface = all + +# CA1720: Identifier contains type name +dotnet_diagnostic.CA1720.severity = warning +dotnet_code_quality.CA1720.api_surface = all + +# CA1721: Property names should not match get methods +dotnet_diagnostic.CA1721.severity = warning +dotnet_code_quality.CA1721.api_surface = all + +# CA1724: Type names should not match namespaces +dotnet_diagnostic.CA1724.severity = warning + +# CA1725: Parameter names should match base declaration +dotnet_diagnostic.CA1725.severity = warning +dotnet_code_quality.CA1725.api_surface = all + +# CA1727: Use PascalCase for named placeholders +dotnet_diagnostic.CA1727.severity = warning + +# CA1801: Review unused parameters +dotnet_diagnostic.CA1801.severity = warning +dotnet_code_quality.CA1801.api_surface = all + +# CA1802: Use literals where appropriate +dotnet_diagnostic.CA1802.severity = warning +dotnet_code_quality.CA1802.api_surface = all +dotnet_code_quality.CA1802.required_modifiers = none + +# CA1805: Do not initialize unnecessarily +dotnet_diagnostic.CA1805.severity = warning + +# CA1806: Do not ignore method results +dotnet_diagnostic.CA1806.severity = warning +dotnet_code_quality.CA1806.additional_use_results_methods = + +# CA1810: Initialize reference type static fields inline +dotnet_diagnostic.CA1810.severity = warning + +# CA1812: Avoid uninstantiated internal classes +dotnet_diagnostic.CA1812.severity = none + +# CA1813: Avoid unsealed attributes +dotnet_diagnostic.CA1813.severity = suggestion + +# CA1814: Prefer jagged arrays over multidimensional +dotnet_diagnostic.CA1814.severity = suggestion + +# CA1815: Override equals and operator equals on value types +dotnet_diagnostic.CA1815.severity = warning +dotnet_code_quality.CA1815.api_surface = all + +# CA1816: Dispose methods should call SuppressFinalize +dotnet_diagnostic.CA1816.severity = warning + +# CA1819: Properties should not return arrays +dotnet_diagnostic.CA1819.severity = suggestion +dotnet_code_quality.CA1819.api_surface = all + +# CA1820: Test for empty strings using string length +dotnet_diagnostic.CA1820.severity = warning + +# CA1821: Remove empty Finalizers +dotnet_diagnostic.CA1821.severity = warning + +# CA1822: Mark members as static +dotnet_diagnostic.CA1822.severity = warning +dotnet_code_quality.CA1822.api_surface = all + +# CA1823: Avoid unused private fields +dotnet_diagnostic.CA1823.severity = warning + +# CA1824: Mark assemblies with NeutralResourcesLanguageAttribute +dotnet_diagnostic.CA1824.severity = warning + +# CA1825: Avoid zero-length array allocations +dotnet_diagnostic.CA1825.severity = warning + +# CA1826: Do not use Enumerable methods on indexable collections +dotnet_diagnostic.CA1826.severity = warning +dotnet_code_quality.CA1826.exclude_ordefault_methods = false + +# CA1827: Do not use Count() or LongCount() when Any() can be used +dotnet_diagnostic.CA1827.severity = warning + +# CA1828: Do not use CountAsync() or LongCountAsync() when AnyAsync() can be used +dotnet_diagnostic.CA1828.severity = warning + +# CA1829: Use Length/Count property instead of Count() when available +dotnet_diagnostic.CA1829.severity = warning + +# CA1830: Prefer strongly-typed Append and Insert method overloads on StringBuilder +dotnet_diagnostic.CA1830.severity = warning + +# CA1831: Use AsSpan or AsMemory instead of Range-based indexers when appropriate +dotnet_diagnostic.CA1831.severity = warning + +# CA1832: Use AsSpan or AsMemory instead of Range-based indexers when appropriate +dotnet_diagnostic.CA1832.severity = warning + +# CA1833: Use AsSpan or AsMemory instead of Range-based indexers when appropriate +dotnet_diagnostic.CA1833.severity = warning + +# CA1834: Consider using 'StringBuilder.Append(char)' when applicable +dotnet_diagnostic.CA1834.severity = warning + +# CA1835: Prefer the 'Memory'-based overloads for 'ReadAsync' and 'WriteAsync' +dotnet_diagnostic.CA1835.severity = warning + +# CA1836: Prefer IsEmpty over Count +dotnet_diagnostic.CA1836.severity = warning + +# CA1837: Use 'Environment.ProcessId' +dotnet_diagnostic.CA1837.severity = warning + +# CA1838: Avoid 'StringBuilder' parameters for P/Invokes +dotnet_diagnostic.CA1838.severity = warning + +# CA1839: Use 'Environment.ProcessPath' +dotnet_diagnostic.CA1839.severity = warning + +# CA1840: Use 'Environment.CurrentManagedThreadId' +dotnet_diagnostic.CA1840.severity = warning + +# CA1841: Prefer Dictionary.Contains methods +dotnet_diagnostic.CA1841.severity = warning + +# CA1842: Do not use 'WhenAll' with a single task +dotnet_diagnostic.CA1842.severity = warning + +# CA1843: Do not use 'WaitAll' with a single task +dotnet_diagnostic.CA1843.severity = warning + +# CA1844: Provide memory-based overrides of async methods when subclassing 'Stream' +dotnet_diagnostic.CA1844.severity = warning + +# CA1845: Use span-based 'string.Concat' +dotnet_diagnostic.CA1845.severity = warning + +# CA1846: Prefer 'AsSpan' over 'Substring' +dotnet_diagnostic.CA1846.severity = warning + +# CA1847: Use char literal for a single character lookup +dotnet_diagnostic.CA1847.severity = warning + +# CA1848: Use the LoggerMessage delegates +dotnet_diagnostic.CA1848.severity = none + +# CA1849: Call async methods when in an async method +dotnet_diagnostic.CA1849.severity = warning + +# CA1850: Prefer static 'HashData' method over 'ComputeHash' +dotnet_diagnostic.CA1850.severity = warning + +# CA2000: Dispose objects before losing scope +dotnet_diagnostic.CA2000.severity = warning +dotnet_code_quality.CA2000.excluded_symbol_names = +dotnet_code_quality.CA2000.excluded_type_names_with_derived_types = +dotnet_code_quality.CA2000.dispose_analysis_kind = NonExceptionPaths +dotnet_code_quality.CA2000.dispose_ownership_transfer_at_constructor = false +dotnet_code_quality.CA2000.dispose_ownership_transfer_at_method_call = false + +# CA2002: Do not lock on objects with weak identity +dotnet_diagnostic.CA2002.severity = warning + +# CA2007: Consider calling ConfigureAwait on the awaited task +dotnet_diagnostic.CA2007.severity = warning +dotnet_code_quality.CA2007.exclude_async_void_methods = false +dotnet_code_quality.CA2007.output_kind = ConsoleApplication, DynamicallyLinkedLibrary, NetModule, WindowsApplication, WindowsRuntimeApplication, WindowsRuntimeMetadata + +# CA2008: Do not create tasks without passing a TaskScheduler +dotnet_diagnostic.CA2008.severity = warning + +# CA2009: Do not call ToImmutableCollection on an ImmutableCollection value +dotnet_diagnostic.CA2009.severity = warning + +# CA2011: Avoid infinite recursion +dotnet_diagnostic.CA2011.severity = warning + +# CA2012: Use ValueTasks correctly +dotnet_diagnostic.CA2012.severity = warning + +# CA2013: Do not use ReferenceEquals with value types +dotnet_diagnostic.CA2013.severity = warning + +# CA2014: Do not use stackalloc in loops +dotnet_diagnostic.CA2014.severity = warning + +# CA2015: Do not define finalizers for types derived from MemoryManager +dotnet_diagnostic.CA2015.severity = warning + +# CA2016: Forward the 'CancellationToken' parameter to methods that take one +dotnet_diagnostic.CA2016.severity = warning + +# CA2017: Parameter count mismatch +dotnet_diagnostic.CA2017.severity = warning + +# CA2018: 'Buffer.BlockCopy' expects the number of bytes to be copied for the 'count' argument +dotnet_diagnostic.CA2018.severity = warning + +# CA2100: Review SQL queries for security vulnerabilities +dotnet_diagnostic.CA2100.severity = warning +dotnet_code_quality.CAXXXX.excluded_symbol_names = +dotnet_code_quality.CAXXXX.excluded_type_names_with_derived_types = + +# CA2101: Specify marshaling for P/Invoke string arguments +dotnet_diagnostic.CA2101.severity = warning + +# CA2109: Review visible event handlers +dotnet_diagnostic.CA2109.severity = warning + +# CA2119: Seal methods that satisfy private interfaces +dotnet_diagnostic.CA2119.severity = warning + +# CA2153: Do Not Catch Corrupted State Exceptions +dotnet_diagnostic.CA2153.severity = warning + +# CA2200: Rethrow to preserve stack details +dotnet_diagnostic.CA2200.severity = warning + +# CA2201: Do not raise reserved exception types +dotnet_diagnostic.CA2201.severity = warning + +# CA2207: Initialize value type static fields inline +dotnet_diagnostic.CA2207.severity = warning + +# CA2208: Instantiate argument exceptions correctly +dotnet_diagnostic.CA2208.severity = warning +dotnet_code_quality.CA2208.api_surface = all + +# CA2211: Non-constant fields should not be visible +dotnet_diagnostic.CA2211.severity = warning + +# CA2213: Disposable fields should be disposed +dotnet_diagnostic.CA2213.severity = warning + +# CA2214: Do not call overridable methods in constructors +dotnet_diagnostic.CA2214.severity = warning + +# CA2215: Dispose methods should call base class dispose +dotnet_diagnostic.CA2215.severity = warning + +# CA2216: Disposable types should declare finalizer +dotnet_diagnostic.CA2216.severity = warning + +# CA2217: Do not mark enums with FlagsAttribute +dotnet_diagnostic.CA2217.severity = warning +dotnet_code_quality.CA2217.api_surface = all + +# CA2218: Override GetHashCode on overriding Equals +dotnet_diagnostic.CA2218.severity = warning + +# CA2219: Do not raise exceptions in finally clauses +dotnet_diagnostic.CA2219.severity = warning + +# CA2224: Override Equals on overloading operator equals +dotnet_diagnostic.CA2224.severity = warning + +# CA2225: Operator overloads have named alternates +dotnet_diagnostic.CA2225.severity = warning +dotnet_code_quality.CA2225.api_surface = all + +# CA2226: Operators should have symmetrical overloads +dotnet_diagnostic.CA2226.severity = warning +dotnet_code_quality.CA2226.api_surface = all + +# CA2227: Collection properties should be read only +dotnet_diagnostic.CA2227.severity = none + +# CA2229: Implement serialization constructors +dotnet_diagnostic.CA2229.severity = warning + +# CA2231: Overload operator equals on overriding value type Equals +dotnet_diagnostic.CA2231.severity = warning +dotnet_code_quality.CA2231.api_surface = all + +# CA2234: Pass system uri objects instead of strings +dotnet_diagnostic.CA2234.severity = warning +dotnet_code_quality.CA2234.api_surface = all + +# CA2235: Mark all non-serializable fields +dotnet_diagnostic.CA2235.severity = warning + +# CA2237: Mark ISerializable types with serializable +dotnet_diagnostic.CA2237.severity = warning + +# CA2241: Provide correct arguments to formatting methods +dotnet_diagnostic.CA2241.severity = warning +dotnet_code_quality.CA2241.additional_string_formatting_methods = +dotnet_code_quality.CA2241.try_determine_additional_string_formatting_methods_automatically = true + +# CA2242: Test for NaN correctly +dotnet_diagnostic.CA2242.severity = warning + +# CA2243: Attribute string literals should parse correctly +dotnet_diagnostic.CA2243.severity = warning + +# CA2244: Do not duplicate indexed element initializations +dotnet_diagnostic.CA2244.severity = warning + +# CA2245: Do not assign a property to itself +dotnet_diagnostic.CA2245.severity = warning + +# CA2246: Assigning symbol and its member in the same statement +dotnet_diagnostic.CA2246.severity = warning + +# CA2247: Argument passed to TaskCompletionSource constructor should be TaskCreationOptions enum instead of TaskContinuationOptions enum +dotnet_diagnostic.CA2247.severity = warning + +# CA2248: Provide correct 'enum' argument to 'Enum.HasFlag' +dotnet_diagnostic.CA2248.severity = warning + +# CA2249: Consider using 'string.Contains' instead of 'string.IndexOf' +dotnet_diagnostic.CA2249.severity = warning + +# CA2250: Use 'ThrowIfCancellationRequested' +dotnet_diagnostic.CA2250.severity = warning + +# CA2251: Use 'string.Equals' +dotnet_diagnostic.CA2251.severity = warning + +# CA2252: This API requires opting into preview features +dotnet_diagnostic.CA2252.severity = warning + +# CA2253: Named placeholders should not be numeric values +dotnet_diagnostic.CA2253.severity = warning + +# CA2254: Template should be a static expression +dotnet_diagnostic.CA2254.severity = warning + +# CA2255: The 'ModuleInitializer' attribute should not be used in libraries +dotnet_diagnostic.CA2255.severity = warning + +# CA2256: All members declared in parent interfaces must have an implementation in a DynamicInterfaceCastableImplementation-attributed interface +dotnet_diagnostic.CA2256.severity = warning + +# CA2257: Members defined on an interface with the 'DynamicInterfaceCastableImplementationAttribute' should be 'static' +dotnet_diagnostic.CA2257.severity = warning + +# CA2258: Providing a 'DynamicInterfaceCastableImplementation' interface in Visual Basic is unsupported +dotnet_diagnostic.CA2258.severity = warning + +# CA2300: Do not use insecure deserializer BinaryFormatter +dotnet_diagnostic.CA2300.severity = warning + +# CA2301: Do not call BinaryFormatter.Deserialize without first setting BinaryFormatter.Binder +dotnet_diagnostic.CA2301.severity = warning +dotnet_code_quality.CA2301.excluded_symbol_names = +dotnet_code_quality.CA2301.excluded_type_names_with_derived_types = + +# CA2302: Ensure BinaryFormatter.Binder is set before calling BinaryFormatter.Deserialize +dotnet_diagnostic.CA2302.severity = warning +dotnet_code_quality.CA2302.excluded_symbol_names = +dotnet_code_quality.CA2302.excluded_type_names_with_derived_types = + +# CA2305: Do not use insecure deserializer LosFormatter +dotnet_diagnostic.CA2305.severity = warning + +# CA2310: Do not use insecure deserializer NetDataContractSerializer +dotnet_diagnostic.CA2310.severity = warning + +# CA2311: Do not deserialize without first setting NetDataContractSerializer.Binder +dotnet_diagnostic.CA2311.severity = warning +dotnet_code_quality.CA2311.excluded_symbol_names = +dotnet_code_quality.CA2311.excluded_type_names_with_derived_types = + +# CA2312: Ensure NetDataContractSerializer.Binder is set before deserializing +dotnet_diagnostic.CA2312.severity = warning +dotnet_code_quality.CA2312.excluded_symbol_names = +dotnet_code_quality.CA2312.excluded_type_names_with_derived_types = + +# CA2315: Do not use insecure deserializer ObjectStateFormatter +dotnet_diagnostic.CA2315.severity = warning + +# CA2321: Do not deserialize with JavaScriptSerializer using a SimpleTypeResolver +dotnet_diagnostic.CA2321.severity = warning +dotnet_code_quality.CA2321.excluded_symbol_names = +dotnet_code_quality.CA2321.excluded_type_names_with_derived_types = + +# CA2322: Ensure JavaScriptSerializer is not initialized with SimpleTypeResolver before deserializing +dotnet_diagnostic.CA2322.severity = warning +dotnet_code_quality.CA2322.excluded_symbol_names = +dotnet_code_quality.CA2322.excluded_type_names_with_derived_types = + +# CA2326: Do not use TypeNameHandling values other than None +dotnet_diagnostic.CA2326.severity = warning + +# CA2327: Do not use insecure JsonSerializerSettings +dotnet_diagnostic.CA2327.severity = warning +dotnet_code_quality.CA2327.excluded_symbol_names = +dotnet_code_quality.CA2327.excluded_type_names_with_derived_types = + +# CA2328: Ensure that JsonSerializerSettings are secure +dotnet_diagnostic.CA2328.severity = warning +dotnet_code_quality.CA2328.excluded_symbol_names = +dotnet_code_quality.CA2328.excluded_type_names_with_derived_types = + +# CA2329: Do not deserialize with JsonSerializer using an insecure configuration +dotnet_diagnostic.CA2329.severity = warning +dotnet_code_quality.CA2329.excluded_symbol_names = +dotnet_code_quality.CA2329.excluded_type_names_with_derived_types = + +# CA2330: Ensure that JsonSerializer has a secure configuration when deserializing +dotnet_diagnostic.CA2330.severity = warning +dotnet_code_quality.CA2330.excluded_symbol_names = +dotnet_code_quality.CA2330.excluded_type_names_with_derived_types = + +# CA2350: Do not use DataTable.ReadXml() with untrusted data +dotnet_diagnostic.CA2350.severity = warning + +# CA2351: Do not use DataSet.ReadXml() with untrusted data +dotnet_diagnostic.CA2351.severity = warning + +# CA2352: Unsafe DataSet or DataTable in serializable type can be vulnerable to remote code execution attacks +dotnet_diagnostic.CA2352.severity = warning + +# CA2353: Unsafe DataSet or DataTable in serializable type +dotnet_diagnostic.CA2353.severity = warning + +# CA2354: Unsafe DataSet or DataTable in deserialized object graph can be vulnerable to remote code execution attacks +dotnet_diagnostic.CA2354.severity = warning + +# CA2355: Unsafe DataSet or DataTable type found in deserializable object graph +dotnet_diagnostic.CA2355.severity = warning + +# CA2356: Unsafe DataSet or DataTable type in web deserializable object graph +dotnet_diagnostic.CA2356.severity = warning + +# CA2361: Ensure auto-generated class containing DataSet.ReadXml() is not used with untrusted data +dotnet_diagnostic.CA2361.severity = warning + +# CA2362: Unsafe DataSet or DataTable in auto-generated serializable type can be vulnerable to remote code execution attacks +dotnet_diagnostic.CA2362.severity = warning + +# CA3001: Review code for SQL injection vulnerabilities +dotnet_diagnostic.CA3001.severity = warning +dotnet_code_quality.CA3001.excluded_symbol_names = +dotnet_code_quality.CA3001.excluded_type_names_with_derived_types = + +# CA3002: Review code for XSS vulnerabilities +dotnet_diagnostic.CA3002.severity = warning +dotnet_code_quality.CA3002.excluded_symbol_names = +dotnet_code_quality.CA3002.excluded_type_names_with_derived_types = + +# CA3003: Review code for file path injection vulnerabilities +dotnet_diagnostic.CA3003.severity = warning +dotnet_code_quality.CA3003.excluded_symbol_names = +dotnet_code_quality.CA3003.excluded_type_names_with_derived_types = + +# CA3004: Review code for information disclosure vulnerabilities +dotnet_diagnostic.CA3004.severity = warning +dotnet_code_quality.CA3004.excluded_symbol_names = +dotnet_code_quality.CA3004.excluded_type_names_with_derived_types = + +# CA3005: Review code for LDAP injection vulnerabilities +dotnet_diagnostic.CA3005.severity = warning +dotnet_code_quality.CA3005.excluded_symbol_names = +dotnet_code_quality.CA3005.excluded_type_names_with_derived_types = + +# CA3006: Review code for process command injection vulnerabilities +dotnet_diagnostic.CA3006.severity = warning +dotnet_code_quality.CA3006.excluded_symbol_names = +dotnet_code_quality.CA3006.excluded_type_names_with_derived_types = + +# CA3007: Review code for open redirect vulnerabilities +dotnet_diagnostic.CA3007.severity = warning +dotnet_code_quality.CA3007.excluded_symbol_names = +dotnet_code_quality.CA3007.excluded_type_names_with_derived_types = + +# CA3008: Review code for XPath injection vulnerabilities +dotnet_diagnostic.CA3008.severity = warning +dotnet_code_quality.CA3008.excluded_symbol_names = +dotnet_code_quality.CA3008.excluded_type_names_with_derived_types = + +# CA3009: Review code for XML injection vulnerabilities +dotnet_diagnostic.CA3009.severity = warning +dotnet_code_quality.CA3009.excluded_symbol_names = +dotnet_code_quality.CA3009.excluded_type_names_with_derived_types = + +# CA3010: Review code for XAML injection vulnerabilities +dotnet_diagnostic.CA3010.severity = warning +dotnet_code_quality.CA3010.excluded_symbol_names = +dotnet_code_quality.CA3010.excluded_type_names_with_derived_types = + +# CA3011: Review code for DLL injection vulnerabilities +dotnet_diagnostic.CA3011.severity = warning +dotnet_code_quality.CA3011.excluded_symbol_names = +dotnet_code_quality.CA3011.excluded_type_names_with_derived_types = + +# CA3012: Review code for regex injection vulnerabilities +dotnet_diagnostic.CA3012.severity = warning +dotnet_code_quality.CA3012.excluded_symbol_names = +dotnet_code_quality.CA3012.excluded_type_names_with_derived_types = + +# CA3061: Do Not Add Schema By URL +dotnet_diagnostic.CA3061.severity = warning + +# CA3075: Insecure DTD processing in XML +dotnet_diagnostic.CA3075.severity = warning + +# CA3076: Insecure XSLT script processing. +dotnet_diagnostic.CA3076.severity = warning + +# CA3077: Insecure Processing in API Design, XmlDocument and XmlTextReader +dotnet_diagnostic.CA3077.severity = warning + +# CA3147: Mark Verb Handlers With Validate Antiforgery Token +dotnet_diagnostic.CA3147.severity = warning + +# CA5350: Do Not Use Weak Cryptographic Algorithms +dotnet_diagnostic.CA5350.severity = warning + +# CA5351: Do Not Use Broken Cryptographic Algorithms +dotnet_diagnostic.CA5351.severity = warning + +# CA5358: Review cipher mode usage with cryptography experts +dotnet_diagnostic.CA5358.severity = warning + +# CA5359: Do Not Disable Certificate Validation +dotnet_diagnostic.CA5359.severity = warning + +# CA5360: Do Not Call Dangerous Methods In Deserialization +dotnet_diagnostic.CA5360.severity = warning + +# CA5361: Do Not Disable SChannel Use of Strong Crypto +dotnet_diagnostic.CA5361.severity = warning +dotnet_code_quality.CA5361.excluded_symbol_names = +dotnet_code_quality.CA5361.excluded_type_names_with_derived_types = + +# CA5362: Potential reference cycle in deserialized object graph +dotnet_diagnostic.CA5362.severity = warning + +# CA5363: Do Not Disable Request Validation +dotnet_diagnostic.CA5363.severity = warning + +# CA5364: Do Not Use Deprecated Security Protocols +dotnet_diagnostic.CA5364.severity = warning + +# CA5365: Do Not Disable HTTP Header Checking +dotnet_diagnostic.CA5365.severity = warning + +# CA5366: Use XmlReader for 'DataSet.ReadXml()' +dotnet_diagnostic.CA5366.severity = warning + +# CA5367: Do Not Serialize Types With Pointer Fields +dotnet_diagnostic.CA5367.severity = warning + +# CA5368: Set ViewStateUserKey For Classes Derived From Page +dotnet_diagnostic.CA5368.severity = warning + +# CA5369: Use XmlReader for 'XmlSerializer.Deserialize()' +dotnet_diagnostic.CA5369.severity = warning + +# CA5370: Use XmlReader for XmlValidatingReader constructor +dotnet_diagnostic.CA5370.severity = warning + +# CA5371: Use XmlReader for 'XmlSchema.Read()' +dotnet_diagnostic.CA5371.severity = warning + +# CA5372: Use XmlReader for XPathDocument constructor +dotnet_diagnostic.CA5372.severity = warning + +# CA5373: Do not use obsolete key derivation function +dotnet_diagnostic.CA5373.severity = warning + +# CA5374: Do Not Use XslTransform +dotnet_diagnostic.CA5374.severity = warning + +# CA5375: Do Not Use Account Shared Access Signature +dotnet_diagnostic.CA5375.severity = warning + +# CA5376: Use SharedAccessProtocol HttpsOnly +dotnet_diagnostic.CA5376.severity = warning +dotnet_code_quality.CA5376.excluded_symbol_names = +dotnet_code_quality.CA5376.excluded_type_names_with_derived_types = + +# CA5377: Use Container Level Access Policy +dotnet_diagnostic.CA5377.severity = warning +dotnet_code_quality.CA5377.excluded_symbol_names = +dotnet_code_quality.CA5377.excluded_type_names_with_derived_types = + +# CA5378: Do not disable ServicePointManagerSecurityProtocols +dotnet_diagnostic.CA5378.severity = warning +dotnet_code_quality.CA5378.excluded_symbol_names = +dotnet_code_quality.CA5378.excluded_type_names_with_derived_types = + +# CA5379: Ensure Key Derivation Function algorithm is sufficiently strong +dotnet_diagnostic.CA5379.severity = warning + +# CA5380: Do Not Add Certificates To Root Store +dotnet_diagnostic.CA5380.severity = warning +dotnet_code_quality.CA5380.excluded_symbol_names = +dotnet_code_quality.CA5380.excluded_type_names_with_derived_types = + +# CA5381: Ensure Certificates Are Not Added To Root Store +dotnet_diagnostic.CA5381.severity = warning +dotnet_code_quality.CA5381.excluded_symbol_names = +dotnet_code_quality.CA5381.excluded_type_names_with_derived_types = + +# CA5382: Use Secure Cookies In ASP.Net Core +dotnet_diagnostic.CA5382.severity = warning +dotnet_code_quality.CA5382.excluded_symbol_names = +dotnet_code_quality.CA5382.excluded_type_names_with_derived_types = + +# CA5383: Ensure Use Secure Cookies In ASP.Net Core +dotnet_diagnostic.CA5383.severity = warning +dotnet_code_quality.CA5383.excluded_symbol_names = +dotnet_code_quality.CA5383.excluded_type_names_with_derived_types = + +# CA5384: Do Not Use Digital Signature Algorithm (DSA) +dotnet_diagnostic.CA5384.severity = warning +dotnet_code_quality.CA5384.excluded_symbol_names = +dotnet_code_quality.CA5384.excluded_type_names_with_derived_types = + +# CA5385: Use Rivest�Shamir�Adleman (RSA) Algorithm With Sufficient Key Size +dotnet_diagnostic.CA5385.severity = warning + +# CA5386: Avoid hardcoding SecurityProtocolType value +dotnet_diagnostic.CA5386.severity = warning + +# CA5387: Do Not Use Weak Key Derivation Function With Insufficient Iteration Count +dotnet_diagnostic.CA5387.severity = warning +dotnet_code_quality.CA5387.excluded_symbol_names = +dotnet_code_quality.CA5387.excluded_type_names_with_derived_types = + +# CA5388: Ensure Sufficient Iteration Count When Using Weak Key Derivation Function +dotnet_diagnostic.CA5388.severity = warning +dotnet_code_quality.CA5388.excluded_symbol_names = +dotnet_code_quality.CA5388.excluded_type_names_with_derived_types = + +# CA5389: Do Not Add Archive Item's Path To The Target File System Path +dotnet_diagnostic.CA5389.severity = warning +dotnet_code_quality.CA5389.excluded_symbol_names = +dotnet_code_quality.CA5389.excluded_type_names_with_derived_types = + +# CA5390: Do not hard-code encryption key +dotnet_diagnostic.CA5390.severity = warning +dotnet_code_quality.CA5390.excluded_symbol_names = +dotnet_code_quality.CA5390.excluded_type_names_with_derived_types = + +# CA5391: Use antiforgery tokens in ASP.NET Core MVC controllers +dotnet_diagnostic.CA5391.severity = warning +dotnet_code_quality.CA5391.exclude_aspnet_core_mvc_controllerbase = false + +# CA5392: Use DefaultDllImportSearchPaths attribute for P/Invokes +dotnet_diagnostic.CA5392.severity = warning + +# CA5393: Do not use unsafe DllImportSearchPath value +dotnet_diagnostic.CA5393.severity = warning +dotnet_code_quality.CA5393.unsafe_DllImportSearchPath_bits = 770 + +# CA5394: Do not use insecure randomness +dotnet_diagnostic.CA5394.severity = warning + +# CA5395: Miss HttpVerb attribute for action methods +dotnet_diagnostic.CA5395.severity = warning + +# CA5396: Set HttpOnly to true for HttpCookie +dotnet_diagnostic.CA5396.severity = warning + +# CA5397: Do not use deprecated SslProtocols values +dotnet_diagnostic.CA5397.severity = warning + +# CA5398: Avoid hardcoded SslProtocols values +dotnet_diagnostic.CA5398.severity = warning + +# CA5399: HttpClients should enable certificate revocation list checks +dotnet_diagnostic.CA5399.severity = warning +dotnet_code_quality.CA5399.excluded_symbol_names = +dotnet_code_quality.CA5399.excluded_type_names_with_derived_types = + +# CA5400: Ensure HttpClient certificate revocation list check is not disabled +dotnet_diagnostic.CA5400.severity = warning +dotnet_code_quality.CA5400.excluded_symbol_names = +dotnet_code_quality.CA5400.excluded_type_names_with_derived_types = + +# CA5401: Do not use CreateEncryptor with non-default IV +dotnet_diagnostic.CA5401.severity = warning + +# CA5402: Use CreateEncryptor with the default IV +dotnet_diagnostic.CA5402.severity = warning + +# CA5403: Do not hard-code certificate +dotnet_diagnostic.CA5403.severity = warning + +# CA5404: Do not disable token validation checks +dotnet_diagnostic.CA5404.severity = warning + +# CA5405: Do not always skip token validation in delegates +dotnet_diagnostic.CA5405.severity = warning + +# IL3000: Avoid using accessing Assembly file path when publishing as a single-file +dotnet_diagnostic.IL3000.severity = warning + +# IL3001: Avoid using accessing Assembly file path when publishing as a single-file +dotnet_diagnostic.IL3001.severity = warning + +# IL3002: Avoid calling members annotated with 'RequiresAssemblyFilesAttribute' when publishing as a single file +dotnet_diagnostic.IL3002.severity = warning + +# IL3003: 'RequiresAssemblyFilesAttribute' annotations must match across all interface implementations or overrides. +dotnet_diagnostic.IL3003.severity = warning + +## SonarAnalyzer.CSharp + +# S2551: Shared resources should not be used for locking +dotnet_diagnostic.S2551.severity = warning + +# S3885: "Assembly.Load" should be used +dotnet_diagnostic.S3885.severity = warning + +# S3400: Methods should not return constants +dotnet_diagnostic.S3400.severity = warning + +# S3884: "CoSetProxyBlanket" and "CoInitializeSecurity" should not be used +dotnet_diagnostic.S3884.severity = warning + +# S3887: Mutable, non-private fields should not be "readonly" +dotnet_diagnostic.S3887.severity = warning + +# S1104: Fields should not have public accessibility +dotnet_diagnostic.S1104.severity = warning + +# S1699: Constructors should only call non-overridable methods +dotnet_diagnostic.S1699.severity = warning + +# S1215: "GC.Collect" should not be called +dotnet_diagnostic.S1215.severity = warning + +# S3998: Threads should not lock on objects with weak identity +dotnet_diagnostic.S3998.severity = warning + +# S3877: Exceptions should not be thrown from unexpected methods +dotnet_diagnostic.S3877.severity = warning +dotnet_diagnostic.S2306.severity = warning +dotnet_diagnostic.S1450.severity = warning +dotnet_diagnostic.S1210.severity = warning +dotnet_diagnostic.S3871.severity = warning +dotnet_diagnostic.S3875.severity = warning +dotnet_diagnostic.S2291.severity = warning +dotnet_diagnostic.S2290.severity = warning +dotnet_diagnostic.S3261.severity = warning +dotnet_diagnostic.S2292.severity = warning +dotnet_diagnostic.S3263.severity = warning +dotnet_diagnostic.S3262.severity = warning +dotnet_diagnostic.S2737.severity = silent +dotnet_diagnostic.S3265.severity = warning +dotnet_diagnostic.S101.severity = warning +dotnet_diagnostic.S3264.severity = warning +dotnet_diagnostic.S2178.severity = warning +dotnet_diagnostic.S2971.severity = warning +dotnet_diagnostic.S1764.severity = warning +dotnet_diagnostic.S1643.severity = warning +dotnet_diagnostic.S4220.severity = warning +dotnet_diagnostic.S3010.severity = warning +dotnet_diagnostic.S4581.severity = warning +dotnet_diagnostic.S3251.severity = warning +dotnet_diagnostic.S4586.severity = warning +dotnet_diagnostic.S1075.severity = warning +dotnet_diagnostic.S3011.severity = warning +dotnet_diagnostic.S3256.severity = warning +dotnet_diagnostic.S3376.severity = warning +dotnet_diagnostic.S1871.severity = warning +dotnet_diagnostic.S1751.severity = warning +dotnet_diagnostic.S2190.severity = warning +dotnet_diagnostic.S3966.severity = warning +dotnet_diagnostic.S3603.severity = warning +dotnet_diagnostic.S2997.severity = warning +dotnet_diagnostic.S3604.severity = warning +dotnet_diagnostic.S2757.severity = warning +dotnet_diagnostic.S2077.severity = warning +dotnet_diagnostic.S3168.severity = warning +dotnet_diagnostic.S4015.severity = warning +dotnet_diagnostic.S3169.severity = warning +dotnet_diagnostic.S4019.severity = warning +dotnet_diagnostic.S2996.severity = warning +dotnet_diagnostic.S3963.severity = warning +dotnet_diagnostic.S3600.severity = warning +dotnet_diagnostic.S2995.severity = warning +dotnet_diagnostic.S108.severity = warning +dotnet_diagnostic.S107.severity = none +dotnet_diagnostic.S2183.severity = warning +dotnet_diagnostic.S2184.severity = warning +dotnet_diagnostic.S907.severity = warning +dotnet_diagnostic.S1656.severity = warning +dotnet_diagnostic.S3397.severity = warning +dotnet_diagnostic.S2187.severity = warning +dotnet_diagnostic.S112.severity = warning +dotnet_diagnostic.S2068.severity = warning +dotnet_diagnostic.S110.severity = warning +dotnet_diagnostic.S2743.severity = warning +dotnet_diagnostic.S4792.severity = warning +dotnet_diagnostic.S2372.severity = warning +dotnet_diagnostic.S4790.severity = warning +dotnet_diagnostic.S818.severity = warning +dotnet_diagnostic.S2934.severity = warning +dotnet_diagnostic.S2933.severity = warning +dotnet_diagnostic.S3904.severity = warning +dotnet_diagnostic.S3903.severity = warning +dotnet_diagnostic.S1848.severity = warning +dotnet_diagnostic.S1607.severity = warning +dotnet_diagnostic.S1163.severity = warning +dotnet_diagnostic.S3220.severity = warning +dotnet_diagnostic.S4433.severity = warning +dotnet_diagnostic.S2376.severity = warning +dotnet_diagnostic.S3343.severity = warning +dotnet_diagnostic.S3464.severity = warning +dotnet_diagnostic.S3346.severity = warning +dotnet_diagnostic.S3466.severity = warning +dotnet_diagnostic.S1168.severity = warning +dotnet_diagnostic.S2930.severity = warning +dotnet_diagnostic.S1048.severity = warning +dotnet_diagnostic.S2259.severity = warning +dotnet_diagnostic.S3450.severity = warning +dotnet_diagnostic.S125.severity = warning +dotnet_diagnostic.S927.severity = warning +dotnet_diagnostic.S3218.severity = warning +dotnet_diagnostic.S3217.severity = warning +dotnet_diagnostic.S3459.severity = none +dotnet_diagnostic.S4428.severity = warning +dotnet_diagnostic.S3330.severity = warning +dotnet_diagnostic.S3451.severity = warning +dotnet_diagnostic.S2486.severity = warning +dotnet_diagnostic.S2365.severity = warning +dotnet_diagnostic.S2123.severity = warning +dotnet_diagnostic.S3453.severity = warning +dotnet_diagnostic.S1155.severity = warning +dotnet_diagnostic.S3456.severity = warning +dotnet_diagnostic.S4426.severity = warning +dotnet_diagnostic.S2245.severity = warning +dotnet_diagnostic.S3458.severity = warning +dotnet_diagnostic.S2368.severity = warning +dotnet_diagnostic.S3457.severity = warning +dotnet_diagnostic.S3241.severity = warning +dotnet_diagnostic.S2953.severity = warning +dotnet_diagnostic.S3923.severity = warning +dotnet_diagnostic.S3926.severity = warning +dotnet_diagnostic.S3925.severity = warning +dotnet_diagnostic.S3928.severity = warning +dotnet_diagnostic.S3927.severity = warning +dotnet_diagnostic.S1185.severity = warning +dotnet_diagnostic.S2275.severity = warning +dotnet_diagnostic.S1186.severity = warning +dotnet_diagnostic.S1066.severity = none +dotnet_diagnostic.S4210.severity = warning +dotnet_diagnostic.S3244.severity = warning +dotnet_diagnostic.S4211.severity = warning +dotnet_diagnostic.S3247.severity = warning +dotnet_diagnostic.S3005.severity = warning +dotnet_diagnostic.S3246.severity = warning +dotnet_diagnostic.S1862.severity = warning +dotnet_diagnostic.S3249.severity = warning +dotnet_diagnostic.S4456.severity = warning +dotnet_diagnostic.S4214.severity = warning +dotnet_diagnostic.S4457.severity = warning +dotnet_diagnostic.S1172.severity = warning +dotnet_diagnostic.S1854.severity = warning +dotnet_diagnostic.S3597.severity = warning +dotnet_diagnostic.S2386.severity = warning +dotnet_diagnostic.S4200.severity = warning +dotnet_diagnostic.S3236.severity = warning +dotnet_diagnostic.S3598.severity = warning +dotnet_diagnostic.S3358.severity = warning +dotnet_diagnostic.S3237.severity = warning +dotnet_diagnostic.S4070.severity = warning +dotnet_diagnostic.S5042.severity = warning +dotnet_diagnostic.S1481.severity = warning +dotnet_diagnostic.S3427.severity = warning +dotnet_diagnostic.S1006.severity = warning +dotnet_diagnostic.S2219.severity = warning +dotnet_diagnostic.S2692.severity = warning +dotnet_diagnostic.S1121.severity = warning +dotnet_diagnostic.S1123.severity = warning +dotnet_diagnostic.S2696.severity = warning +dotnet_diagnostic.S1125.severity = warning +dotnet_diagnostic.S2699.severity = warning +dotnet_diagnostic.S4061.severity = warning +dotnet_diagnostic.S1905.severity = warning +dotnet_diagnostic.S1116.severity = warning +dotnet_diagnostic.S1479.severity = warning +dotnet_diagnostic.S3415.severity = warning +dotnet_diagnostic.S2326.severity = warning +dotnet_diagnostic.S4507.severity = warning +dotnet_diagnostic.S1117.severity = warning +dotnet_diagnostic.S1118.severity = warning +dotnet_diagnostic.S2328.severity = warning +dotnet_diagnostic.S2681.severity = warning +dotnet_diagnostic.S1110.severity = warning +dotnet_diagnostic.S2201.severity = warning +dotnet_diagnostic.S2688.severity = warning +dotnet_diagnostic.S3897.severity = warning +dotnet_diagnostic.S3776.severity = warning +dotnet_diagnostic.S3655.severity = warning +dotnet_diagnostic.S1939.severity = warning +dotnet_diagnostic.S3449.severity = warning +dotnet_diagnostic.S1944.severity = warning +dotnet_diagnostic.S3440.severity = warning +dotnet_diagnostic.S3443.severity = warning +dotnet_diagnostic.S1264.severity = warning +dotnet_diagnostic.S3442.severity = warning +dotnet_diagnostic.S1144.severity = warning +dotnet_diagnostic.S2114.severity = warning +dotnet_diagnostic.S3445.severity = warning +dotnet_diagnostic.S3444.severity = warning +dotnet_diagnostic.S2234.severity = warning +dotnet_diagnostic.S3447.severity = warning +dotnet_diagnostic.S1940.severity = warning +dotnet_diagnostic.S2583.severity = warning +dotnet_diagnostic.S2342.severity = warning +dotnet_diagnostic.S1134.severity = warning +dotnet_diagnostic.S4524.severity = warning +dotnet_diagnostic.S2345.severity = warning + +# S1135: Track uses of "TODO" tags +dotnet_diagnostic.S1135.severity = suggestion +dotnet_diagnostic.S2344.severity = warning +dotnet_diagnostic.S2223.severity = warning +dotnet_diagnostic.S3433.severity = warning +dotnet_diagnostic.S2589.severity = warning +dotnet_diagnostic.S2346.severity = warning +dotnet_diagnostic.S2225.severity = warning +dotnet_diagnostic.S4583.severity = warning +dotnet_diagnostic.S1199.severity = warning +dotnet_diagnostic.S4136.severity = warning +dotnet_diagnostic.S2252.severity = warning +dotnet_diagnostic.S4201.severity = warning +dotnet_diagnostic.S5034.severity = warning +dotnet_diagnostic.S4830.severity = warning +dotnet_diagnostic.S2857.severity = warning +dotnet_diagnostic.S4487.severity = warning +dotnet_diagnostic.S2251.severity = warning +dotnet_diagnostic.S5542.severity = warning +dotnet_diagnostic.S5547.severity = warning +dotnet_diagnostic.S4635.severity = warning +dotnet_diagnostic.S2479.severity = warning +dotnet_diagnostic.S2092.severity = warning +dotnet_diagnostic.S3060.severity = warning +dotnet_diagnostic.S4275.severity = warning +dotnet_diagnostic.S3869.severity = warning +dotnet_diagnostic.S1206.severity = warning +dotnet_diagnostic.S3626.severity = warning +dotnet_diagnostic.S4035.severity = warning +dotnet_diagnostic.S4158.severity = warning +dotnet_diagnostic.S3981.severity = warning +dotnet_diagnostic.S4277.severity = warning +dotnet_diagnostic.S3984.severity = warning +dotnet_diagnostic.S4159.severity = warning +dotnet_diagnostic.S4260.severity = warning +dotnet_diagnostic.S3172.severity = warning +dotnet_diagnostic.S4143.severity = warning +dotnet_diagnostic.S3971.severity = warning +dotnet_diagnostic.S4144.severity = warning +dotnet_diagnostic.S2761.severity = warning +dotnet_diagnostic.S3973.severity = warning +dotnet_diagnostic.S2755.severity = warning +dotnet_diagnostic.S5659.severity = warning +dotnet_diagnostic.S3610.severity = warning +dotnet_diagnostic.S3972.severity = warning +dotnet_diagnostic.S1313.severity = warning +dotnet_diagnostic.S2437.severity = warning +dotnet_diagnostic.S3889.severity = warning +dotnet_diagnostic.S2436.severity = warning +dotnet_diagnostic.S3881.severity = warning +dotnet_diagnostic.S3260.severity = warning +dotnet_diagnostic.S3267.severity = warning +dotnet_diagnostic.S5766.severity = warning +dotnet_diagnostic.S5773.severity = warning +dotnet_diagnostic.S2053.severity = warning +dotnet_diagnostic.S4036.severity = warning +dotnet_diagnostic.S5332.severity = warning +dotnet_diagnostic.S5753.severity = warning +dotnet_diagnostic.S4423.severity = warning +dotnet_diagnostic.S2257.severity = warning +dotnet_diagnostic.S3329.severity = warning +dotnet_diagnostic.S5122.severity = warning +dotnet_diagnostic.S5445.severity = warning +dotnet_diagnostic.S5693.severity = warning +dotnet_diagnostic.S5443.severity = warning +dotnet_diagnostic.S2612.severity = warning +dotnet_diagnostic.S4502.severity = warning +dotnet_diagnostic.S2115.severity = warning +dotnet_diagnostic.S4039.severity = none +dotnet_diagnostic.S3052.severity = none +dotnet_diagnostic.S4022.severity = none +dotnet_diagnostic.S4261.severity = none +dotnet_diagnostic.S4023.severity = none +dotnet_diagnostic.S4026.severity = none +dotnet_diagnostic.S4025.severity = none +dotnet_diagnostic.S4027.severity = none +dotnet_diagnostic.S3059.severity = none +dotnet_diagnostic.S4050.severity = none +dotnet_diagnostic.S4052.severity = none +dotnet_diagnostic.S4055.severity = none +dotnet_diagnostic.S4057.severity = none +dotnet_diagnostic.S4056.severity = none +dotnet_diagnostic.S4059.severity = none +dotnet_diagnostic.S4058.severity = none +dotnet_diagnostic.S4040.severity = none +dotnet_diagnostic.S4041.severity = none +dotnet_diagnostic.S4047.severity = none +dotnet_diagnostic.S4049.severity = none +dotnet_diagnostic.S100.severity = none +dotnet_diagnostic.S1192.severity = none +dotnet_diagnostic.S4462.severity = none +dotnet_diagnostic.S3254.severity = none +dotnet_diagnostic.S3253.severity = none +dotnet_diagnostic.S3257.severity = none +dotnet_diagnostic.S4225.severity = none +dotnet_diagnostic.S4226.severity = none +dotnet_diagnostic.S113.severity = none +dotnet_diagnostic.S122.severity = none +dotnet_diagnostic.S2197.severity = none +dotnet_diagnostic.S121.severity = none +dotnet_diagnostic.S4017.severity = none +dotnet_diagnostic.S4016.severity = none +dotnet_diagnostic.S4018.severity = none +dotnet_diagnostic.S109.severity = none +dotnet_diagnostic.S106.severity = none +dotnet_diagnostic.S104.severity = none +dotnet_diagnostic.S105.severity = none +dotnet_diagnostic.S4000.severity = none +dotnet_diagnostic.S103.severity = none +dotnet_diagnostic.S4002.severity = none +dotnet_diagnostic.S4004.severity = none +dotnet_diagnostic.S4005.severity = none +dotnet_diagnostic.S138.severity = none +dotnet_diagnostic.S3900.severity = none +dotnet_diagnostic.S2931.severity = none +dotnet_diagnostic.S3902.severity = none +dotnet_diagnostic.S3906.severity = none +dotnet_diagnostic.S126.severity = none +dotnet_diagnostic.S127.severity = none +dotnet_diagnostic.S134.severity = none +dotnet_diagnostic.S131.severity = none +dotnet_diagnostic.S2955.severity = none +dotnet_diagnostic.S2952.severity = none +dotnet_diagnostic.S3908.severity = none +dotnet_diagnostic.S3909.severity = none +dotnet_diagnostic.S2701.severity = none +dotnet_diagnostic.S1858.severity = none +dotnet_diagnostic.S4060.severity = none +dotnet_diagnostic.S4069.severity = none +dotnet_diagnostic.S1821.severity = none +dotnet_diagnostic.S4834.severity = none +dotnet_diagnostic.S1449.severity = none +dotnet_diagnostic.S1200.severity = none +dotnet_diagnostic.S4823.severity = none +dotnet_diagnostic.S4829.severity = none +dotnet_diagnostic.S2760.severity = none +dotnet_diagnostic.S1226.severity = none +dotnet_diagnostic.S1227.severity = none +dotnet_diagnostic.S1109.severity = none +dotnet_diagnostic.S3880.severity = none +dotnet_diagnostic.S2674.severity = none +dotnet_diagnostic.S3990.severity = none +dotnet_diagnostic.S1451.severity = none +dotnet_diagnostic.S3872.severity = none +dotnet_diagnostic.S3993.severity = none +dotnet_diagnostic.S1694.severity = none +dotnet_diagnostic.S3992.severity = none +dotnet_diagnostic.S3874.severity = none +dotnet_diagnostic.S3995.severity = none +dotnet_diagnostic.S1696.severity = none +dotnet_diagnostic.S3994.severity = none +dotnet_diagnostic.S3876.severity = none +dotnet_diagnostic.S3997.severity = none +dotnet_diagnostic.S2302.severity = none +dotnet_diagnostic.S1698.severity = none +dotnet_diagnostic.S3996.severity = none +dotnet_diagnostic.S3949.severity = none +dotnet_diagnostic.S3937.severity = none +dotnet_diagnostic.S1994.severity = none +dotnet_diagnostic.S3967.severity = none +dotnet_diagnostic.S4818.severity = none +dotnet_diagnostic.S1309.severity = none +dotnet_diagnostic.S1541.severity = none +dotnet_diagnostic.S3962.severity = none +dotnet_diagnostic.S1301.severity = none +dotnet_diagnostic.S3956.severity = none +dotnet_diagnostic.S1659.severity = none +dotnet_diagnostic.S3717.severity = none +dotnet_diagnostic.S2255.severity = none +dotnet_diagnostic.S2360.severity = none +dotnet_diagnostic.S1151.severity = none +dotnet_diagnostic.S4784.severity = none +dotnet_diagnostic.S3216.severity = none +dotnet_diagnostic.S3215.severity = none +dotnet_diagnostic.S4787.severity = none +dotnet_diagnostic.S3240.severity = none +dotnet_diagnostic.S4212.severity = none +dotnet_diagnostic.S3242.severity = none +dotnet_diagnostic.S2156.severity = none +dotnet_diagnostic.S3366.severity = none +dotnet_diagnostic.S1067.severity = none +dotnet_diagnostic.S4564.severity = none +dotnet_diagnostic.S3353.severity = none +dotnet_diagnostic.S2387.severity = none +dotnet_diagnostic.S3234.severity = none +dotnet_diagnostic.S3235.severity = none +dotnet_diagnostic.S2148.severity = none +dotnet_diagnostic.S1128.severity = none +dotnet_diagnostic.S2339.severity = none +dotnet_diagnostic.S2330.severity = none +dotnet_diagnostic.S1244.severity = none +dotnet_diagnostic.S2333.severity = none +dotnet_diagnostic.S2327.severity = none +dotnet_diagnostic.S3532.severity = none +dotnet_diagnostic.S2325.severity = none +dotnet_diagnostic.S3898.severity = none +dotnet_diagnostic.S881.severity = none +dotnet_diagnostic.S3441.severity = none +dotnet_diagnostic.S1147.severity = none +dotnet_diagnostic.S2357.severity = none +dotnet_diagnostic.S2228.severity = none +dotnet_diagnostic.S2221.severity = none +dotnet_diagnostic.S3431.severity = none + +## StyleCop.Analyzers +dotnet_diagnostic.SA0001.severity = none +dotnet_diagnostic.SA0002.severity = error +dotnet_diagnostic.SA1000.severity = none +dotnet_diagnostic.SA1001.severity = error +dotnet_diagnostic.SA1002.severity = error +dotnet_diagnostic.SA1003.severity = error +dotnet_diagnostic.SA1004.severity = error +dotnet_diagnostic.SA1005.severity = error +dotnet_diagnostic.SA1006.severity = error +dotnet_diagnostic.SA1007.severity = error +dotnet_diagnostic.SA1008.severity = error +dotnet_diagnostic.SA1009.severity = error +dotnet_diagnostic.SA1010.severity = error +dotnet_diagnostic.SA1011.severity = error +dotnet_diagnostic.SA1012.severity = error +dotnet_diagnostic.SA1013.severity = error +dotnet_diagnostic.SA1014.severity = error +dotnet_diagnostic.SA1015.severity = error +dotnet_diagnostic.SA1016.severity = error +dotnet_diagnostic.SA1017.severity = error +dotnet_diagnostic.SA1018.severity = error +dotnet_diagnostic.SA1019.severity = error +dotnet_diagnostic.SA1020.severity = error +dotnet_diagnostic.SA1021.severity = error +dotnet_diagnostic.SA1022.severity = error +dotnet_diagnostic.SA1023.severity = error +dotnet_diagnostic.SA1024.severity = error +dotnet_diagnostic.SA1025.severity = error +dotnet_diagnostic.SA1026.severity = error +dotnet_diagnostic.SA1027.severity = error +dotnet_diagnostic.SA1028.severity = error +dotnet_diagnostic.SA1100.severity = error +dotnet_diagnostic.SA1101.severity = error +dotnet_diagnostic.SA1102.severity = error +dotnet_diagnostic.SA1103.severity = error +dotnet_diagnostic.SA1104.severity = error +dotnet_diagnostic.SA1105.severity = error +dotnet_diagnostic.SA1106.severity = error +dotnet_diagnostic.SA1107.severity = error +dotnet_diagnostic.SA1108.severity = error +dotnet_diagnostic.SA1109.severity = error +dotnet_diagnostic.SA1110.severity = error +dotnet_diagnostic.SA1111.severity = error +dotnet_diagnostic.SA1112.severity = error +dotnet_diagnostic.SA1113.severity = error +dotnet_diagnostic.SA1114.severity = error +dotnet_diagnostic.SA1115.severity = error +dotnet_diagnostic.SA1116.severity = error +dotnet_diagnostic.SA1117.severity = error +dotnet_diagnostic.SA1118.severity = error +dotnet_diagnostic.SA1119.severity = error +dotnet_diagnostic.SA1120.severity = error +dotnet_diagnostic.SA1121.severity = error +dotnet_diagnostic.SA1122.severity = error +dotnet_diagnostic.SA1123.severity = error +dotnet_diagnostic.SA1124.severity = error +dotnet_diagnostic.SA1125.severity = error +dotnet_diagnostic.SA1126.severity = error +dotnet_diagnostic.SA1127.severity = error +dotnet_diagnostic.SA1128.severity = error +dotnet_diagnostic.SA1129.severity = error +dotnet_diagnostic.SA1130.severity = error +dotnet_diagnostic.SA1131.severity = error +dotnet_diagnostic.SA1132.severity = error +dotnet_diagnostic.SA1133.severity = error +dotnet_diagnostic.SA1134.severity = error +dotnet_diagnostic.SA1135.severity = error +dotnet_diagnostic.SA1136.severity = error +dotnet_diagnostic.SA1137.severity = error +dotnet_diagnostic.SA1139.severity = error +dotnet_diagnostic.SA1141.severity = error +dotnet_diagnostic.SA1142.severity = error +dotnet_diagnostic.SA1200.severity = error +dotnet_diagnostic.SA1201.severity = error +dotnet_diagnostic.SA1202.severity = error +dotnet_diagnostic.SA1203.severity = error +dotnet_diagnostic.SA1204.severity = error +dotnet_diagnostic.SA1205.severity = error +dotnet_diagnostic.SA1206.severity = error +dotnet_diagnostic.SA1207.severity = error +dotnet_diagnostic.SA1208.severity = error +dotnet_diagnostic.SA1209.severity = error +dotnet_diagnostic.SA1210.severity = error +dotnet_diagnostic.SA1211.severity = error +dotnet_diagnostic.SA1212.severity = error +dotnet_diagnostic.SA1213.severity = error +dotnet_diagnostic.SA1214.severity = error +dotnet_diagnostic.SA1215.severity = error +dotnet_diagnostic.SA1216.severity = error +dotnet_diagnostic.SA1217.severity = error +dotnet_diagnostic.SA1300.severity = error +dotnet_diagnostic.SA1301.severity = error +dotnet_diagnostic.SA1302.severity = error +dotnet_diagnostic.SA1303.severity = error +dotnet_diagnostic.SA1304.severity = error +dotnet_diagnostic.SA1305.severity = error +dotnet_diagnostic.SA1306.severity = error +dotnet_diagnostic.SA1307.severity = error +dotnet_diagnostic.SA1308.severity = error +dotnet_diagnostic.SA1309.severity = none +dotnet_diagnostic.SA1310.severity = error +dotnet_diagnostic.SA1311.severity = error +dotnet_diagnostic.SA1312.severity = error +dotnet_diagnostic.SA1313.severity = error +dotnet_diagnostic.SA1314.severity = error +dotnet_diagnostic.SA1316.severity = error +dotnet_diagnostic.SA1400.severity = error +dotnet_diagnostic.SA1401.severity = error +dotnet_diagnostic.SA1402.severity = error +dotnet_diagnostic.SA1403.severity = error +dotnet_diagnostic.SA1404.severity = error +dotnet_diagnostic.SA1405.severity = error +dotnet_diagnostic.SA1406.severity = error +dotnet_diagnostic.SA1407.severity = error +dotnet_diagnostic.SA1408.severity = error +dotnet_diagnostic.SA1409.severity = error +dotnet_diagnostic.SA1410.severity = error +dotnet_diagnostic.SA1411.severity = error +dotnet_diagnostic.SA1412.severity = none +dotnet_diagnostic.SA1413.severity = error +dotnet_diagnostic.SA1414.severity = error +dotnet_diagnostic.SA1500.severity = error +dotnet_diagnostic.SA1501.severity = error +dotnet_diagnostic.SA1502.severity = error +dotnet_diagnostic.SA1503.severity = error +dotnet_diagnostic.SA1504.severity = error +dotnet_diagnostic.SA1505.severity = error +dotnet_diagnostic.SA1506.severity = error +dotnet_diagnostic.SA1507.severity = error +dotnet_diagnostic.SA1508.severity = error +dotnet_diagnostic.SA1509.severity = error +dotnet_diagnostic.SA1510.severity = error +dotnet_diagnostic.SA1511.severity = error +dotnet_diagnostic.SA1512.severity = error +dotnet_diagnostic.SA1513.severity = error +dotnet_diagnostic.SA1514.severity = error +dotnet_diagnostic.SA1515.severity = error +dotnet_diagnostic.SA1516.severity = error +dotnet_diagnostic.SA1517.severity = error +dotnet_diagnostic.SA1518.severity = error +dotnet_diagnostic.SA1519.severity = error +dotnet_diagnostic.SA1520.severity = error +dotnet_diagnostic.SA1600.severity = none +dotnet_diagnostic.SA1601.severity = none +dotnet_diagnostic.SA1602.severity = error +dotnet_diagnostic.SA1603.severity = error +dotnet_diagnostic.SA1604.severity = error +dotnet_diagnostic.SA1605.severity = error +dotnet_diagnostic.SA1606.severity = error +dotnet_diagnostic.SA1607.severity = error +dotnet_diagnostic.SA1608.severity = error +dotnet_diagnostic.SA1609.severity = error +dotnet_diagnostic.SA1610.severity = error +dotnet_diagnostic.SA1611.severity = error +dotnet_diagnostic.SA1612.severity = error +dotnet_diagnostic.SA1613.severity = error +dotnet_diagnostic.SA1614.severity = error +dotnet_diagnostic.SA1615.severity = error +dotnet_diagnostic.SA1616.severity = error +dotnet_diagnostic.SA1617.severity = error +dotnet_diagnostic.SA1618.severity = error +dotnet_diagnostic.SA1619.severity = error +dotnet_diagnostic.SA1620.severity = error +dotnet_diagnostic.SA1621.severity = error +dotnet_diagnostic.SA1622.severity = error +dotnet_diagnostic.SA1623.severity = error +dotnet_diagnostic.SA1624.severity = error +dotnet_diagnostic.SA1625.severity = error +dotnet_diagnostic.SA1626.severity = error +dotnet_diagnostic.SA1627.severity = error +dotnet_diagnostic.SA1628.severity = error +dotnet_diagnostic.SA1629.severity = error +dotnet_diagnostic.SA1630.severity = error +dotnet_diagnostic.SA1631.severity = error +dotnet_diagnostic.SA1632.severity = error +dotnet_diagnostic.SA1633.severity = none +dotnet_diagnostic.SA1634.severity = none +dotnet_diagnostic.SA1635.severity = none +dotnet_diagnostic.SA1636.severity = error +dotnet_diagnostic.SA1637.severity = error +dotnet_diagnostic.SA1638.severity = error +dotnet_diagnostic.SA1639.severity = error +dotnet_diagnostic.SA1640.severity = error +dotnet_diagnostic.SA1641.severity = error +dotnet_diagnostic.SA1642.severity = error +dotnet_diagnostic.SA1643.severity = error +dotnet_diagnostic.SA1644.severity = error +dotnet_diagnostic.SA1645.severity = error +dotnet_diagnostic.SA1646.severity = error +dotnet_diagnostic.SA1647.severity = error +dotnet_diagnostic.SA1648.severity = error +dotnet_diagnostic.SA1649.severity = none +dotnet_diagnostic.SA1650.severity = error +dotnet_diagnostic.SA1651.severity = error +dotnet_diagnostic.SA1652.severity = none +dotnet_diagnostic.SX1101.severity = none +dotnet_diagnostic.SX1309.severity = none +dotnet_diagnostic.SX1309S.severity = none + +## xunit.analyzers + +# xUnit1000: Test classes must be public +dotnet_diagnostic.xUnit1000.severity = warning + +# xUnit1001: Fact methods cannot have parameters +dotnet_diagnostic.xUnit1001.severity = warning + +# xUnit1002: Test methods cannot have multiple Fact or Theory attributes +dotnet_diagnostic.xUnit1002.severity = warning + +# xUnit1003: Theory methods must have test data +dotnet_diagnostic.xUnit1003.severity = warning + +# xUnit1004: Test methods should not be skipped +dotnet_diagnostic.xUnit1004.severity = suggestion + +# xUnit1005: Fact methods should not have test data +dotnet_diagnostic.xUnit1005.severity = warning + +# xUnit1006: Theory methods should have parameters +dotnet_diagnostic.xUnit1006.severity = warning + +# xUnit1007: ClassData must point at a valid class +dotnet_diagnostic.xUnit1007.severity = warning + +# xUnit1008: Test data attribute should only be used on a Theory +dotnet_diagnostic.xUnit1008.severity = warning + +# xUnit1009: InlineData values must match the number of method parameters +dotnet_diagnostic.xUnit1009.severity = warning + +# xUnit1010: The value is not convertible to the method parameter type +dotnet_diagnostic.xUnit1010.severity = warning + +# xUnit1011: There is no matching method parameter +dotnet_diagnostic.xUnit1011.severity = warning + +# xUnit1012: Null should not be used for value type parameters +dotnet_diagnostic.xUnit1012.severity = warning + +# xUnit1013: Public method should be marked as test +dotnet_diagnostic.xUnit1013.severity = warning + +# xUnit1014: MemberData should use nameof operator for member name +dotnet_diagnostic.xUnit1014.severity = warning + +# xUnit1015: MemberData must reference an existing member +dotnet_diagnostic.xUnit1015.severity = warning + +# xUnit1016: MemberData must reference a public member +dotnet_diagnostic.xUnit1016.severity = warning + +# xUnit1017: MemberData must reference a static member +dotnet_diagnostic.xUnit1017.severity = warning + +# xUnit1018: MemberData must reference a valid member kind +dotnet_diagnostic.xUnit1018.severity = warning + +# xUnit1019: MemberData must reference a member providing a valid data type +dotnet_diagnostic.xUnit1019.severity = warning + +# xUnit1020: MemberData must reference a property with a getter +dotnet_diagnostic.xUnit1020.severity = warning + +# xUnit1021: MemberData should not have parameters if the referenced member is not a method +dotnet_diagnostic.xUnit1021.severity = warning + +# xUnit1022: Theory methods cannot have a parameter array +dotnet_diagnostic.xUnit1022.severity = warning + +# xUnit1023: Theory methods cannot have default parameter values +dotnet_diagnostic.xUnit1023.severity = warning + +# xUnit1024: Test methods cannot have overloads +dotnet_diagnostic.xUnit1024.severity = warning + +# xUnit1025: InlineData should be unique within the Theory it belongs to +dotnet_diagnostic.xUnit1025.severity = warning + +# xUnit1026: Theory methods should use all of their parameters +dotnet_diagnostic.xUnit1026.severity = warning + +# xUnit1027: Collection definition classes must be public +dotnet_diagnostic.xUnit1027.severity = error + +# xUnit1033: Test classes decorated with 'Xunit.IClassFixture' or 'Xunit.ICollectionFixture' should add a constructor argument of type TFixture +dotnet_diagnostic.xUnit1033.severity = warning + +# xUnit2000: Constants and literals should be the expected argument +dotnet_diagnostic.xUnit2000.severity = warning + +# xUnit2001: Do not use invalid equality check +dotnet_diagnostic.xUnit2001.severity = warning + +# xUnit2002: Do not use null check on value type +dotnet_diagnostic.xUnit2002.severity = warning + +# xUnit2003: Do not use equality check to test for null value +dotnet_diagnostic.xUnit2003.severity = warning + +# xUnit2004: Do not use equality check to test for boolean conditions +dotnet_diagnostic.xUnit2004.severity = warning + +# xUnit2005: Do not use identity check on value type +dotnet_diagnostic.xUnit2005.severity = warning + +# xUnit2006: Do not use invalid string equality check +dotnet_diagnostic.xUnit2006.severity = warning + +# xUnit2007: Do not use typeof expression to check the type +dotnet_diagnostic.xUnit2007.severity = warning + +# xUnit2008: Do not use boolean check to match on regular expressions +dotnet_diagnostic.xUnit2008.severity = warning + +# xUnit2009: Do not use boolean check to check for substrings +dotnet_diagnostic.xUnit2009.severity = warning + +# xUnit2010: Do not use boolean check to check for string equality +dotnet_diagnostic.xUnit2010.severity = warning + +# xUnit2011: Do not use empty collection check +dotnet_diagnostic.xUnit2011.severity = warning + +# xUnit2012: Do not use Enumerable.Any() to check if a value exists in a collection +dotnet_diagnostic.xUnit2012.severity = warning + +# xUnit2013: Do not use equality check to check for collection size. +dotnet_diagnostic.xUnit2013.severity = warning + +# xUnit2014: Do not use throws check to check for asynchronously thrown exception +dotnet_diagnostic.xUnit2014.severity = warning + +# xUnit2015: Do not use typeof expression to check the exception type +dotnet_diagnostic.xUnit2015.severity = warning + +# xUnit2016: Keep precision in the allowed range when asserting equality of doubles or decimals. +dotnet_diagnostic.xUnit2016.severity = warning + +# xUnit2017: Do not use Contains() to check if a value exists in a collection +dotnet_diagnostic.xUnit2017.severity = warning + +# xUnit2018: Do not compare an object's exact type to an abstract class or interface +dotnet_diagnostic.xUnit2018.severity = warning + +# xUnit2019: Do not use obsolete throws check to check for asynchronously thrown exception +dotnet_diagnostic.xUnit2019.severity = none + +# xUnit3000: Test case classes must derive directly or indirectly from Xunit.LongLivedMarshalByRefObject +dotnet_diagnostic.xUnit3000.severity = warning + +# xUnit3001: Classes that implement Xunit.Abstractions.IXunitSerializable must have a public parameterless constructor +dotnet_diagnostic.xUnit3001.severity = warning +csharp_style_prefer_top_level_statements = true:silent \ No newline at end of file diff --git a/src/Analysers.Tests.ruleset b/src/Analysers.Tests.ruleset deleted file mode 100644 index dd858587..00000000 --- a/src/Analysers.Tests.ruleset +++ /dev/null @@ -1,413 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Analysers.ruleset b/src/Analysers.ruleset deleted file mode 100644 index 88dc3ebb..00000000 --- a/src/Analysers.ruleset +++ /dev/null @@ -1,413 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/GlobalAssemblyInfo.cs b/src/GlobalAssemblyInfo.cs index 35fe1921..b75bdd41 100644 --- a/src/GlobalAssemblyInfo.cs +++ b/src/GlobalAssemblyInfo.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; // Version information for an assembly consists of the following four values: // @@ -17,4 +17,4 @@ // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyCompany("Objectivity Ltd")] -[assembly: AssemblyCopyright("Copyright (c) Objectivity Ltd")] \ No newline at end of file +[assembly: AssemblyCopyright("Copyright (c) Objectivity Ltd")] diff --git a/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Tests/.editorconfig b/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Tests/.editorconfig new file mode 100644 index 00000000..bfa5967c --- /dev/null +++ b/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Tests/.editorconfig @@ -0,0 +1,22 @@ +root = false + +[*.cs] + +# CA1062: Validate arguments of public methods +dotnet_diagnostic.CA1062.severity = none +# CA1506: Avoid excessive class coupling +dotnet_diagnostic.CA1506.severity = none +# CA1707: Identifiers should not contain underscores +dotnet_diagnostic.CA1707.severity = none +# CA1822: Mark members as static +dotnet_diagnostic.CA1822.severity = none +# CA2000: Dispose objects before losing scope +dotnet_diagnostic.CA2000.severity = none +# CA2007: Consider calling ConfigureAwait on the awaited task +dotnet_diagnostic.CA2007.severity = none +# RCS1090: Call 'ConfigureAwait(false)'. +dotnet_diagnostic.RCS1090.severity = none +# S3376: Attribute, EventArgs, and Exception type names should end with the type being extended. +dotnet_diagnostic.S3376.severity = none +# S4158: Empty collections should not be accessed or iterated. +dotnet_diagnostic.S4158.severity = none \ No newline at end of file diff --git a/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Tests/Attributes/AutoMockDataAttributeTests.cs b/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Tests/Attributes/AutoMockDataAttributeTests.cs index 058aecd2..b91d32aa 100644 --- a/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Tests/Attributes/AutoMockDataAttributeTests.cs +++ b/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Tests/Attributes/AutoMockDataAttributeTests.cs @@ -3,14 +3,18 @@ using System; using System.Collections.Generic; using System.Reflection; + using FakeItEasy; + using FluentAssertions; + using global::AutoFixture; using global::AutoFixture.AutoFakeItEasy; using global::AutoFixture.Xunit2; using Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Attributes; using Objectivity.AutoFixture.XUnit2.Core.Customizations; using Objectivity.AutoFixture.XUnit2.Core.Providers; + using Xunit; using Xunit.Sdk; @@ -56,7 +60,7 @@ public void WhenGetDataIsInvoked_ThenFixtureIsConfiguredAndDataReturned(bool ign { IgnoreVirtualMembers = ignoreVirtualMembers, }; - var methodInfo = typeof(AutoMockDataAttributeTests).GetMethod(nameof(this.TestMethod), BindingFlags.Instance | BindingFlags.NonPublic); + var methodInfo = typeof(AutoMockDataAttributeTests).GetMethod(nameof(this.MethodUnderTest), BindingFlags.Instance | BindingFlags.NonPublic); // Act var result = attribute.GetData(methodInfo); @@ -88,8 +92,9 @@ public void GivenTestMethodHasSomeParameters_WhenTestRun_ThenParametersAreGenera disposable.GetType().Name.Should().Contain("Proxy", "that way we know it was mocked."); } - protected void TestMethod() + protected void MethodUnderTest() { + // Empty method under test } } } diff --git a/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Tests/Attributes/InlineAutoMockDataAttributeTests.cs b/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Tests/Attributes/InlineAutoMockDataAttributeTests.cs index e426a454..78d2132f 100644 --- a/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Tests/Attributes/InlineAutoMockDataAttributeTests.cs +++ b/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Tests/Attributes/InlineAutoMockDataAttributeTests.cs @@ -3,14 +3,18 @@ using System; using System.Collections.Generic; using System.Reflection; + using FakeItEasy; + using FluentAssertions; + using global::AutoFixture; using global::AutoFixture.AutoFakeItEasy; using global::AutoFixture.Xunit2; using Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Attributes; using Objectivity.AutoFixture.XUnit2.Core.Customizations; using Objectivity.AutoFixture.XUnit2.Core.Providers; + using Xunit; using Xunit.Sdk; @@ -89,7 +93,7 @@ public void WhenGetDataIsInvoked_ThenFixtureIsConfiguredAndDataReturned(bool ign { IgnoreVirtualMembers = ignoreVirtualMembers, }; - var methodInfo = typeof(InlineAutoMockDataAttributeTests).GetMethod(nameof(this.TestMethod), BindingFlags.Instance | BindingFlags.NonPublic); + var methodInfo = typeof(InlineAutoMockDataAttributeTests).GetMethod(nameof(this.MethodUnderTest), BindingFlags.Instance | BindingFlags.NonPublic); // Act var result = attribute.GetData(methodInfo); @@ -121,8 +125,9 @@ public void GivenTestMethodHasSomeInlineParameters_WhenTestRun_ThenParametersAre disposable.GetType().Name.Should().Contain("Proxy", "that way we know it was mocked."); } - protected void TestMethod() + protected void MethodUnderTest() { + // Empty method under test } } } diff --git a/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Tests/Attributes/MemberAutoMockDataAttributeTests.cs b/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Tests/Attributes/MemberAutoMockDataAttributeTests.cs index 6632ea83..d06a7d8a 100644 --- a/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Tests/Attributes/MemberAutoMockDataAttributeTests.cs +++ b/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Tests/Attributes/MemberAutoMockDataAttributeTests.cs @@ -3,14 +3,18 @@ using System; using System.Collections.Generic; using System.Linq; + using FakeItEasy; + using FluentAssertions; + using global::AutoFixture; using global::AutoFixture.AutoFakeItEasy; using global::AutoFixture.Xunit2; using Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Attributes; using Objectivity.AutoFixture.XUnit2.Core.Common; using Objectivity.AutoFixture.XUnit2.Core.Customizations; + using Xunit; [Collection("MemberAutoMockDataAttribute")] @@ -30,10 +34,7 @@ public class MemberAutoMockDataAttributeTests new object[] { 1, new NumericSequencePerTypeCustomization() }, }; - public static IEnumerable TestDataDoNotShareFixture - { - get { return TestDataShareFixture.Select(item => new[] { item.Last() }); } - } + public static IEnumerable TestDataDoNotShareFixture => TestDataShareFixture.Select(item => new[] { item.Last() }); public int TestMethod(int first, int second, int third, int fourth, IDisposable disposable) { @@ -115,7 +116,7 @@ public void GivenIgnoreVirtualMembers_WhenGetDataIsInvoked_ThenFixtureIsCustomiz public void GivenMemberAutoMockData_WhenShareFixtureIsSetToTrue_ThenSameFixturePerDataRowIsUsed(int index, ICustomization customization, IFixture fixture) { // Arrange - var expectedCustomizationsCount = 19; + const int expectedCustomizationsCount = 19; // Act fixture.Customize(customization); @@ -129,7 +130,7 @@ public void GivenMemberAutoMockData_WhenShareFixtureIsSetToTrue_ThenSameFixtureP public void GivenMemberAutoMockData_WhenShareFixtureIsSetToFalse_ThenUniqueFixturePerDataRowIsCreated(ICustomization customization, IFixture fixture) { // Arrange - var expectedCustomizationsCount = 19; + const int expectedCustomizationsCount = 19; // Act fixture.Customize(customization); @@ -179,4 +180,4 @@ public void GivenTestMethodHasSomeMemberGeneratedParameters_WhenTestRun_ThenPara disposable.GetType().Name.Should().Contain("Proxy", "that way we know it was mocked."); } } -} \ No newline at end of file +} diff --git a/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Tests/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Tests.csproj b/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Tests/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Tests.csproj index 6bfd8ba9..f1f2d54e 100644 --- a/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Tests/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Tests.csproj +++ b/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Tests/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Tests.csproj @@ -1,11 +1,16 @@  - netcoreapp2.1;netcoreapp3.1 - $(TargetFrameworks);net46;net47;net48 - false - ..\Analysers.Tests.ruleset + net7.0 + $(TargetFrameworks);net472;net48 + false true + true + latest + All + true + latest + true @@ -35,44 +40,56 @@ - - - - - + + + + + all - runtime; build; native; contentfiles; analyzers + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive - - - + all - runtime; build; native; contentfiles; analyzers + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive - - - + all runtime; build; native; contentfiles; analyzers; buildtransitive all - runtime; build; native; contentfiles; analyzers + runtime; build; native; contentfiles; analyzers; buildtransitive - + - - - - - - + + + + + + all - runtime; build; native; contentfiles; analyzers + runtime; build; native; contentfiles; analyzers; buildtransitive - + all - runtime; build; native; contentfiles; analyzers + runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Tests/Properties/AssemblyInfo.cs b/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Tests/Properties/AssemblyInfo.cs index 0407cd58..af2b00a2 100644 --- a/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Tests/Properties/AssemblyInfo.cs +++ b/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Tests/Properties/AssemblyInfo.cs @@ -17,4 +17,4 @@ [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("1ACF081C-FE22-41BD-BB22-033D2572D424")] \ No newline at end of file +[assembly: Guid("1ACF081C-FE22-41BD-BB22-033D2572D424")] diff --git a/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy/Attributes/AutoMockDataAttribute.cs b/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy/Attributes/AutoMockDataAttribute.cs index aee43925..7557c1b5 100644 --- a/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy/Attributes/AutoMockDataAttribute.cs +++ b/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy/Attributes/AutoMockDataAttribute.cs @@ -1,11 +1,13 @@ namespace Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Attributes { using System; + using global::AutoFixture; using global::AutoFixture.AutoFakeItEasy; using Objectivity.AutoFixture.XUnit2.Core.Attributes; using Objectivity.AutoFixture.XUnit2.Core.Common; using Objectivity.AutoFixture.XUnit2.Core.Providers; + using Xunit.Sdk; [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)] diff --git a/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy/Attributes/InlineAutoMockDataAttribute.cs b/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy/Attributes/InlineAutoMockDataAttribute.cs index d77e43a6..a712b08a 100644 --- a/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy/Attributes/InlineAutoMockDataAttribute.cs +++ b/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy/Attributes/InlineAutoMockDataAttribute.cs @@ -1,11 +1,13 @@ namespace Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Attributes { using System; + using global::AutoFixture; using global::AutoFixture.AutoFakeItEasy; using Objectivity.AutoFixture.XUnit2.Core.Attributes; using Objectivity.AutoFixture.XUnit2.Core.Common; using Objectivity.AutoFixture.XUnit2.Core.Providers; + using Xunit.Sdk; [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] @@ -27,4 +29,4 @@ protected override IFixture Customize(IFixture fixture) return fixture.NotNull(nameof(fixture)).Customize(new AutoFakeItEasyCustomization { ConfigureMembers = true }); } } -} \ No newline at end of file +} diff --git a/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy/Attributes/MemberAutoMockDataAttribute.cs b/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy/Attributes/MemberAutoMockDataAttribute.cs index 694f8a2b..485f71be 100644 --- a/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy/Attributes/MemberAutoMockDataAttribute.cs +++ b/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy/Attributes/MemberAutoMockDataAttribute.cs @@ -1,11 +1,13 @@ namespace Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Attributes { using System; + using global::AutoFixture; using global::AutoFixture.AutoFakeItEasy; using Objectivity.AutoFixture.XUnit2.Core.Attributes; using Objectivity.AutoFixture.XUnit2.Core.Common; using Objectivity.AutoFixture.XUnit2.Core.Providers; + using Xunit.Sdk; [AttributeUsage(AttributeTargets.Method, AllowMultiple = true, Inherited = true)] @@ -32,4 +34,4 @@ protected override IFixture Customize(IFixture fixture) return fixture.NotNull(nameof(fixture)).Customize(new AutoFakeItEasyCustomization { ConfigureMembers = true }); } } -} \ No newline at end of file +} diff --git a/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.csproj b/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.csproj index b47c0c08..c090aac1 100644 --- a/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.csproj +++ b/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.csproj @@ -2,13 +2,18 @@ netstandard2.0;netstandard2.1 - $(TargetFrameworks);net46;net47;net48 - + $(TargetFrameworks);net472;net48 + $(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage - ..\Analysers.ruleset true + true + latest + All + true True True + latest + false @@ -38,6 +43,11 @@ $(StrongNameKeyPath) + + + + + @@ -55,17 +65,29 @@ - - - - - - - runtime; build; native; contentfiles; analyzers + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive - - + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -74,9 +96,9 @@ all - - - + + + diff --git a/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy/Properties/AssemblyInfo.cs b/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy/Properties/AssemblyInfo.cs index ef2d20d9..67ba7906 100644 --- a/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy/Properties/AssemblyInfo.cs +++ b/src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy/Properties/AssemblyInfo.cs @@ -21,4 +21,4 @@ [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("D4F6BF2B-D18E-4E99-9695-193C451C31BA")] \ No newline at end of file +[assembly: Guid("D4F6BF2B-D18E-4E99-9695-193C451C31BA")] diff --git a/src/Objectivity.AutoFixture.XUnit2.AutoMoq.Tests/.editorconfig b/src/Objectivity.AutoFixture.XUnit2.AutoMoq.Tests/.editorconfig new file mode 100644 index 00000000..bfa5967c --- /dev/null +++ b/src/Objectivity.AutoFixture.XUnit2.AutoMoq.Tests/.editorconfig @@ -0,0 +1,22 @@ +root = false + +[*.cs] + +# CA1062: Validate arguments of public methods +dotnet_diagnostic.CA1062.severity = none +# CA1506: Avoid excessive class coupling +dotnet_diagnostic.CA1506.severity = none +# CA1707: Identifiers should not contain underscores +dotnet_diagnostic.CA1707.severity = none +# CA1822: Mark members as static +dotnet_diagnostic.CA1822.severity = none +# CA2000: Dispose objects before losing scope +dotnet_diagnostic.CA2000.severity = none +# CA2007: Consider calling ConfigureAwait on the awaited task +dotnet_diagnostic.CA2007.severity = none +# RCS1090: Call 'ConfigureAwait(false)'. +dotnet_diagnostic.RCS1090.severity = none +# S3376: Attribute, EventArgs, and Exception type names should end with the type being extended. +dotnet_diagnostic.S3376.severity = none +# S4158: Empty collections should not be accessed or iterated. +dotnet_diagnostic.S4158.severity = none \ No newline at end of file diff --git a/src/Objectivity.AutoFixture.XUnit2.AutoMoq.Tests/Attributes/AutoMockDataAttributeTests.cs b/src/Objectivity.AutoFixture.XUnit2.AutoMoq.Tests/Attributes/AutoMockDataAttributeTests.cs index e8357453..f430187b 100644 --- a/src/Objectivity.AutoFixture.XUnit2.AutoMoq.Tests/Attributes/AutoMockDataAttributeTests.cs +++ b/src/Objectivity.AutoFixture.XUnit2.AutoMoq.Tests/Attributes/AutoMockDataAttributeTests.cs @@ -3,14 +3,18 @@ using System; using System.Collections.Generic; using System.Reflection; + using FluentAssertions; + using global::AutoFixture; using global::AutoFixture.AutoMoq; using global::AutoFixture.Xunit2; using Moq; + using Objectivity.AutoFixture.XUnit2.AutoMoq.Attributes; using Objectivity.AutoFixture.XUnit2.Core.Customizations; using Objectivity.AutoFixture.XUnit2.Core.Providers; + using Xunit; using Xunit.Sdk; @@ -46,7 +50,7 @@ public void WhenGetDataIsInvoked_ThenFixtureIsConfiguredAndDataReturned(bool ign var fixture = new Mock(); var customizations = new List(); fixture.Setup(x => x.Customize(It.IsAny())) - .Callback(customization => customizations.Add(customization)) + .Callback(customizations.Add) .Returns(fixture.Object); var dataAttribute = new Mock(); dataAttribute.Setup(a => a.GetData(It.IsAny())).Returns(data); @@ -56,7 +60,7 @@ public void WhenGetDataIsInvoked_ThenFixtureIsConfiguredAndDataReturned(bool ign { IgnoreVirtualMembers = ignoreVirtualMembers, }; - var methodInfo = typeof(AutoMockDataAttributeTests).GetMethod(nameof(this.TestMethod), BindingFlags.Instance | BindingFlags.NonPublic); + var methodInfo = typeof(AutoMockDataAttributeTests).GetMethod(nameof(this.MethodUnderTest), BindingFlags.Instance | BindingFlags.NonPublic); // Act var result = attribute.GetData(methodInfo); @@ -88,8 +92,9 @@ public void GivenTestMethodHasSomeParameters_WhenTestRun_ThenParametersAreGenera disposable.GetType().Name.Should().StartWith("IDisposableProxy", "that way we know it was mocked."); } - protected void TestMethod() + protected void MethodUnderTest() { + // Empty method under test } } } diff --git a/src/Objectivity.AutoFixture.XUnit2.AutoMoq.Tests/Attributes/InlineAutoMockDataAttributeTests.cs b/src/Objectivity.AutoFixture.XUnit2.AutoMoq.Tests/Attributes/InlineAutoMockDataAttributeTests.cs index 48f5d294..d5bfc249 100644 --- a/src/Objectivity.AutoFixture.XUnit2.AutoMoq.Tests/Attributes/InlineAutoMockDataAttributeTests.cs +++ b/src/Objectivity.AutoFixture.XUnit2.AutoMoq.Tests/Attributes/InlineAutoMockDataAttributeTests.cs @@ -3,14 +3,18 @@ using System; using System.Collections.Generic; using System.Reflection; + using FluentAssertions; + using global::AutoFixture; using global::AutoFixture.AutoMoq; using global::AutoFixture.Xunit2; using Moq; + using Objectivity.AutoFixture.XUnit2.AutoMoq.Attributes; using Objectivity.AutoFixture.XUnit2.Core.Customizations; using Objectivity.AutoFixture.XUnit2.Core.Providers; + using Xunit; using Xunit.Sdk; @@ -79,7 +83,7 @@ public void WhenGetDataIsInvoked_ThenFixtureIsConfiguredAndDataReturned(bool ign var fixture = new Mock(); var customizations = new List(); fixture.Setup(x => x.Customize(It.IsAny())) - .Callback(customization => customizations.Add(customization)) + .Callback(customizations.Add) .Returns(fixture.Object); var dataAttribute = new Mock(); dataAttribute.Setup(a => a.GetData(It.IsAny())).Returns(data); @@ -89,7 +93,7 @@ public void WhenGetDataIsInvoked_ThenFixtureIsConfiguredAndDataReturned(bool ign { IgnoreVirtualMembers = ignoreVirtualMembers, }; - var methodInfo = typeof(InlineAutoMockDataAttributeTests).GetMethod(nameof(this.TestMethod), BindingFlags.Instance | BindingFlags.NonPublic); + var methodInfo = typeof(InlineAutoMockDataAttributeTests).GetMethod(nameof(this.MethodUnderTest), BindingFlags.Instance | BindingFlags.NonPublic); // Act var result = attribute.GetData(methodInfo); @@ -121,8 +125,9 @@ public void GivenTestMethodHasSomeInlineParameters_WhenTestRun_ThenParametersAre disposable.GetType().Name.Should().StartWith("IDisposableProxy", "that way we know it was mocked."); } - protected void TestMethod() + protected void MethodUnderTest() { + // Empty method under test } } } diff --git a/src/Objectivity.AutoFixture.XUnit2.AutoMoq.Tests/Attributes/MemberAutoMockDataAttributeTests.cs b/src/Objectivity.AutoFixture.XUnit2.AutoMoq.Tests/Attributes/MemberAutoMockDataAttributeTests.cs index 72f42816..bb444740 100644 --- a/src/Objectivity.AutoFixture.XUnit2.AutoMoq.Tests/Attributes/MemberAutoMockDataAttributeTests.cs +++ b/src/Objectivity.AutoFixture.XUnit2.AutoMoq.Tests/Attributes/MemberAutoMockDataAttributeTests.cs @@ -3,14 +3,18 @@ using System; using System.Collections.Generic; using System.Linq; + using FluentAssertions; + using global::AutoFixture; using global::AutoFixture.AutoMoq; using global::AutoFixture.Xunit2; using Moq; + using Objectivity.AutoFixture.XUnit2.AutoMoq.Attributes; using Objectivity.AutoFixture.XUnit2.Core.Common; using Objectivity.AutoFixture.XUnit2.Core.Customizations; + using Xunit; [Collection("MemberAutoMockDataAttribute")] @@ -30,10 +34,7 @@ public class MemberAutoMockDataAttributeTests new object[] { 1, new NumericSequencePerTypeCustomization() }, }; - public static IEnumerable TestDataDoNotShareFixture - { - get { return TestDataShareFixture.Select(item => new[] { item.Last() }); } - } + public static IEnumerable TestDataDoNotShareFixture => TestDataShareFixture.Select(item => new[] { item.Last() }); public int TestMethod(int first, int second, int third, int fourth, IDisposable disposable) { @@ -88,7 +89,7 @@ public void GivenIgnoreVirtualMembers_WhenGetDataIsInvoked_ThenFixtureIsCustomiz var fixture = new Mock(); var customizations = new List(); fixture.Setup(x => x.Customize(It.IsAny())) - .Callback(customization => customizations.Add(customization)) + .Callback(customizations.Add) .Returns(fixture.Object); var attribute = new MemberAutoMockDataAttribute(fixture.Object, nameof(TestData)) @@ -115,7 +116,7 @@ public void GivenIgnoreVirtualMembers_WhenGetDataIsInvoked_ThenFixtureIsCustomiz public void GivenMemberAutoMockData_WhenShareFixtureIsSetToTrue_ThenSameFixturePerDataRowIsUsed(int index, ICustomization customization, IFixture fixture) { // Arrange - var expectedCustomizationsCount = 19; + const int expectedCustomizationsCount = 19; // Act fixture.Customize(customization); @@ -129,7 +130,7 @@ public void GivenMemberAutoMockData_WhenShareFixtureIsSetToTrue_ThenSameFixtureP public void GivenMemberAutoMockData_WhenShareFixtureIsSetToFalse_ThenUniqueFixturePerDataRowIsCreated(ICustomization customization, IFixture fixture) { // Arrange - var expectedCustomizationsCount = 19; + const int expectedCustomizationsCount = 19; // Act fixture.Customize(customization); @@ -179,4 +180,4 @@ public void GivenTestMethodHasSomeMemberGeneratedParameters_WhenTestRun_ThenPara disposable.GetType().Name.Should().StartWith("IDisposableProxy", "that way we know it was mocked."); } } -} \ No newline at end of file +} diff --git a/src/Objectivity.AutoFixture.XUnit2.AutoMoq.Tests/Objectivity.AutoFixture.XUnit2.AutoMoq.Tests.csproj b/src/Objectivity.AutoFixture.XUnit2.AutoMoq.Tests/Objectivity.AutoFixture.XUnit2.AutoMoq.Tests.csproj index 98e054d9..daeb8b71 100644 --- a/src/Objectivity.AutoFixture.XUnit2.AutoMoq.Tests/Objectivity.AutoFixture.XUnit2.AutoMoq.Tests.csproj +++ b/src/Objectivity.AutoFixture.XUnit2.AutoMoq.Tests/Objectivity.AutoFixture.XUnit2.AutoMoq.Tests.csproj @@ -1,11 +1,16 @@  - netcoreapp2.1;netcoreapp3.1 - $(TargetFrameworks);net46;net47;net48 - false - ..\Analysers.Tests.ruleset + net7.0 + $(TargetFrameworks);net472;net48 + false true + true + latest + All + true + latest + true @@ -22,6 +27,7 @@ + @@ -35,44 +41,56 @@ - - - - - + + + + + all - runtime; build; native; contentfiles; analyzers + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive - - - + + all - runtime; build; native; contentfiles; analyzers + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive - - + all runtime; build; native; contentfiles; analyzers; buildtransitive - all - runtime; build; native; contentfiles; analyzers + runtime; build; native; contentfiles; analyzers; buildtransitive - + - - - - - - + + + + + + all - runtime; build; native; contentfiles; analyzers + runtime; build; native; contentfiles; analyzers; buildtransitive - + all - runtime; build; native; contentfiles; analyzers + runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Objectivity.AutoFixture.XUnit2.AutoMoq/Attributes/AutoMockDataAttribute.cs b/src/Objectivity.AutoFixture.XUnit2.AutoMoq/Attributes/AutoMockDataAttribute.cs index 5441837b..264cfa90 100644 --- a/src/Objectivity.AutoFixture.XUnit2.AutoMoq/Attributes/AutoMockDataAttribute.cs +++ b/src/Objectivity.AutoFixture.XUnit2.AutoMoq/Attributes/AutoMockDataAttribute.cs @@ -1,11 +1,13 @@ namespace Objectivity.AutoFixture.XUnit2.AutoMoq.Attributes { using System; + using global::AutoFixture; using global::AutoFixture.AutoMoq; using Objectivity.AutoFixture.XUnit2.Core.Attributes; using Objectivity.AutoFixture.XUnit2.Core.Common; using Objectivity.AutoFixture.XUnit2.Core.Providers; + using Xunit.Sdk; [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)] @@ -27,4 +29,4 @@ protected override IFixture Customize(IFixture fixture) return fixture.NotNull(nameof(fixture)).Customize(new AutoMoqCustomization { ConfigureMembers = true }); } } -} \ No newline at end of file +} diff --git a/src/Objectivity.AutoFixture.XUnit2.AutoMoq/Attributes/InlineAutoMockDataAttribute.cs b/src/Objectivity.AutoFixture.XUnit2.AutoMoq/Attributes/InlineAutoMockDataAttribute.cs index 3bfd373c..f15886f8 100644 --- a/src/Objectivity.AutoFixture.XUnit2.AutoMoq/Attributes/InlineAutoMockDataAttribute.cs +++ b/src/Objectivity.AutoFixture.XUnit2.AutoMoq/Attributes/InlineAutoMockDataAttribute.cs @@ -1,11 +1,13 @@ namespace Objectivity.AutoFixture.XUnit2.AutoMoq.Attributes { using System; + using global::AutoFixture; using global::AutoFixture.AutoMoq; using Objectivity.AutoFixture.XUnit2.Core.Attributes; using Objectivity.AutoFixture.XUnit2.Core.Common; using Objectivity.AutoFixture.XUnit2.Core.Providers; + using Xunit.Sdk; [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] @@ -27,4 +29,4 @@ protected override IFixture Customize(IFixture fixture) return fixture.NotNull(nameof(fixture)).Customize(new AutoMoqCustomization { ConfigureMembers = true }); } } -} \ No newline at end of file +} diff --git a/src/Objectivity.AutoFixture.XUnit2.AutoMoq/Attributes/MemberAutoMockDataAttribute.cs b/src/Objectivity.AutoFixture.XUnit2.AutoMoq/Attributes/MemberAutoMockDataAttribute.cs index 1edb24b4..82ec3999 100644 --- a/src/Objectivity.AutoFixture.XUnit2.AutoMoq/Attributes/MemberAutoMockDataAttribute.cs +++ b/src/Objectivity.AutoFixture.XUnit2.AutoMoq/Attributes/MemberAutoMockDataAttribute.cs @@ -1,11 +1,13 @@ namespace Objectivity.AutoFixture.XUnit2.AutoMoq.Attributes { using System; + using global::AutoFixture; using global::AutoFixture.AutoMoq; using Objectivity.AutoFixture.XUnit2.Core.Attributes; using Objectivity.AutoFixture.XUnit2.Core.Common; using Objectivity.AutoFixture.XUnit2.Core.Providers; + using Xunit.Sdk; [AttributeUsage(AttributeTargets.Method, AllowMultiple = true, Inherited = true)] @@ -32,4 +34,4 @@ protected override IFixture Customize(IFixture fixture) return fixture.NotNull(nameof(fixture)).Customize(new AutoMoqCustomization { ConfigureMembers = true }); } } -} \ No newline at end of file +} diff --git a/src/Objectivity.AutoFixture.XUnit2.AutoMoq/Objectivity.AutoFixture.XUnit2.AutoMoq.csproj b/src/Objectivity.AutoFixture.XUnit2.AutoMoq/Objectivity.AutoFixture.XUnit2.AutoMoq.csproj index dbf9124d..06d82aba 100644 --- a/src/Objectivity.AutoFixture.XUnit2.AutoMoq/Objectivity.AutoFixture.XUnit2.AutoMoq.csproj +++ b/src/Objectivity.AutoFixture.XUnit2.AutoMoq/Objectivity.AutoFixture.XUnit2.AutoMoq.csproj @@ -2,13 +2,18 @@ netstandard2.0;netstandard2.1 - $(TargetFrameworks);net46;net47;net48 - + $(TargetFrameworks);net472;net48 + $(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage - ..\Analysers.ruleset true + true + latest + All + true True True + latest + false @@ -38,6 +43,11 @@ $(StrongNameKeyPath) + + + + + @@ -55,28 +65,40 @@ - - - - - - - runtime; build; native; contentfiles; analyzers + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive - runtime; build; native; contentfiles; analyzers all - - - + + + diff --git a/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Tests/.editorconfig b/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Tests/.editorconfig new file mode 100644 index 00000000..bfa5967c --- /dev/null +++ b/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Tests/.editorconfig @@ -0,0 +1,22 @@ +root = false + +[*.cs] + +# CA1062: Validate arguments of public methods +dotnet_diagnostic.CA1062.severity = none +# CA1506: Avoid excessive class coupling +dotnet_diagnostic.CA1506.severity = none +# CA1707: Identifiers should not contain underscores +dotnet_diagnostic.CA1707.severity = none +# CA1822: Mark members as static +dotnet_diagnostic.CA1822.severity = none +# CA2000: Dispose objects before losing scope +dotnet_diagnostic.CA2000.severity = none +# CA2007: Consider calling ConfigureAwait on the awaited task +dotnet_diagnostic.CA2007.severity = none +# RCS1090: Call 'ConfigureAwait(false)'. +dotnet_diagnostic.RCS1090.severity = none +# S3376: Attribute, EventArgs, and Exception type names should end with the type being extended. +dotnet_diagnostic.S3376.severity = none +# S4158: Empty collections should not be accessed or iterated. +dotnet_diagnostic.S4158.severity = none \ No newline at end of file diff --git a/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Tests/Attributes/AutoMockDataAttributeTests.cs b/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Tests/Attributes/AutoMockDataAttributeTests.cs index 40dc0600..a4bed765 100644 --- a/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Tests/Attributes/AutoMockDataAttributeTests.cs +++ b/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Tests/Attributes/AutoMockDataAttributeTests.cs @@ -3,14 +3,18 @@ using System; using System.Collections.Generic; using System.Reflection; + using FluentAssertions; + using global::AutoFixture; using global::AutoFixture.AutoNSubstitute; using global::AutoFixture.Xunit2; using NSubstitute; + using Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Attributes; using Objectivity.AutoFixture.XUnit2.Core.Customizations; using Objectivity.AutoFixture.XUnit2.Core.Providers; + using Xunit; using Xunit.Sdk; @@ -45,7 +49,7 @@ public void WhenGetDataIsInvoked_ThenFixtureIsConfiguredAndDataReturned(bool ign }; var fixture = Substitute.For(); var customizations = new List(); - fixture.Customize(Arg.Do(customization => customizations.Add(customization))) + fixture.Customize(Arg.Do(customizations.Add)) .Returns(fixture); var dataAttribute = Substitute.For(); dataAttribute.GetData(Arg.Any()).Returns(data); @@ -55,7 +59,7 @@ public void WhenGetDataIsInvoked_ThenFixtureIsConfiguredAndDataReturned(bool ign { IgnoreVirtualMembers = ignoreVirtualMembers, }; - var methodInfo = typeof(AutoMockDataAttributeTests).GetMethod(nameof(this.TestMethod), BindingFlags.Instance | BindingFlags.NonPublic); + var methodInfo = typeof(AutoMockDataAttributeTests).GetMethod(nameof(this.MethodUnderTest), BindingFlags.Instance | BindingFlags.NonPublic); // Act var result = attribute.GetData(methodInfo); @@ -87,8 +91,9 @@ public void GivenTestMethodHasSomeParameters_WhenTestRun_ThenParametersAreGenera disposable.GetType().Name.Should().StartWith("ObjectProxy", "that way we know it was mocked."); } - protected void TestMethod() + protected void MethodUnderTest() { + // Empty method under test } } } diff --git a/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Tests/Attributes/InlineAutoMockDataAttributeTests.cs b/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Tests/Attributes/InlineAutoMockDataAttributeTests.cs index 7eb8afef..81c19dbc 100644 --- a/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Tests/Attributes/InlineAutoMockDataAttributeTests.cs +++ b/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Tests/Attributes/InlineAutoMockDataAttributeTests.cs @@ -3,14 +3,18 @@ using System; using System.Collections.Generic; using System.Reflection; + using FluentAssertions; + using global::AutoFixture; using global::AutoFixture.AutoNSubstitute; using global::AutoFixture.Xunit2; using NSubstitute; + using Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Attributes; using Objectivity.AutoFixture.XUnit2.Core.Customizations; using Objectivity.AutoFixture.XUnit2.Core.Providers; + using Xunit; using Xunit.Sdk; @@ -78,7 +82,7 @@ public void WhenGetDataIsInvoked_ThenFixtureIsConfiguredAndDataReturned(bool ign }; var fixture = Substitute.For(); var customizations = new List(); - fixture.Customize(Arg.Do(customization => customizations.Add(customization))) + fixture.Customize(Arg.Do(customizations.Add)) .Returns(fixture); var dataAttribute = Substitute.For(); dataAttribute.GetData(Arg.Any()).Returns(data); @@ -88,7 +92,7 @@ public void WhenGetDataIsInvoked_ThenFixtureIsConfiguredAndDataReturned(bool ign { IgnoreVirtualMembers = ignoreVirtualMembers, }; - var methodInfo = typeof(InlineAutoMockDataAttributeTests).GetMethod(nameof(this.TestMethod), BindingFlags.Instance | BindingFlags.NonPublic); + var methodInfo = typeof(InlineAutoMockDataAttributeTests).GetMethod(nameof(this.MethodUnderTest), BindingFlags.Instance | BindingFlags.NonPublic); // Act var result = attribute.GetData(methodInfo); @@ -120,8 +124,9 @@ public void GivenTestMethodHasSomeInlineParameters_WhenTestRun_ThenParametersAre disposable.GetType().Name.Should().StartWith("ObjectProxy", "that way we know it was mocked."); } - protected void TestMethod() + protected void MethodUnderTest() { + // Empty method under test } } } diff --git a/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Tests/Attributes/MemberAutoMockDataAttributeTests.cs b/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Tests/Attributes/MemberAutoMockDataAttributeTests.cs index 3c15889f..942356d2 100644 --- a/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Tests/Attributes/MemberAutoMockDataAttributeTests.cs +++ b/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Tests/Attributes/MemberAutoMockDataAttributeTests.cs @@ -3,14 +3,18 @@ using System; using System.Collections.Generic; using System.Linq; + using FluentAssertions; + using global::AutoFixture; using global::AutoFixture.AutoNSubstitute; using global::AutoFixture.Xunit2; using NSubstitute; + using Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Attributes; using Objectivity.AutoFixture.XUnit2.Core.Common; using Objectivity.AutoFixture.XUnit2.Core.Customizations; + using Xunit; [Collection("MemberAutoMockDataAttribute")] @@ -30,10 +34,7 @@ public class MemberAutoMockDataAttributeTests new object[] { 1, new NumericSequencePerTypeCustomization() }, }; - public static IEnumerable TestDataDoNotShareFixture - { - get { return TestDataShareFixture.Select(item => new[] { item.Last() }); } - } + public static IEnumerable TestDataDoNotShareFixture => TestDataShareFixture.Select(item => new[] { item.Last() }); public int TestMethod(int first, int second, int third, int fourth, IDisposable disposable) { @@ -87,7 +88,7 @@ public void GivenIgnoreVirtualMembers_WhenGetDataIsInvoked_ThenFixtureIsCustomiz // Arrange var fixture = Substitute.For(); var customizations = new List(); - fixture.Customize(Arg.Do(customization => customizations.Add(customization))) + fixture.Customize(Arg.Do(customizations.Add)) .Returns(fixture); var attribute = new MemberAutoMockDataAttribute(fixture, nameof(TestData)) @@ -114,7 +115,7 @@ public void GivenIgnoreVirtualMembers_WhenGetDataIsInvoked_ThenFixtureIsCustomiz public void GivenMemberAutoMockData_WhenShareFixtureIsSetToTrue_ThenSameFixturePerDataRowIsUsed(int index, ICustomization customization, IFixture fixture) { // Arrange - var expectedCustomizationsCount = 20; + const int expectedCustomizationsCount = 20; // Act fixture.Customize(customization); @@ -128,7 +129,7 @@ public void GivenMemberAutoMockData_WhenShareFixtureIsSetToTrue_ThenSameFixtureP public void GivenMemberAutoMockData_WhenShareFixtureIsSetToFalse_ThenUniqueFixturePerDataRowIsCreated(ICustomization customization, IFixture fixture) { // Arrange - var expectedCustomizationsCount = 20; + const int expectedCustomizationsCount = 20; // Act fixture.Customize(customization); @@ -178,4 +179,4 @@ public void GivenTestMethodHasSomeMemberGeneratedParameters_WhenTestRun_ThenPara disposable.GetType().Name.Should().StartWith("ObjectProxy", "that way we know it was mocked."); } } -} \ No newline at end of file +} diff --git a/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Tests/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Tests.csproj b/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Tests/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Tests.csproj index c8c04b9c..b437254e 100644 --- a/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Tests/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Tests.csproj +++ b/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Tests/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Tests.csproj @@ -1,11 +1,16 @@  - netcoreapp2.1;netcoreapp3.1 - $(TargetFrameworks);net46;net47;net48 - false - ..\Analysers.Tests.ruleset + net7.0 + $(TargetFrameworks);net472;net48 + false true + true + latest + All + true + latest + true @@ -35,44 +40,56 @@ - - - - - + + + + + all - runtime; build; native; contentfiles; analyzers + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive - - - + + all - runtime; build; native; contentfiles; analyzers + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive - - + all runtime; build; native; contentfiles; analyzers; buildtransitive - all - runtime; build; native; contentfiles; analyzers + runtime; build; native; contentfiles; analyzers; buildtransitive - + - - - - - - + + + + + + all - runtime; build; native; contentfiles; analyzers + runtime; build; native; contentfiles; analyzers; buildtransitive - + all - runtime; build; native; contentfiles; analyzers + runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Tests/Properties/AssemblyInfo.cs b/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Tests/Properties/AssemblyInfo.cs index 70cdcb1b..2ad5cbc9 100644 --- a/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Tests/Properties/AssemblyInfo.cs +++ b/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Tests/Properties/AssemblyInfo.cs @@ -17,4 +17,4 @@ [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("05464055-95ca-4bd8-a1c4-9e01885351b3")] \ No newline at end of file +[assembly: Guid("05464055-95ca-4bd8-a1c4-9e01885351b3")] diff --git a/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute/Attributes/AutoMockDataAttribute.cs b/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute/Attributes/AutoMockDataAttribute.cs index 3d2a02cb..1475c866 100644 --- a/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute/Attributes/AutoMockDataAttribute.cs +++ b/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute/Attributes/AutoMockDataAttribute.cs @@ -1,11 +1,13 @@ namespace Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Attributes { using System; + using global::AutoFixture; using global::AutoFixture.AutoNSubstitute; using Objectivity.AutoFixture.XUnit2.Core.Attributes; using Objectivity.AutoFixture.XUnit2.Core.Common; using Objectivity.AutoFixture.XUnit2.Core.Providers; + using Xunit.Sdk; [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)] diff --git a/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute/Attributes/InlineAutoMockDataAttribute.cs b/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute/Attributes/InlineAutoMockDataAttribute.cs index 307bf9f0..8061fcc5 100644 --- a/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute/Attributes/InlineAutoMockDataAttribute.cs +++ b/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute/Attributes/InlineAutoMockDataAttribute.cs @@ -1,11 +1,13 @@ namespace Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Attributes { using System; + using global::AutoFixture; using global::AutoFixture.AutoNSubstitute; using Objectivity.AutoFixture.XUnit2.Core.Attributes; using Objectivity.AutoFixture.XUnit2.Core.Common; using Objectivity.AutoFixture.XUnit2.Core.Providers; + using Xunit.Sdk; [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] @@ -27,4 +29,4 @@ protected override IFixture Customize(IFixture fixture) return fixture.NotNull(nameof(fixture)).Customize(new AutoNSubstituteCustomization { ConfigureMembers = true }); } } -} \ No newline at end of file +} diff --git a/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute/Attributes/MemberAutoMockDataAttribute.cs b/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute/Attributes/MemberAutoMockDataAttribute.cs index 9d490e07..71ce0da1 100644 --- a/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute/Attributes/MemberAutoMockDataAttribute.cs +++ b/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute/Attributes/MemberAutoMockDataAttribute.cs @@ -1,11 +1,13 @@ namespace Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Attributes { using System; + using global::AutoFixture; using global::AutoFixture.AutoNSubstitute; using Objectivity.AutoFixture.XUnit2.Core.Attributes; using Objectivity.AutoFixture.XUnit2.Core.Common; using Objectivity.AutoFixture.XUnit2.Core.Providers; + using Xunit.Sdk; [AttributeUsage(AttributeTargets.Method, AllowMultiple = true, Inherited = true)] @@ -32,4 +34,4 @@ protected override IFixture Customize(IFixture fixture) return fixture.NotNull(nameof(fixture)).Customize(new AutoNSubstituteCustomization { ConfigureMembers = true }); } } -} \ No newline at end of file +} diff --git a/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.csproj b/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.csproj index dd8f0c6c..9304192d 100644 --- a/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.csproj +++ b/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.csproj @@ -2,13 +2,18 @@ netstandard2.0;netstandard2.1 - $(TargetFrameworks);net46;net47;net48 + $(TargetFrameworks);net472;net48 $(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage - ..\Analysers.ruleset true + true + latest + All + true True True + latest + false @@ -38,6 +43,11 @@ $(StrongNameKeyPath) + + + + + @@ -55,28 +65,40 @@ - - - - - - - runtime; build; native; contentfiles; analyzers + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive - runtime; build; native; contentfiles; analyzers all - - - + + + diff --git a/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute/Properties/AssemblyInfo.cs b/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute/Properties/AssemblyInfo.cs index dbab9eda..f4a2cc09 100644 --- a/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute/Properties/AssemblyInfo.cs +++ b/src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute/Properties/AssemblyInfo.cs @@ -21,4 +21,4 @@ [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("d3e477ea-f0a1-4287-a22d-c8d982231849")] \ No newline at end of file +[assembly: Guid("d3e477ea-f0a1-4287-a22d-c8d982231849")] diff --git a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/.editorconfig b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/.editorconfig new file mode 100644 index 00000000..bfa5967c --- /dev/null +++ b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/.editorconfig @@ -0,0 +1,22 @@ +root = false + +[*.cs] + +# CA1062: Validate arguments of public methods +dotnet_diagnostic.CA1062.severity = none +# CA1506: Avoid excessive class coupling +dotnet_diagnostic.CA1506.severity = none +# CA1707: Identifiers should not contain underscores +dotnet_diagnostic.CA1707.severity = none +# CA1822: Mark members as static +dotnet_diagnostic.CA1822.severity = none +# CA2000: Dispose objects before losing scope +dotnet_diagnostic.CA2000.severity = none +# CA2007: Consider calling ConfigureAwait on the awaited task +dotnet_diagnostic.CA2007.severity = none +# RCS1090: Call 'ConfigureAwait(false)'. +dotnet_diagnostic.RCS1090.severity = none +# S3376: Attribute, EventArgs, and Exception type names should end with the type being extended. +dotnet_diagnostic.S3376.severity = none +# S4158: Empty collections should not be accessed or iterated. +dotnet_diagnostic.S4158.severity = none \ No newline at end of file diff --git a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Attributes/AutoDataAdapterAttributeTests.cs b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Attributes/AutoDataAdapterAttributeTests.cs index 206e7c7f..c6610bcf 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Attributes/AutoDataAdapterAttributeTests.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Attributes/AutoDataAdapterAttributeTests.cs @@ -4,10 +4,13 @@ using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Reflection; + using FluentAssertions; + using global::AutoFixture; using global::AutoFixture.Xunit2; using Objectivity.AutoFixture.XUnit2.Core.Attributes; + using Xunit; [Collection("AutoDataAdapterAttribute")] @@ -82,7 +85,7 @@ public void GivenEmptyTestData_WhenGetDataCalled_ThenAutoDataGenerationSkipped() data.Should().Throw(); } - protected string TestMethodWithAbstractTestClass(SpecificTestClass instance, [Frozen]string text, string message) + protected string TestMethodWithAbstractTestClass(SpecificTestClass instance, [Frozen] string text, string message) { return $"{instance}: {text}, {message}"; } @@ -91,7 +94,7 @@ public abstract class AbstractTestClass { } - public class SpecificTestClass : AbstractTestClass + public sealed class SpecificTestClass : AbstractTestClass { private SpecificTestClass() { diff --git a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Attributes/AutoDataBaseAttributeTests.cs b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Attributes/AutoDataBaseAttributeTests.cs index c1607884..9fbdb6ac 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Attributes/AutoDataBaseAttributeTests.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Attributes/AutoDataBaseAttributeTests.cs @@ -1,12 +1,16 @@ namespace Objectivity.AutoFixture.XUnit2.Core.Tests.Attributes { using System; + using FluentAssertions; + using global::AutoFixture; using global::AutoFixture.Xunit2; using Moq; + using Objectivity.AutoFixture.XUnit2.Core.Attributes; using Objectivity.AutoFixture.XUnit2.Core.Providers; + using Xunit; [Collection("AutoDataBaseAttribute")] @@ -54,7 +58,7 @@ public void GivenUninitializedAttributeProvider_WhenConstructorIsInvoked_ThenExc } [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)] - private class AutoDataBaseAttributeUnderTest : AutoDataBaseAttribute + private sealed class AutoDataBaseAttributeUnderTest : AutoDataBaseAttribute { public AutoDataBaseAttributeUnderTest(IFixture fixture, IAutoFixtureAttributeProvider provider) : base(fixture, provider) diff --git a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Attributes/CustomizeWithAttributeTests.cs b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Attributes/CustomizeWithAttributeTests.cs index 95968f9f..d6a56f1e 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Attributes/CustomizeWithAttributeTests.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Attributes/CustomizeWithAttributeTests.cs @@ -2,11 +2,14 @@ { using System; using System.Diagnostics.CodeAnalysis; + using FluentAssertions; + using global::AutoFixture; using global::AutoFixture.Xunit2; using Objectivity.AutoFixture.XUnit2.Core.Attributes; using Objectivity.AutoFixture.XUnit2.Core.Customizations; + using Xunit; [Collection("CustomizeWithAttribute")] diff --git a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Attributes/IgnoreVirtualMembersAttributeTests.cs b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Attributes/IgnoreVirtualMembersAttributeTests.cs index 0618acfc..7151f8f8 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Attributes/IgnoreVirtualMembersAttributeTests.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Attributes/IgnoreVirtualMembersAttributeTests.cs @@ -3,9 +3,11 @@ using System; using System.Diagnostics.CodeAnalysis; using System.Reflection; + using FluentAssertions; using global::AutoFixture.Xunit2; using Objectivity.AutoFixture.XUnit2.Core.Attributes; + using Xunit; [Collection("IgnoreVirtualMembersAttribute")] diff --git a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Attributes/InlineAutoDataBaseAttributeTests.cs b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Attributes/InlineAutoDataBaseAttributeTests.cs index 63b5d6e4..53d0848f 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Attributes/InlineAutoDataBaseAttributeTests.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Attributes/InlineAutoDataBaseAttributeTests.cs @@ -1,12 +1,16 @@ namespace Objectivity.AutoFixture.XUnit2.Core.Tests.Attributes { using System; + using FluentAssertions; + using global::AutoFixture; using global::AutoFixture.Xunit2; using Moq; + using Objectivity.AutoFixture.XUnit2.Core.Attributes; using Objectivity.AutoFixture.XUnit2.Core.Providers; + using Xunit; [Collection("InlineAutoDataBaseAttribute")] @@ -91,7 +95,7 @@ public void GivenUninitializedAttributeProvider_WhenConstructorIsInvoked_ThenExc } [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] - private class InlineAutoDataBaseAttributeUnderTest : InlineAutoDataBaseAttribute + private sealed class InlineAutoDataBaseAttributeUnderTest : InlineAutoDataBaseAttribute { public InlineAutoDataBaseAttributeUnderTest(IFixture fixture, IAutoFixtureInlineAttributeProvider provider, params object[] values) : base(fixture, provider, values) diff --git a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Attributes/MemberAutoDataBaseAttributeTests.cs b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Attributes/MemberAutoDataBaseAttributeTests.cs index 37d165d7..1a69dc96 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Attributes/MemberAutoDataBaseAttributeTests.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Attributes/MemberAutoDataBaseAttributeTests.cs @@ -1,11 +1,14 @@ namespace Objectivity.AutoFixture.XUnit2.Core.Tests.Attributes { using System; + using global::AutoFixture; using global::AutoFixture.Xunit2; using Moq; + using Objectivity.AutoFixture.XUnit2.Core.Attributes; using Objectivity.AutoFixture.XUnit2.Core.Providers; + using Xunit; [Collection("MemberAutoDataBaseAttribute")] @@ -26,7 +29,7 @@ public void GivenUninitializedFixture_WhenConstructorIsInvoked_ThenExceptionIsTh } [AttributeUsage(AttributeTargets.Method, AllowMultiple = true, Inherited = true)] - private class MemberAutoDataBaseAttributeUnderTest : MemberAutoDataBaseAttribute + private sealed class MemberAutoDataBaseAttributeUnderTest : MemberAutoDataBaseAttribute { public MemberAutoDataBaseAttributeUnderTest(IFixture fixture, string memberName, params object[] parameters) : base(fixture, memberName, parameters) diff --git a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Common/CheckTests.cs b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Common/CheckTests.cs index 93c2d2b5..274ea5db 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Common/CheckTests.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Common/CheckTests.cs @@ -2,8 +2,11 @@ { using System; using System.Diagnostics.CodeAnalysis; + using FluentAssertions; + using Objectivity.AutoFixture.XUnit2.Core.Common; + using Xunit; [Collection("Check")] diff --git a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Comparers/CustomizeAttributeComparerTests.cs b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Comparers/CustomizeAttributeComparerTests.cs index 29e8efef..71eb481d 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Comparers/CustomizeAttributeComparerTests.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Comparers/CustomizeAttributeComparerTests.cs @@ -1,19 +1,24 @@ namespace Objectivity.AutoFixture.XUnit2.Core.Tests.Comparers { using System.Collections.Generic; + using FluentAssertions; + using global::AutoFixture; using global::AutoFixture.Xunit2; using Objectivity.AutoFixture.XUnit2.Core.Attributes; using Objectivity.AutoFixture.XUnit2.Core.Comparers; using Objectivity.AutoFixture.XUnit2.Core.Customizations; + using Xunit; + [Collection("CustomizeAttributeComparer")] + [Trait("Category", "Comparers")] public class CustomizeAttributeComparerTests { - private static readonly CustomizeAttributeComparer Comparer = new CustomizeAttributeComparer(); - private static readonly CustomizeWithAttribute CustomizeAttribute = new CustomizeWithAttribute(typeof(DoNotThrowOnRecursionCustomization)); - private static readonly FrozenAttribute FrozenAttribute = new FrozenAttribute(); + private static readonly CustomizeAttributeComparer Comparer = new(); + private static readonly CustomizeWithAttribute CustomizeAttribute = new(typeof(DoNotThrowOnRecursionCustomization)); + private static readonly FrozenAttribute FrozenAttribute = new(); public static IEnumerable TestData { get; } = new[] { diff --git a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Customizations/AutoDataCommonCustomizationTests.cs b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Customizations/AutoDataCommonCustomizationTests.cs index 8df5980a..2b26236c 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Customizations/AutoDataCommonCustomizationTests.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Customizations/AutoDataCommonCustomizationTests.cs @@ -3,6 +3,7 @@ using global::AutoFixture; using global::AutoFixture.Xunit2; using Objectivity.AutoFixture.XUnit2.Core.Customizations; + using Xunit; [Collection("AutoDataCommonCustomization")] diff --git a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Customizations/DoNotThrowOnRecursionCustomizationTests.cs b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Customizations/DoNotThrowOnRecursionCustomizationTests.cs index b7cf134d..d674fc70 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Customizations/DoNotThrowOnRecursionCustomizationTests.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Customizations/DoNotThrowOnRecursionCustomizationTests.cs @@ -3,6 +3,7 @@ using global::AutoFixture; using global::AutoFixture.Xunit2; using Objectivity.AutoFixture.XUnit2.Core.Customizations; + using Xunit; [Collection("DoNotThrowOnRecursionCustomization")] @@ -21,4 +22,4 @@ public void GivenExistingCustomizationForFixture_WhenCustomizeIsInvoked_ThenFixt fixture.ShouldNotThrowOnRecursion(); } } -} \ No newline at end of file +} diff --git a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Customizations/IgnoreVirtualMembersCustomizationTests.cs b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Customizations/IgnoreVirtualMembersCustomizationTests.cs index f188cfd9..40360174 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Customizations/IgnoreVirtualMembersCustomizationTests.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Customizations/IgnoreVirtualMembersCustomizationTests.cs @@ -1,10 +1,13 @@ namespace Objectivity.AutoFixture.XUnit2.Core.Tests.Customizations { using System; + using FluentAssertions; + using global::AutoFixture; using global::AutoFixture.Xunit2; using Objectivity.AutoFixture.XUnit2.Core.Customizations; + using Xunit; [Collection("IgnoreVirtualMembersCustomization")] @@ -15,7 +18,7 @@ public class IgnoreVirtualMembersCustomizationTests [AutoData] public void GivenExistingCustomizationToIgnoreVirtualMembersForFixture_WhenCustomizeIsInvoked_ThenFixtureShouldNotCreateVirtualMembers( Fixture fixture, - [Modest]IgnoreVirtualMembersCustomization customization) + [Modest] IgnoreVirtualMembersCustomization customization) { // Arrange // Act @@ -29,8 +32,8 @@ public void GivenExistingCustomizationToIgnoreVirtualMembersForFixture_WhenCusto [AutoData] public void GivenExistingCustomizationToIgnoreVirtualMembersWithTypeForFixture_WhenCustomizeIsInvoked_ThenFixtureShouldNotCreateVirtualMembers( Fixture fixture, - [Frozen]Type reflectedType, - [Greedy]IgnoreVirtualMembersCustomization customization) + [Frozen] Type reflectedType, + [Greedy] IgnoreVirtualMembersCustomization customization) { // Arrange // Act @@ -63,4 +66,4 @@ public void GivenExistingType_WhenConstructorWithParameterIsInvoked_ThenThatType customization.ReflectedType.Should().BeSameAs(reflectedType); } } -} \ No newline at end of file +} diff --git a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Customizations/OmitOnRecursionCustomizationTests.cs b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Customizations/OmitOnRecursionCustomizationTests.cs index 7386f598..e4c191dd 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Customizations/OmitOnRecursionCustomizationTests.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Customizations/OmitOnRecursionCustomizationTests.cs @@ -3,6 +3,7 @@ using global::AutoFixture; using global::AutoFixture.Xunit2; using Objectivity.AutoFixture.XUnit2.Core.Customizations; + using Xunit; [Collection("OmitOnRecursionCustomization")] @@ -21,4 +22,4 @@ public void GivenExistingCustomizationForFixture_WhenCustomizeIsInvoked_ThenFixt fixture.ShouldOmitRecursion(); } } -} \ No newline at end of file +} diff --git a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/FixtureAssertionExtensions.cs b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/FixtureAssertionExtensions.cs index 099ce349..6535b669 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/FixtureAssertionExtensions.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/FixtureAssertionExtensions.cs @@ -2,8 +2,11 @@ { using System; using System.Linq; + using FluentAssertions; + using global::AutoFixture; + using Objectivity.AutoFixture.XUnit2.Core.SpecimenBuilders; internal static class FixtureAssertionExtensions @@ -38,4 +41,4 @@ internal static void ShouldIgnoreVirtualMembers(this IFixture fixture, Type refl .ContainSingle(c => c.ReflectedType == reflectedType); } } -} \ No newline at end of file +} diff --git a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/MemberData/MemberAutoDataItemConverterTests.cs b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/MemberData/MemberAutoDataItemConverterTests.cs index 35bae2e9..5d163e77 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/MemberData/MemberAutoDataItemConverterTests.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/MemberData/MemberAutoDataItemConverterTests.cs @@ -3,11 +3,16 @@ using System; using System.Collections.Generic; using System.Reflection; + using FluentAssertions; + using global::AutoFixture; + using Moq; + using Objectivity.AutoFixture.XUnit2.Core.MemberData; using Objectivity.AutoFixture.XUnit2.Core.Providers; + using Xunit; using Xunit.Sdk; @@ -15,9 +20,9 @@ [Trait("Category", "MemberData")] public class MemberAutoDataItemConverterTests { - private readonly Fixture fixture = new Fixture(); - private readonly Mock dataAttributeProvider = new Mock(); - private readonly Mock dataAttribute = new Mock(); + private readonly Fixture fixture = new(); + private readonly Mock dataAttributeProvider = new(); + private readonly Mock dataAttribute = new(); private readonly IDataItemConverter converter; private readonly Type memberType = typeof(MemberAutoDataItemConverterTests); private readonly MethodInfo testMethod; @@ -29,7 +34,7 @@ public MemberAutoDataItemConverterTests() this.dataAttributeProvider.Setup(p => p.GetAttribute(this.fixture, It.IsAny())).Returns(this.dataAttribute.Object); this.dataAttribute.Setup(a => a.GetData(It.IsAny())).Returns(data); this.converter = new MemberAutoDataItemConverter(this.fixture, this.dataAttributeProvider.Object); - this.testMethod = this.memberType.GetMethod(nameof(this.TestMethod), BindingFlags.Instance | BindingFlags.NonPublic); + this.testMethod = this.memberType.GetMethod(nameof(this.MethodUnderTest), BindingFlags.Instance | BindingFlags.NonPublic); this.memberName = this.fixture.Create(); } @@ -84,8 +89,9 @@ public void GivenUninitializedTestMethod_WhenConvertIsInvoked_ThenExceptionIsThr Assert.Throws(() => this.converter.Convert(method, item, this.memberName, this.memberType)); } - protected void TestMethod() + protected void MethodUnderTest() { + // Empty method under test } } } diff --git a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Objectivity.AutoFixture.XUnit2.Core.Tests.csproj b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Objectivity.AutoFixture.XUnit2.Core.Tests.csproj index f5076faa..c0b2a89b 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Objectivity.AutoFixture.XUnit2.Core.Tests.csproj +++ b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Objectivity.AutoFixture.XUnit2.Core.Tests.csproj @@ -1,11 +1,16 @@  - netcoreapp2.1;netcoreapp3.1 - $(TargetFrameworks);net46;net47;net48 - false - ..\Analysers.Tests.ruleset + net7.0 + $(TargetFrameworks);net472;net48 + false true + true + latest + All + true + latest + true @@ -35,43 +40,55 @@ - - - - + + + + all - runtime; build; native; contentfiles; analyzers + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive - - - + + all - runtime; build; native; contentfiles; analyzers + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive - - + all runtime; build; native; contentfiles; analyzers; buildtransitive - all - runtime; build; native; contentfiles; analyzers + runtime; build; native; contentfiles; analyzers; buildtransitive - + - - - - - - + + + + + + all - runtime; build; native; contentfiles; analyzers + runtime; build; native; contentfiles; analyzers; buildtransitive - + all - runtime; build; native; contentfiles; analyzers + runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Properties/AssemblyInfo.cs b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Properties/AssemblyInfo.cs index fdef282d..afd4c711 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Properties/AssemblyInfo.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Properties/AssemblyInfo.cs @@ -17,4 +17,4 @@ [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("be5bf6e2-2edc-4223-a89b-ae1d4be1ff4e")] \ No newline at end of file +[assembly: Guid("be5bf6e2-2edc-4223-a89b-ae1d4be1ff4e")] diff --git a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Providers/AutoDataAttributeProviderTests.cs b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Providers/AutoDataAttributeProviderTests.cs index e8462298..44f26ef2 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Providers/AutoDataAttributeProviderTests.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Providers/AutoDataAttributeProviderTests.cs @@ -1,11 +1,14 @@ namespace Objectivity.AutoFixture.XUnit2.Core.Tests.Providers { using System.Diagnostics.CodeAnalysis; + using FluentAssertions; + using global::AutoFixture; using global::AutoFixture.Xunit2; using Objectivity.AutoFixture.XUnit2.Core.Attributes; using Objectivity.AutoFixture.XUnit2.Core.Providers; + using Xunit; [Collection("AutoDataAttributeProvider")] diff --git a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Providers/InlineAutoDataAttributeProviderTests.cs b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Providers/InlineAutoDataAttributeProviderTests.cs index 8d81c218..8eec9e14 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Providers/InlineAutoDataAttributeProviderTests.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/Providers/InlineAutoDataAttributeProviderTests.cs @@ -1,11 +1,14 @@ namespace Objectivity.AutoFixture.XUnit2.Core.Tests.Providers { using System.Diagnostics.CodeAnalysis; + using FluentAssertions; + using global::AutoFixture; using global::AutoFixture.Xunit2; using Objectivity.AutoFixture.XUnit2.Core.Attributes; using Objectivity.AutoFixture.XUnit2.Core.Providers; + using Xunit; [Collection("InlineAutoDataAttributeProvider")] diff --git a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/SpecimenBuilders/IgnoreVirtualMembersSpecimenBuilderTests.cs b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/SpecimenBuilders/IgnoreVirtualMembersSpecimenBuilderTests.cs index 03b967a7..ed84e9de 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core.Tests/SpecimenBuilders/IgnoreVirtualMembersSpecimenBuilderTests.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core.Tests/SpecimenBuilders/IgnoreVirtualMembersSpecimenBuilderTests.cs @@ -2,11 +2,14 @@ { using System; using System.Diagnostics.CodeAnalysis; + using FluentAssertions; using global::AutoFixture.Kernel; using global::AutoFixture.Xunit2; using Moq; + using Objectivity.AutoFixture.XUnit2.Core.SpecimenBuilders; + using Xunit; [Collection("IgnoreVirtualMembersSpecimenBuilder")] @@ -46,7 +49,7 @@ public void GivenExistingType_WhenConstructorWithParameterIsInvoked_ThenThatType [Theory(DisplayName = "GIVEN uninitialized request WHEN Create is invoked THEN NoSpecimen is returned")] [AutoData] public void GivenUninitializedRequest_WhenCreateInvoked_ThenNoSpecimenInstance( - [Modest]IgnoreVirtualMembersSpecimenBuilder builder) + [Modest] IgnoreVirtualMembersSpecimenBuilder builder) { // Arrange // Act @@ -59,7 +62,7 @@ public void GivenUninitializedRequest_WhenCreateInvoked_ThenNoSpecimenInstance( [Theory(DisplayName = "GIVEN not PropertyInfo request WHEN Create is invoked THEN NoSpecimen is returned")] [AutoData] public void GivenNotPropertyInfoRequest_WhenCreateInvoked_ThenNoSpecimenInstance( - [Modest]IgnoreVirtualMembersSpecimenBuilder builder) + [Modest] IgnoreVirtualMembersSpecimenBuilder builder) { // Arrange // Act @@ -72,7 +75,7 @@ public void GivenNotPropertyInfoRequest_WhenCreateInvoked_ThenNoSpecimenInstance [Theory(DisplayName = "GIVEN not virtual PropertyInfo request WHEN Create is invoked THEN NoSpecimen is returned")] [AutoData] public void GivenNotVirtualPropertyInfoRequest_WhenCreateInvoked_ThenNoSpecimenInstance( - [Modest]IgnoreVirtualMembersSpecimenBuilder builder) + [Modest] IgnoreVirtualMembersSpecimenBuilder builder) { // Arrange var notVirtualPropertyInfo = typeof(FakeObject).GetProperty(nameof(FakeObject.NotVirtualProperty)); @@ -87,8 +90,8 @@ public void GivenNotVirtualPropertyInfoRequest_WhenCreateInvoked_ThenNoSpecimenI [Theory(DisplayName = "GIVEN virtual PropertyInfo request but hosted in different type WHEN Create is invoked THEN NoSpecimen is returned")] [AutoData] public void GivenVirtualPropertyInfoRequestHostedInDifferentType_WhenCreateInvoked_ThenNoSpecimenInstance( - [Frozen]Type reflectedType, - [Greedy]IgnoreVirtualMembersSpecimenBuilder builder) + [Frozen] Type reflectedType, + [Greedy] IgnoreVirtualMembersSpecimenBuilder builder) { // Arrange var virtualPropertyInfo = typeof(FakeObject).GetProperty(nameof(FakeObject.VirtualProperty)); @@ -104,7 +107,7 @@ public void GivenVirtualPropertyInfoRequestHostedInDifferentType_WhenCreateInvok [Theory(DisplayName = "GIVEN virtual PropertyInfo request WHEN Create is invoked THEN OmitSpecimen is returned")] [AutoData] public void GivenVirtualPropertyInfoRequest_WhenCreateInvoked_ThenOmitSpecimenInstance( - [Modest]IgnoreVirtualMembersSpecimenBuilder builder) + [Modest] IgnoreVirtualMembersSpecimenBuilder builder) { // Arrange var virtualPropertyInfo = typeof(FakeObject).GetProperty(nameof(FakeObject.VirtualProperty)); diff --git a/src/Objectivity.AutoFixture.XUnit2.Core/Attributes/AutoDataAdapterAttribute.cs b/src/Objectivity.AutoFixture.XUnit2.Core/Attributes/AutoDataAdapterAttribute.cs index 4ec55245..ec1a232a 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core/Attributes/AutoDataAdapterAttribute.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core/Attributes/AutoDataAdapterAttribute.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; + using global::AutoFixture; using global::AutoFixture.Kernel; using global::AutoFixture.Xunit2; @@ -17,7 +18,7 @@ public AutoDataAdapterAttribute(IFixture fixture, params object[] inlineValues) : base(() => fixture) { this.AdaptedFixture = fixture.NotNull(nameof(fixture)); - this.InlineValues = inlineValues ?? Array.Empty(); + this.InlineValues = Array.AsReadOnly(inlineValues ?? Array.Empty()); } public IFixture AdaptedFixture { get; } @@ -26,7 +27,7 @@ public AutoDataAdapterAttribute(IFixture fixture, params object[] inlineValues) public override IEnumerable GetData(MethodInfo testMethod) { - if (testMethod == null) + if (testMethod is null) { throw new ArgumentNullException(nameof(testMethod)); } diff --git a/src/Objectivity.AutoFixture.XUnit2.Core/Attributes/AutoDataBaseAttribute.cs b/src/Objectivity.AutoFixture.XUnit2.Core/Attributes/AutoDataBaseAttribute.cs index f4ebd012..9446381f 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core/Attributes/AutoDataBaseAttribute.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core/Attributes/AutoDataBaseAttribute.cs @@ -3,10 +3,13 @@ using System; using System.Collections.Generic; using System.Reflection; + using global::AutoFixture; + using Objectivity.AutoFixture.XUnit2.Core.Common; using Objectivity.AutoFixture.XUnit2.Core.Customizations; using Objectivity.AutoFixture.XUnit2.Core.Providers; + using Xunit.Sdk; [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)] @@ -23,6 +26,7 @@ protected AutoDataBaseAttribute(IFixture fixture, IAutoFixtureAttributeProvider /// /// Gets or sets a value indicating whether virtual members should be ignored during object creation. /// + /// Indicates whether virtual members should be ignored during object creation. public bool IgnoreVirtualMembers { get; set; } public IAutoFixtureAttributeProvider Provider { get; } diff --git a/src/Objectivity.AutoFixture.XUnit2.Core/Attributes/CustomizeWithAttribute.cs b/src/Objectivity.AutoFixture.XUnit2.Core/Attributes/CustomizeWithAttribute.cs index e1ed49ac..df9226b8 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core/Attributes/CustomizeWithAttribute.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core/Attributes/CustomizeWithAttribute.cs @@ -2,15 +2,16 @@ { using System; using System.Reflection; + using global::AutoFixture; using global::AutoFixture.Xunit2; [AttributeUsage(AttributeTargets.Parameter, AllowMultiple = true)] - public class CustomizeWithAttribute : CustomizeAttribute + public sealed class CustomizeWithAttribute : CustomizeAttribute { public CustomizeWithAttribute(Type type, params object[] args) { - if (type == null) + if (type is null) { throw new ArgumentNullException(nameof(type)); } @@ -34,4 +35,4 @@ public override ICustomization GetCustomization(ParameterInfo parameter) return Activator.CreateInstance(this.Type, this.Args) as ICustomization; } } -} \ No newline at end of file +} diff --git a/src/Objectivity.AutoFixture.XUnit2.Core/Attributes/IgnoreVirtualMembersAttribute.cs b/src/Objectivity.AutoFixture.XUnit2.Core/Attributes/IgnoreVirtualMembersAttribute.cs index c369dffb..219b4eac 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core/Attributes/IgnoreVirtualMembersAttribute.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core/Attributes/IgnoreVirtualMembersAttribute.cs @@ -2,6 +2,7 @@ { using System; using System.Reflection; + using global::AutoFixture; using global::AutoFixture.Xunit2; using Objectivity.AutoFixture.XUnit2.Core.Common; diff --git a/src/Objectivity.AutoFixture.XUnit2.Core/Attributes/InlineAutoDataBaseAttribute.cs b/src/Objectivity.AutoFixture.XUnit2.Core/Attributes/InlineAutoDataBaseAttribute.cs index 9955c403..cf5dafc4 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core/Attributes/InlineAutoDataBaseAttribute.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core/Attributes/InlineAutoDataBaseAttribute.cs @@ -2,26 +2,28 @@ { using System; using System.Collections.Generic; - using System.Collections.ObjectModel; - using System.Diagnostics.CodeAnalysis; using System.Reflection; + using global::AutoFixture; + using Objectivity.AutoFixture.XUnit2.Core.Common; using Objectivity.AutoFixture.XUnit2.Core.Customizations; using Objectivity.AutoFixture.XUnit2.Core.Providers; + using Xunit.Sdk; - [SuppressMessage("Microsoft.Design", "CA1019:DefineAccessorsForAttributeArguments", Justification = "Parameter 'values' is exposed with ReadOnlyCollection.")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] public abstract class InlineAutoDataBaseAttribute : DataAttribute { - private readonly object[] values; + private readonly object[] inputValues; + private readonly Lazy> readonlyValues; protected InlineAutoDataBaseAttribute(IFixture fixture, IAutoFixtureInlineAttributeProvider provider, params object[] values) { this.Provider = provider.NotNull(nameof(provider)); this.Fixture = fixture.NotNull(nameof(fixture)); - this.values = values ?? Array.Empty(); + this.inputValues = values ?? Array.Empty(); + this.readonlyValues = new Lazy>(() => Array.AsReadOnly(this.inputValues)); } public IFixture Fixture { get; } @@ -31,16 +33,17 @@ protected InlineAutoDataBaseAttribute(IFixture fixture, IAutoFixtureInlineAttrib /// /// Gets or sets a value indicating whether virtual members should be ignored during object creation. /// + /// Indicates whether virtual members should be ignored during object creation. public bool IgnoreVirtualMembers { get; set; } - public IReadOnlyCollection Values => new ReadOnlyCollection(this.values); + public IReadOnlyCollection Values => this.readonlyValues.Value; public override IEnumerable GetData(MethodInfo testMethod) { this.Fixture.Customize(new AutoDataCommonCustomization(this.IgnoreVirtualMembers)); this.Customize(this.Fixture); - return this.Provider.GetAttribute(this.Fixture, this.values).GetData(testMethod); + return this.Provider.GetAttribute(this.Fixture, this.inputValues).GetData(testMethod); } protected abstract IFixture Customize(IFixture fixture); diff --git a/src/Objectivity.AutoFixture.XUnit2.Core/Attributes/MemberAutoDataBaseAttribute.cs b/src/Objectivity.AutoFixture.XUnit2.Core/Attributes/MemberAutoDataBaseAttribute.cs index 61a63b4d..20af089c 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core/Attributes/MemberAutoDataBaseAttribute.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core/Attributes/MemberAutoDataBaseAttribute.cs @@ -3,11 +3,14 @@ using System; using System.Collections.Generic; using System.Reflection; + using global::AutoFixture; + using Objectivity.AutoFixture.XUnit2.Core.Common; using Objectivity.AutoFixture.XUnit2.Core.Customizations; using Objectivity.AutoFixture.XUnit2.Core.MemberData; using Objectivity.AutoFixture.XUnit2.Core.Providers; + using Xunit; using Xunit.Sdk; @@ -26,11 +29,13 @@ protected MemberAutoDataBaseAttribute(IFixture fixture, string memberName, param /// /// Gets or sets a value indicating whether virtual members should be ignored during object creation. /// + /// Indicates whether virtual members should be ignored during object creation. public bool IgnoreVirtualMembers { get; set; } /// /// Gets or sets a value indicating whether to share a fixture across all data items; true by default. /// + /// Indicates whether to share a fixture across all data items; true by default. public bool ShareFixture { get; set; } = true; public override IEnumerable GetData(MethodInfo testMethod) diff --git a/src/Objectivity.AutoFixture.XUnit2.Core/Common/Check.cs b/src/Objectivity.AutoFixture.XUnit2.Core/Common/Check.cs index 68abcaac..daecc13a 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core/Common/Check.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core/Common/Check.cs @@ -2,6 +2,7 @@ { using System; using System.Diagnostics; + using JetBrains.Annotations; /// @@ -12,10 +13,10 @@ public static class Check { [ContractAnnotation("value:null => halt")] public static T NotNull( - [NoEnumeration] [ValidatedNotNull] this T value, - [InvokerParameterName] [NotNull] string parameterName) + [NoEnumeration][ValidatedNotNull] this T value, + [InvokerParameterName][NotNull] string parameterName) { - if (ReferenceEquals(value, null)) + if (value is null) { throw new ArgumentNullException(parameterName); } diff --git a/src/Objectivity.AutoFixture.XUnit2.Core/Common/ValidatedNotNullAttribute.cs b/src/Objectivity.AutoFixture.XUnit2.Core/Common/ValidatedNotNullAttribute.cs index acc12442..9fedb738 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core/Common/ValidatedNotNullAttribute.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core/Common/ValidatedNotNullAttribute.cs @@ -6,4 +6,4 @@ internal sealed class ValidatedNotNullAttribute : Attribute { } -} \ No newline at end of file +} diff --git a/src/Objectivity.AutoFixture.XUnit2.Core/Comparers/CustomizeAttributeComparer.cs b/src/Objectivity.AutoFixture.XUnit2.Core/Comparers/CustomizeAttributeComparer.cs index 721e81b3..db3366f1 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core/Comparers/CustomizeAttributeComparer.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core/Comparers/CustomizeAttributeComparer.cs @@ -1,23 +1,26 @@ namespace Objectivity.AutoFixture.XUnit2.Core.Comparers { using System.Collections.Generic; + using global::AutoFixture; using global::AutoFixture.Xunit2; - // Direct copy from the AutoFixture source code as the original class is internal. + /// + /// Direct copy from the AutoFixture source code as the original class is internal. + /// internal class CustomizeAttributeComparer : Comparer { public override int Compare(IParameterCustomizationSource x, IParameterCustomizationSource y) { - var xFrozen = x is FrozenAttribute; - var yFrozen = y is FrozenAttribute; + var isXFrozen = x is FrozenAttribute; + var isYFrozen = y is FrozenAttribute; - if (xFrozen && !yFrozen) + if (isXFrozen && !isYFrozen) { return 1; } - if (yFrozen && !xFrozen) + if (isYFrozen && !isXFrozen) { return -1; } diff --git a/src/Objectivity.AutoFixture.XUnit2.Core/Customizations/AutoDataCommonCustomization.cs b/src/Objectivity.AutoFixture.XUnit2.Core/Customizations/AutoDataCommonCustomization.cs index fd96e1bf..4bb7c40d 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core/Customizations/AutoDataCommonCustomization.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core/Customizations/AutoDataCommonCustomization.cs @@ -1,6 +1,7 @@ namespace Objectivity.AutoFixture.XUnit2.Core.Customizations { using global::AutoFixture; + using Objectivity.AutoFixture.XUnit2.Core.Common; public class AutoDataCommonCustomization : ICustomization @@ -24,4 +25,4 @@ public void Customize(IFixture fixture) } } } -} \ No newline at end of file +} diff --git a/src/Objectivity.AutoFixture.XUnit2.Core/Customizations/DoNotThrowOnRecursionCustomization.cs b/src/Objectivity.AutoFixture.XUnit2.Core/Customizations/DoNotThrowOnRecursionCustomization.cs index 36c13568..c08f89f8 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core/Customizations/DoNotThrowOnRecursionCustomization.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core/Customizations/DoNotThrowOnRecursionCustomization.cs @@ -1,7 +1,9 @@ namespace Objectivity.AutoFixture.XUnit2.Core.Customizations { using System.Linq; + using global::AutoFixture; + using Objectivity.AutoFixture.XUnit2.Core.Common; public class DoNotThrowOnRecursionCustomization : ICustomization @@ -16,4 +18,4 @@ public void Customize(IFixture fixture) .ForEach(b => fixture.Behaviors.Remove(b)); } } -} \ No newline at end of file +} diff --git a/src/Objectivity.AutoFixture.XUnit2.Core/Customizations/IgnoreVirtualMembersCustomization.cs b/src/Objectivity.AutoFixture.XUnit2.Core/Customizations/IgnoreVirtualMembersCustomization.cs index fc3331c4..1c5d1d23 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core/Customizations/IgnoreVirtualMembersCustomization.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core/Customizations/IgnoreVirtualMembersCustomization.cs @@ -1,7 +1,9 @@ namespace Objectivity.AutoFixture.XUnit2.Core.Customizations { using System; + using global::AutoFixture; + using Objectivity.AutoFixture.XUnit2.Core.Common; using Objectivity.AutoFixture.XUnit2.Core.SpecimenBuilders; @@ -24,4 +26,4 @@ public void Customize(IFixture fixture) fixture.NotNull(nameof(fixture)).Customizations.Add(new IgnoreVirtualMembersSpecimenBuilder(this.ReflectedType)); } } -} \ No newline at end of file +} diff --git a/src/Objectivity.AutoFixture.XUnit2.Core/Customizations/OmitOnRecursionCustomization.cs b/src/Objectivity.AutoFixture.XUnit2.Core/Customizations/OmitOnRecursionCustomization.cs index 8b5b0a55..b65d5ac2 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core/Customizations/OmitOnRecursionCustomization.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core/Customizations/OmitOnRecursionCustomization.cs @@ -1,6 +1,7 @@ namespace Objectivity.AutoFixture.XUnit2.Core.Customizations { using global::AutoFixture; + using Objectivity.AutoFixture.XUnit2.Core.Common; public class OmitOnRecursionCustomization : ICustomization @@ -13,4 +14,4 @@ public void Customize(IFixture fixture) .Add(new OmitOnRecursionBehavior()); } } -} \ No newline at end of file +} diff --git a/src/Objectivity.AutoFixture.XUnit2.Core/MemberData/IDataItemConverter.cs b/src/Objectivity.AutoFixture.XUnit2.Core/MemberData/IDataItemConverter.cs index f1019806..48d04849 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core/MemberData/IDataItemConverter.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core/MemberData/IDataItemConverter.cs @@ -7,4 +7,4 @@ public interface IDataItemConverter { object[] Convert(MethodInfo testMethod, object item, string memberName, Type memberType); } -} \ No newline at end of file +} diff --git a/src/Objectivity.AutoFixture.XUnit2.Core/MemberData/MemberAutoDataItemConverter.cs b/src/Objectivity.AutoFixture.XUnit2.Core/MemberData/MemberAutoDataItemConverter.cs index d7b01309..3fffe271 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core/MemberData/MemberAutoDataItemConverter.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core/MemberData/MemberAutoDataItemConverter.cs @@ -4,7 +4,9 @@ using System.Globalization; using System.Linq; using System.Reflection; + using global::AutoFixture; + using Objectivity.AutoFixture.XUnit2.Core.Common; using Objectivity.AutoFixture.XUnit2.Core.Providers; @@ -22,7 +24,7 @@ public MemberAutoDataItemConverter(IFixture fixture, IAutoFixtureInlineAttribute public object[] Convert(MethodInfo testMethod, object item, string memberName, Type memberType) { - if (item == null) + if (item is null) { return null; } @@ -50,4 +52,4 @@ private static object[] EnsureDataStructure(object item, string memberName, Type throw new ArgumentException(message); } } -} \ No newline at end of file +} diff --git a/src/Objectivity.AutoFixture.XUnit2.Core/Objectivity.AutoFixture.XUnit2.Core.csproj b/src/Objectivity.AutoFixture.XUnit2.Core/Objectivity.AutoFixture.XUnit2.Core.csproj index cb3b5890..56caddc0 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core/Objectivity.AutoFixture.XUnit2.Core.csproj +++ b/src/Objectivity.AutoFixture.XUnit2.Core/Objectivity.AutoFixture.XUnit2.Core.csproj @@ -2,9 +2,14 @@ netstandard2.0;netstandard2.1 - $(TargetFrameworks);net46;net47;net48 - ..\Analysers.ruleset + $(TargetFrameworks);net472;net48 true + true + latest + All + true + latest + false @@ -16,6 +21,11 @@ $(StrongNameKeyPath) + + + + + @@ -31,14 +41,26 @@ - - - - - runtime; build; native; contentfiles; analyzers + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -47,9 +69,9 @@ all - - - + + + \ No newline at end of file diff --git a/src/Objectivity.AutoFixture.XUnit2.Core/Properties/AssemblyInfo.cs b/src/Objectivity.AutoFixture.XUnit2.Core/Properties/AssemblyInfo.cs index ce1fab75..cdf78de1 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core/Properties/AssemblyInfo.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core/Properties/AssemblyInfo.cs @@ -21,4 +21,4 @@ [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("6717bc95-f2d2-4eae-a680-d871d58a773b")] \ No newline at end of file +[assembly: Guid("6717bc95-f2d2-4eae-a680-d871d58a773b")] diff --git a/src/Objectivity.AutoFixture.XUnit2.Core/Providers/AutoDataAttributeProvider.cs b/src/Objectivity.AutoFixture.XUnit2.Core/Providers/AutoDataAttributeProvider.cs index 2d4f2291..21cefb0c 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core/Providers/AutoDataAttributeProvider.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core/Providers/AutoDataAttributeProvider.cs @@ -1,7 +1,9 @@ namespace Objectivity.AutoFixture.XUnit2.Core.Providers { using global::AutoFixture; + using Objectivity.AutoFixture.XUnit2.Core.Attributes; + using Xunit.Sdk; public sealed class AutoDataAttributeProvider : IAutoFixtureAttributeProvider @@ -11,4 +13,4 @@ public DataAttribute GetAttribute(IFixture fixture) return new AutoDataAdapterAttribute(fixture); } } -} \ No newline at end of file +} diff --git a/src/Objectivity.AutoFixture.XUnit2.Core/Providers/IAutoFixtureAttributeProvider.cs b/src/Objectivity.AutoFixture.XUnit2.Core/Providers/IAutoFixtureAttributeProvider.cs index 3b6d7418..5ac3fc3e 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core/Providers/IAutoFixtureAttributeProvider.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core/Providers/IAutoFixtureAttributeProvider.cs @@ -1,10 +1,11 @@ namespace Objectivity.AutoFixture.XUnit2.Core.Providers { using global::AutoFixture; + using Xunit.Sdk; public interface IAutoFixtureAttributeProvider { DataAttribute GetAttribute(IFixture fixture); } -} \ No newline at end of file +} diff --git a/src/Objectivity.AutoFixture.XUnit2.Core/Providers/IAutoFixtureInlineAttributeProvider.cs b/src/Objectivity.AutoFixture.XUnit2.Core/Providers/IAutoFixtureInlineAttributeProvider.cs index 77a422df..5ec5f132 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core/Providers/IAutoFixtureInlineAttributeProvider.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core/Providers/IAutoFixtureInlineAttributeProvider.cs @@ -1,10 +1,11 @@ namespace Objectivity.AutoFixture.XUnit2.Core.Providers { using global::AutoFixture; + using Xunit.Sdk; public interface IAutoFixtureInlineAttributeProvider { DataAttribute GetAttribute(IFixture fixture, params object[] values); } -} \ No newline at end of file +} diff --git a/src/Objectivity.AutoFixture.XUnit2.Core/Providers/InlineAutoDataAttributeProvider.cs b/src/Objectivity.AutoFixture.XUnit2.Core/Providers/InlineAutoDataAttributeProvider.cs index f06d96c3..8ba56909 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core/Providers/InlineAutoDataAttributeProvider.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core/Providers/InlineAutoDataAttributeProvider.cs @@ -1,9 +1,9 @@ namespace Objectivity.AutoFixture.XUnit2.Core.Providers { using global::AutoFixture; - using global::AutoFixture.Xunit2; + using Objectivity.AutoFixture.XUnit2.Core.Attributes; - using Xunit; + using Xunit.Sdk; public sealed class InlineAutoDataAttributeProvider : IAutoFixtureInlineAttributeProvider @@ -13,4 +13,4 @@ public DataAttribute GetAttribute(IFixture fixture, params object[] values) return new AutoDataAdapterAttribute(fixture, values); } } -} \ No newline at end of file +} diff --git a/src/Objectivity.AutoFixture.XUnit2.Core/SpecimenBuilders/IgnoreVirtualMembersSpecimenBuilder.cs b/src/Objectivity.AutoFixture.XUnit2.Core/SpecimenBuilders/IgnoreVirtualMembersSpecimenBuilder.cs index ecc06ace..4c675690 100644 --- a/src/Objectivity.AutoFixture.XUnit2.Core/SpecimenBuilders/IgnoreVirtualMembersSpecimenBuilder.cs +++ b/src/Objectivity.AutoFixture.XUnit2.Core/SpecimenBuilders/IgnoreVirtualMembersSpecimenBuilder.cs @@ -1,4 +1,4 @@ -namespace Objectivity.AutoFixture.XUnit2.Core.SpecimenBuilders +namespace Objectivity.AutoFixture.XUnit2.Core.SpecimenBuilders { using System; using System.Reflection; @@ -21,9 +21,9 @@ public IgnoreVirtualMembersSpecimenBuilder(Type reflectedType) public object Create(object request, ISpecimenContext context) { var pi = request as PropertyInfo; - if (pi != null) //// is a property + if (pi is not null) //// is a property { - if (this.ReflectedType == null || //// is hosted anywhere + if (this.ReflectedType is null || //// is hosted anywhere this.ReflectedType == pi.ReflectedType) //// is hosted in defined type { if (pi.GetGetMethod().IsVirtual) @@ -36,4 +36,4 @@ public object Create(object request, ISpecimenContext context) return new NoSpecimen(); } } -} \ No newline at end of file +}