diff --git a/.editorconfig b/.editorconfig index 63e20faaef..52e22ee838 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,15 +8,6 @@ root = true indent_style = space # (Please don't specify an indent_size here; that has too many unintended consequences.) -# RS1024: Compare symbols correctly -# https://github.com/dotnet/roslyn-analyzers/issues/3389 -dotnet_diagnostic.RS1024.severity = none - -# IDE0078: Use pattern matching -# https://github.com/dotnet/roslyn/issues/51691 -# https://github.com/dotnet/roslyn/issues/51693 -dotnet_diagnostic.IDE0078.severity = silent - # Code files [*.{cs,csx,vb,vbx}] indent_size = 4 @@ -181,67 +172,9 @@ visual_basic_style_unused_value_assignment_preference = unused_local_variable:wa ### Configuration for IDE code style by diagnostic IDs ### [*.{cs,vb}] -# Default severity for all IDE code style rules with category 'Style' -dotnet_analyzer_diagnostic.category-Style.severity = warning - -# Default severity for all IDE code quality rules with category 'CodeQuality' -dotnet_analyzer_diagnostic.category-CodeQuality.severity = warning - -# IDE0066: Convert switch statement to expression -dotnet_diagnostic.IDE0066.severity = suggestion - # IDE0073: File header file_header_template = Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -# IDE0001: Name can be simplified -dotnet_diagnostic.IDE0001.severity = silent - -# IDE0002: Name can be simplified -dotnet_diagnostic.IDE0002.severity = silent - -# IDE0003: Name can be simplified -dotnet_diagnostic.IDE0003.severity = silent - -# IDE0007: Use 'var' instead of explicit type -dotnet_diagnostic.IDE0007.severity = silent - -# IDE0010: Add missing cases in switch statement -dotnet_diagnostic.IDE0010.severity = silent - -# IDE0017: Object initialization can be simplified -dotnet_diagnostic.IDE0017.severity = silent - -# IDE0045: 'if' statement can be simplified -dotnet_diagnostic.IDE0045.severity = silent - -# IDE0046: 'if' statement can be simplified -dotnet_diagnostic.IDE0046.severity = silent - -# IDE0048: Parentheses should be added for clarity -dotnet_diagnostic.IDE0048.severity = silent - -# IDE0058: Expression value is never used -dotnet_diagnostic.IDE0058.severity = silent - -# IDE0065: Using directives must be placed outside of a namespace declaration -# Can remove the below entry and turn it into a warning once https://github.com/dotnet/roslyn/issues/43271 is resolved. -dotnet_diagnostic.IDE0065.severity = silent - -# IDE0072: Populate switch -dotnet_diagnostic.IDE0072.severity = silent - -# IDE0083: Use pattern matching -dotnet_diagnostic.IDE0083.severity = silent - -# IDE0120: Simplify linq expression -dotnet_diagnostic.IDE0120.severity = silent - -# IDE0130: Namespace does not match folder structure -dotnet_diagnostic.IDE0130.severity = silent - -# IDE0150: Null check can be clarified -dotnet_diagnostic.IDE0150.severity = silent - # IDE2000: Allow multiple blank lines dotnet_style_allow_multiple_blank_lines_experimental = false @@ -275,23 +208,6 @@ dotnet_code_quality.CA1720.api_surface = public # CA1715: Identifiers should have correct prefix dotnet_code_quality.CA1715.exclude_single_letter_type_parameters = true -# CA1002: Do not expose generic lists -dotnet_diagnostic.CA1002.severity = suggestion - -# CA1024: Use properties where appropriate -dotnet_diagnostic.CA1024.severity = suggestion - -# CA1033: Interface methods should be callable by child types -dotnet_diagnostic.CA1033.severity = suggestion - -# CA1307: Specify StringComparison for clarity -dotnet_diagnostic.CA1307.severity = suggestion - -# CA1711: Identifiers should not have incorrect suffix -dotnet_diagnostic.CA1711.severity = suggestion - -# CA1309: Use ordinal string comparison -dotnet_diagnostic.CA1309.severity = suggestion # CA1305: Pass IFormatProvider - https://github.com/dotnet/roslyn-analyzers/issues/6379 dotnet_diagnostic.CA1305.severity = suggestion @@ -304,12 +220,3 @@ dotnet_diagnostic.CA1851.severity = suggestion # Analyzers bail-out if the PublicAPI.*.txt file is not found dotnet_public_api_analyzer.require_api_files = true - -### Configuration for vs-threading analyzers executed on this repo ### -[*.{cs,vb}] - -# VSTHRD002: Avoid problematic synchronous waits -dotnet_diagnostic.VSTHRD002.severity = none - -# VSTHRD011: Use AsyncLazy -dotnet_diagnostic.VSTHRD011.severity = none diff --git a/Directory.Build.targets b/Directory.Build.targets index c419f7bb81..0283343778 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -50,6 +50,16 @@ + + + + + + + + + + - \ No newline at end of file + diff --git a/eng/Analyzers_NonShippingRules.ruleset b/eng/Analyzers_NonShippingRules.ruleset deleted file mode 100644 index 8412e1123d..0000000000 --- a/eng/Analyzers_NonShippingRules.ruleset +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/eng/Analyzers_ShippingRules.ruleset b/eng/Analyzers_ShippingRules.ruleset deleted file mode 100644 index ae3024eafe..0000000000 --- a/eng/Analyzers_ShippingRules.ruleset +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/eng/globalconfigs/Common.globalconfig b/eng/globalconfigs/Common.globalconfig new file mode 100644 index 0000000000..1af5f32577 --- /dev/null +++ b/eng/globalconfigs/Common.globalconfig @@ -0,0 +1,116 @@ +is_global = true + +# Default severity for all IDE code style rules with category 'Style' +dotnet_analyzer_diagnostic.category-Style.severity = warning + +# Default severity for all IDE code quality rules with category 'CodeQuality' +dotnet_analyzer_diagnostic.category-CodeQuality.severity = warning + +### Configuration for RSxxxx rules ### + +# RS1024: Compare symbols correctly +# https://github.com/dotnet/roslyn-analyzers/issues/6381 +dotnet_diagnostic.RS1024.severity = none + +# Parts exported with MEFv2 must be marked with 'SharedAttribute', un-needed here +dotnet_diagnostic.RS0023.severity = none + +# Exported parts should be marked with 'ImportingConstructorAttribute', un-needed here +dotnet_diagnostic.RS0034.severity = none + +# Use 'null' instead of 'default' for nullable types +dotnet_diagnostic.RS0038.severity = none + +# TODO: Remove this exclusion and fix related issues, tracked by https://github.com/dotnet/roslyn-analyzers/issues/3915 +#dotnet_diagnostic.RS0041.severity = none + +### Configuration for IDE code style by diagnostic IDs ### + +# IDE0066: Convert switch statement to expression +dotnet_diagnostic.IDE0066.severity = suggestion + +# IDE0001: Name can be simplified +dotnet_diagnostic.IDE0001.severity = silent + +# IDE0002: Name can be simplified +dotnet_diagnostic.IDE0002.severity = silent + +# IDE0003: Name can be simplified +dotnet_diagnostic.IDE0003.severity = silent + +# IDE0007: Use 'var' instead of explicit type +dotnet_diagnostic.IDE0007.severity = silent + +# IDE0010: Add missing cases in switch statement +dotnet_diagnostic.IDE0010.severity = silent + +# IDE0017: Object initialization can be simplified +dotnet_diagnostic.IDE0017.severity = silent + +# IDE0045: 'if' statement can be simplified +dotnet_diagnostic.IDE0045.severity = silent + +# IDE0046: 'if' statement can be simplified +dotnet_diagnostic.IDE0046.severity = silent + +# IDE0048: Parentheses should be added for clarity +dotnet_diagnostic.IDE0048.severity = silent + +# IDE0058: Expression value is never used +dotnet_diagnostic.IDE0058.severity = silent + +# IDE0065: Using directives must be placed outside of a namespace declaration +# Can remove the below entry and turn it into a warning once https://github.com/dotnet/roslyn/issues/43271 is resolved. +dotnet_diagnostic.IDE0065.severity = silent + +# IDE0072: Populate switch +dotnet_diagnostic.IDE0072.severity = silent + +# IDE0083: Use pattern matching +dotnet_diagnostic.IDE0083.severity = silent + +# IDE0120: Simplify linq expression +dotnet_diagnostic.IDE0120.severity = silent + +# IDE0130: Namespace does not match folder structure +dotnet_diagnostic.IDE0130.severity = silent + +# IDE0150: Null check can be clarified +dotnet_diagnostic.IDE0150.severity = silent + +### Configuration for Microsoft.CodeAnalysis.NetAnalyzers analyzers executed on this repo ### + +# CA1002: Do not expose generic lists +dotnet_diagnostic.CA1002.severity = suggestion + +# CA1024: Use properties where appropriate +dotnet_diagnostic.CA1024.severity = suggestion + +# CA1033: Interface methods should be callable by child types +dotnet_diagnostic.CA1033.severity = suggestion + +# ValidateArgumentsOfPublicMethods - only useful for libraries with supported public API surface, we don't have any +dotnet_diagnostic.CA1062.severity = none + +# CA1307: Specify StringComparison for clarity +dotnet_diagnostic.CA1307.severity = suggestion + +# CA1711: Identifiers should not have incorrect suffix +dotnet_diagnostic.CA1711.severity = suggestion + +# CA1309: Use ordinal string comparison +dotnet_diagnostic.CA1309.severity = suggestion + +# 🐢 Avoid dead conditional code: https://github.com/dotnet/roslyn-analyzers/issues/4914 +dotnet_diagnostic.CA1508.severity = none + +# 🐢 Dispose objects before losing scope: https://github.com/dotnet/roslyn-analyzers/issues/4915 +dotnet_diagnostic.CA2000.severity = none + +### Configuration for vs-threading analyzers executed on this repo ### + +# VSTHRD002: Avoid problematic synchronous waits +dotnet_diagnostic.VSTHRD002.severity = none + +# VSTHRD011: Use AsyncLazy +dotnet_diagnostic.VSTHRD011.severity = none diff --git a/eng/globalconfigs/NonShipping.globalconfig b/eng/globalconfigs/NonShipping.globalconfig new file mode 100644 index 0000000000..fcd188dcaf --- /dev/null +++ b/eng/globalconfigs/NonShipping.globalconfig @@ -0,0 +1,24 @@ +is_global = true + +# Do not declare static members on generic types (we use generic static classes in test helpers) +dotnet_diagnostic.CA1000.severity = none + +# Nested types should not be visible (we use nested types as test helpers) +dotnet_diagnostic.CA1034.severity = none + +# IdentifiersShouldNotContainUnderscores - test names contain underscores and this is fine +dotnet_diagnostic.CA1707.severity = none + +# Type names should not match namespaces (not needed for test code) +dotnet_diagnostic.CA1724.severity = none + +# Mark member as static rule has many violations in non-shipping projects +dotnet_diagnostic.CA1822.severity = none + +# Do not directly await a Task (makes tests unnecessarily noisy) +dotnet_diagnostic.CA2007.severity = none + +### Configuration for RSxxxx rules ### + +# Do not call 'GetTestAccessor()' +dotnet_diagnostic.RS0043.severity = none diff --git a/eng/globalconfigs/Shipping.globalconfig b/eng/globalconfigs/Shipping.globalconfig new file mode 100644 index 0000000000..cf76b483fd --- /dev/null +++ b/eng/globalconfigs/Shipping.globalconfig @@ -0,0 +1,4 @@ +is_global = true + +# DoNotPassLiteralsAsLocalizedParameters - primarily useful for libraries where public APIs throw exceptions, and the messages need to be localized +dotnet_diagnostic.CA1303.severity = none diff --git a/src/Directory.Build.props b/src/Directory.Build.props index da60471be0..445bab98e7 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -53,18 +53,4 @@ - - - - - - $(MSBuildThisFileDirectory)..\eng\Analyzers_NonShippingRules.ruleset - - - - - $(MSBuildThisFileDirectory)..\eng\Analyzers_ShippingRules.ruleset - - - diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index 87650f1f43..09112d02c2 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -11,15 +11,6 @@ - - - - - - - - - @@ -52,11 +43,6 @@ - - - $(MSBuildAllProjects);$(MSBuildThisFileDirectory)..\build\Analyzers_ShippingRules.ruleset - - diff --git a/src/Microsoft.CodeAnalysis.Analyzers/UnitTests/MetaAnalyzers/SymbolIsBannedInAnalyzersTests.cs b/src/Microsoft.CodeAnalysis.Analyzers/UnitTests/MetaAnalyzers/SymbolIsBannedInAnalyzersTests.cs index 6c55dfab6e..650d271088 100644 --- a/src/Microsoft.CodeAnalysis.Analyzers/UnitTests/MetaAnalyzers/SymbolIsBannedInAnalyzersTests.cs +++ b/src/Microsoft.CodeAnalysis.Analyzers/UnitTests/MetaAnalyzers/SymbolIsBannedInAnalyzersTests.cs @@ -3,7 +3,6 @@ #nullable enable using System.Threading.Tasks; -using Microsoft.CodeAnalysis.Testing; using Xunit; using VerifyCS = Test.Utilities.CSharpCodeFixVerifier< Microsoft.CodeAnalysis.CSharp.Analyzers.CSharpSymbolIsBannedInAnalyzersAnalyzer, diff --git a/src/NetAnalyzers/CSharp/Microsoft.NetCore.Analyzers/InteropServices/CSharpDisableRuntimeMarshalling.Fixer.IdentifierGenerator.cs b/src/NetAnalyzers/CSharp/Microsoft.NetCore.Analyzers/InteropServices/CSharpDisableRuntimeMarshalling.Fixer.IdentifierGenerator.cs index 6bddfc2b6d..6514a09a72 100644 --- a/src/NetAnalyzers/CSharp/Microsoft.NetCore.Analyzers/InteropServices/CSharpDisableRuntimeMarshalling.Fixer.IdentifierGenerator.cs +++ b/src/NetAnalyzers/CSharp/Microsoft.NetCore.Analyzers/InteropServices/CSharpDisableRuntimeMarshalling.Fixer.IdentifierGenerator.cs @@ -36,7 +36,7 @@ public IdentifierGenerator(SemanticModel model, IBlockOperation block) public string? NextIdentifier() { - if (_nextIdentifier == null || _nextIdentifier == int.MaxValue) + if (_nextIdentifier is null or int.MaxValue) { return null; } diff --git a/src/NetAnalyzers/CSharp/Microsoft.NetCore.Analyzers/Runtime/CSharpForwardCancellationTokenToInvocationsFixer.TypeNameVisitor.cs b/src/NetAnalyzers/CSharp/Microsoft.NetCore.Analyzers/Runtime/CSharpForwardCancellationTokenToInvocationsFixer.TypeNameVisitor.cs index 48a00b3469..9cb91ed257 100644 --- a/src/NetAnalyzers/CSharp/Microsoft.NetCore.Analyzers/Runtime/CSharpForwardCancellationTokenToInvocationsFixer.TypeNameVisitor.cs +++ b/src/NetAnalyzers/CSharp/Microsoft.NetCore.Analyzers/Runtime/CSharpForwardCancellationTokenToInvocationsFixer.TypeNameVisitor.cs @@ -41,10 +41,9 @@ public override TypeSyntax VisitNamedType(INamedTypeSymbol symbol) return typeSyntax; typeSyntax = CreateSimpleTypeSyntax(symbol); - if (!(typeSyntax is SimpleNameSyntax)) + if (typeSyntax is not SimpleNameSyntax simpleNameSyntax) return typeSyntax; - var simpleNameSyntax = (SimpleNameSyntax)typeSyntax; if (symbol.ContainingType is not null) { if (symbol.ContainingType.TypeKind != TypeKind.Submission) diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/DoNotDeclareProtectedMembersInSealedTypes.cs b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/DoNotDeclareProtectedMembersInSealedTypes.cs index c87be4436d..13138281aa 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/DoNotDeclareProtectedMembersInSealedTypes.cs +++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/DoNotDeclareProtectedMembersInSealedTypes.cs @@ -66,9 +66,9 @@ public override void Initialize(AnalysisContext context) private static bool IsAnyProtectedVariant(ISymbol symbol) { - return symbol.DeclaredAccessibility == Accessibility.Protected || - symbol.DeclaredAccessibility == Accessibility.ProtectedOrInternal || - symbol.DeclaredAccessibility == Accessibility.ProtectedAndInternal; + return symbol.DeclaredAccessibility is Accessibility.Protected or + Accessibility.ProtectedOrInternal or + Accessibility.ProtectedAndInternal; } } } diff --git a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Performance/UseAsSpanInsteadOfRangeIndexer.cs b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Performance/UseAsSpanInsteadOfRangeIndexer.cs index 54f625c440..45d87659f8 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Performance/UseAsSpanInsteadOfRangeIndexer.cs +++ b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Performance/UseAsSpanInsteadOfRangeIndexer.cs @@ -116,8 +116,7 @@ private static void OnCompilationStart(CompilationStartAnalysisContext context) indexerArgument = elementReference.Indices[0]; containingType = elementReference.ArrayReference.Type; } - else if (operationContext.Operation.Kind == OperationKind.None - || operationContext.Operation.Kind == OperationKindEx.ImplicitIndexerReference) + else if (operationContext.Operation.Kind is OperationKind.None or OperationKindEx.ImplicitIndexerReference) { // The forward support via the "None" operation kind is only available for C#. if (operationContext.Compilation.Language != LanguageNames.CSharp) diff --git a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/BufferBlockCopyLengthAnalyzer.cs b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/BufferBlockCopyLengthAnalyzer.cs index 226639fd6f..6b5601e390 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/BufferBlockCopyLengthAnalyzer.cs +++ b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/BufferBlockCopyLengthAnalyzer.cs @@ -91,9 +91,9 @@ bool CheckArgumentArrayType(IArgumentOperation targetArgument, IPropertyReferenc if (lengthPropertyArgument.Instance.GetReferencedMemberOrLocalOrParameter() == targetArgumentValue.Operand.GetReferencedMemberOrLocalOrParameter()) { IArrayTypeSymbol countArgumentArrayTypeSymbol = (IArrayTypeSymbol)lengthPropertyArgument.Instance.Type; - if (countArgumentArrayTypeSymbol.ElementType.SpecialType != SpecialType.System_Byte && - countArgumentArrayTypeSymbol.ElementType.SpecialType != SpecialType.System_SByte && - countArgumentArrayTypeSymbol.ElementType.SpecialType != SpecialType.System_Boolean) + if (countArgumentArrayTypeSymbol.ElementType.SpecialType is not SpecialType.System_Byte and + not SpecialType.System_SByte and + not SpecialType.System_Boolean) { return true; } diff --git a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/DetectPreviewFeatureAnalyzer.cs b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/DetectPreviewFeatureAnalyzer.cs index 4c5c596963..f25278294f 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/DetectPreviewFeatureAnalyzer.cs +++ b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/DetectPreviewFeatureAnalyzer.cs @@ -681,7 +681,7 @@ private void AnalyzeSymbol(SymbolAnalysisContext context, { ProcessTypeSymbolAttributes(context, typeSymbol, requiresPreviewFeaturesSymbols, previewFeatureAttributeSymbol); } - else if (symbol is IMethodSymbol || symbol is IPropertySymbol) + else if (symbol is IMethodSymbol or IPropertySymbol) { ProcessPropertyOrMethodAttributes(context, symbol, requiresPreviewFeaturesSymbols, virtualStaticsInInterfaces, previewFeatureAttributeSymbol); } diff --git a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/SpecifyCultureForToLowerAndToUpper.cs b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/SpecifyCultureForToLowerAndToUpper.cs index af59df1370..011b5ad7f2 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/SpecifyCultureForToLowerAndToUpper.cs +++ b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/SpecifyCultureForToLowerAndToUpper.cs @@ -51,7 +51,8 @@ protected override void InitializeWorker(CompilationStartAnalysisContext context private static bool IsToLowerOrToUpper(string methodName) { - return methodName == ToLowerMethodName || methodName == ToUpperMethodName; + // TODO: Compare symbols instead of method name. + return methodName is ToLowerMethodName or ToUpperMethodName; } } } diff --git a/src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/Maintainability/UseNameOfInPlaceOfStringTests.cs b/src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/Maintainability/UseNameOfInPlaceOfStringTests.cs index 53baeaca21..f818bdf1ea 100644 --- a/src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/Maintainability/UseNameOfInPlaceOfStringTests.cs +++ b/src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/Maintainability/UseNameOfInPlaceOfStringTests.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. using System.Threading.Tasks; -using Microsoft.CodeAnalysis.Testing; using Test.Utilities; using Xunit; using VerifyCS = Test.Utilities.CSharpCodeFixVerifier< diff --git a/src/NetAnalyzers/UnitTests/Microsoft.NetCore.Analyzers/InteropServices/DisableRuntimeMarshallingTests.cs b/src/NetAnalyzers/UnitTests/Microsoft.NetCore.Analyzers/InteropServices/DisableRuntimeMarshallingTests.cs index 47855b548a..f35b2081b3 100644 --- a/src/NetAnalyzers/UnitTests/Microsoft.NetCore.Analyzers/InteropServices/DisableRuntimeMarshallingTests.cs +++ b/src/NetAnalyzers/UnitTests/Microsoft.NetCore.Analyzers/InteropServices/DisableRuntimeMarshallingTests.cs @@ -1,6 +1,5 @@ // Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -using System.IO; using System.Threading.Tasks; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Testing; diff --git a/src/NetAnalyzers/UnitTests/Microsoft.NetCore.Analyzers/Runtime/SpecifyIFormatProviderTests.cs b/src/NetAnalyzers/UnitTests/Microsoft.NetCore.Analyzers/Runtime/SpecifyIFormatProviderTests.cs index 8d561abcbf..44b710c40e 100644 --- a/src/NetAnalyzers/UnitTests/Microsoft.NetCore.Analyzers/Runtime/SpecifyIFormatProviderTests.cs +++ b/src/NetAnalyzers/UnitTests/Microsoft.NetCore.Analyzers/Runtime/SpecifyIFormatProviderTests.cs @@ -1,6 +1,5 @@ // Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -using System; using System.Threading.Tasks; using Microsoft.CodeAnalysis.Testing; using Test.Utilities; @@ -1647,4 +1646,4 @@ private DiagnosticResult GetIFormatProviderUICultureRuleBasicResultAt(int line, #pragma warning restore RS0030 // Do not use banned APIs .WithArguments(arg1, arg2, arg3); } -} \ No newline at end of file +} diff --git a/src/Test.Utilities/Test.Utilities.csproj b/src/Test.Utilities/Test.Utilities.csproj index 0540d0d09c..6f745673c9 100644 --- a/src/Test.Utilities/Test.Utilities.csproj +++ b/src/Test.Utilities/Test.Utilities.csproj @@ -3,6 +3,7 @@ netcoreapp3.1;net472 true + false true @@ -32,4 +33,4 @@ - \ No newline at end of file +