diff --git a/ChangeLog.md b/ChangeLog.md index d4692d5a12..71d8a88324 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- Move `DiagnosticRules` and `DiagnosticIdentifiers` to `Roslynator.Common` ([PR](https://github.com/dotnet/roslynator/pull/1597)) + ## [4.12.10] - 2024-12-17 ### Fixed diff --git a/src/Analyzers.CodeFixes/CSharp/CodeFixes/AddParenthesesWhenNecessaryCodeFixProvider.cs b/src/Analyzers.CodeFixes/CSharp/CodeFixes/AddParenthesesWhenNecessaryCodeFixProvider.cs index ad0ebd30a1..681aef8271 100644 --- a/src/Analyzers.CodeFixes/CSharp/CodeFixes/AddParenthesesWhenNecessaryCodeFixProvider.cs +++ b/src/Analyzers.CodeFixes/CSharp/CodeFixes/AddParenthesesWhenNecessaryCodeFixProvider.cs @@ -10,7 +10,6 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Roslynator.CodeFixes; -using Roslynator.CSharp; using Roslynator.CSharp.Analysis; namespace Roslynator.CSharp.CodeFixes; diff --git a/src/Analyzers.CodeFixes/CSharp/CodeFixes/RemoveRedundantCatchBlockCodeFixProvider.cs b/src/Analyzers.CodeFixes/CSharp/CodeFixes/RemoveRedundantCatchBlockCodeFixProvider.cs index cfe0875fa7..13dbd22e20 100644 --- a/src/Analyzers.CodeFixes/CSharp/CodeFixes/RemoveRedundantCatchBlockCodeFixProvider.cs +++ b/src/Analyzers.CodeFixes/CSharp/CodeFixes/RemoveRedundantCatchBlockCodeFixProvider.cs @@ -9,7 +9,6 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CodeActions; using Microsoft.CodeAnalysis.CodeFixes; -using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Roslynator.CodeFixes; diff --git a/src/Analyzers.CodeFixes/CSharp/CodeFixes/UseAutoPropertyCodeFixProvider.cs b/src/Analyzers.CodeFixes/CSharp/CodeFixes/UseAutoPropertyCodeFixProvider.cs index cb1e2ae9a4..85700bed09 100644 --- a/src/Analyzers.CodeFixes/CSharp/CodeFixes/UseAutoPropertyCodeFixProvider.cs +++ b/src/Analyzers.CodeFixes/CSharp/CodeFixes/UseAutoPropertyCodeFixProvider.cs @@ -11,7 +11,6 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Roslynator.CodeFixes; -using Roslynator.CSharp; using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory; using static Roslynator.CSharp.CSharpFactory; diff --git a/src/Analyzers.CodeFixes/CSharp/CodeFixes/UseExplicitTypeInsteadOfVarCodeFixProvider.cs b/src/Analyzers.CodeFixes/CSharp/CodeFixes/UseExplicitTypeInsteadOfVarCodeFixProvider.cs index b0442f12f6..53de3c14a4 100644 --- a/src/Analyzers.CodeFixes/CSharp/CodeFixes/UseExplicitTypeInsteadOfVarCodeFixProvider.cs +++ b/src/Analyzers.CodeFixes/CSharp/CodeFixes/UseExplicitTypeInsteadOfVarCodeFixProvider.cs @@ -11,7 +11,6 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Roslynator.CodeFixes; -using Roslynator.CSharp; namespace Roslynator.CSharp.CodeFixes; diff --git a/src/Analyzers.CodeFixes/CSharp/CodeFixes/UseStringComparisonCodeFixProvider.cs b/src/Analyzers.CodeFixes/CSharp/CodeFixes/UseStringComparisonCodeFixProvider.cs index 31541b4103..160dfa6fee 100644 --- a/src/Analyzers.CodeFixes/CSharp/CodeFixes/UseStringComparisonCodeFixProvider.cs +++ b/src/Analyzers.CodeFixes/CSharp/CodeFixes/UseStringComparisonCodeFixProvider.cs @@ -11,7 +11,6 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Roslynator.CodeFixes; -using Roslynator.CSharp; using Roslynator.CSharp.Syntax; using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory; using static Roslynator.CSharp.CSharpFactory; diff --git a/src/Analyzers.CodeFixes/CSharp/CodeFixes/UseVarOrExplicitTypeCodeFixProvider.cs b/src/Analyzers.CodeFixes/CSharp/CodeFixes/UseVarOrExplicitTypeCodeFixProvider.cs index 3a480cb4fc..fc566b8e84 100644 --- a/src/Analyzers.CodeFixes/CSharp/CodeFixes/UseVarOrExplicitTypeCodeFixProvider.cs +++ b/src/Analyzers.CodeFixes/CSharp/CodeFixes/UseVarOrExplicitTypeCodeFixProvider.cs @@ -10,7 +10,6 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Roslynator.CodeFixes; -using Roslynator.CSharp; using static Roslynator.CSharp.CodeActionFactory; namespace Roslynator.CSharp.CodeFixes; diff --git a/src/Analyzers.CodeFixes/CSharp/Refactorings/Documentation/DocumentationCommentRefactoring`1.cs b/src/Analyzers.CodeFixes/CSharp/Refactorings/Documentation/DocumentationCommentRefactoring`1.cs index 1803f4478c..b25f333a83 100644 --- a/src/Analyzers.CodeFixes/CSharp/Refactorings/Documentation/DocumentationCommentRefactoring`1.cs +++ b/src/Analyzers.CodeFixes/CSharp/Refactorings/Documentation/DocumentationCommentRefactoring`1.cs @@ -9,7 +9,6 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Roslynator.CSharp; using Roslynator.CSharp.Analysis.Documentation; namespace Roslynator.CSharp.Refactorings.Documentation; diff --git a/src/Analyzers.CodeFixes/CSharp/Refactorings/RemoveRedundantDefaultSwitchSectionRefactoring.cs b/src/Analyzers.CodeFixes/CSharp/Refactorings/RemoveRedundantDefaultSwitchSectionRefactoring.cs index 26c4777b8b..a070308063 100644 --- a/src/Analyzers.CodeFixes/CSharp/Refactorings/RemoveRedundantDefaultSwitchSectionRefactoring.cs +++ b/src/Analyzers.CodeFixes/CSharp/Refactorings/RemoveRedundantDefaultSwitchSectionRefactoring.cs @@ -4,7 +4,6 @@ using System.Threading.Tasks; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Roslynator.CSharp; namespace Roslynator.CSharp.Refactorings; diff --git a/src/Analyzers.CodeFixes/CSharp/Refactorings/RemoveUnnecessaryCaseLabelRefactoring.cs b/src/Analyzers.CodeFixes/CSharp/Refactorings/RemoveUnnecessaryCaseLabelRefactoring.cs index ef1d5838ff..887548e780 100644 --- a/src/Analyzers.CodeFixes/CSharp/Refactorings/RemoveUnnecessaryCaseLabelRefactoring.cs +++ b/src/Analyzers.CodeFixes/CSharp/Refactorings/RemoveUnnecessaryCaseLabelRefactoring.cs @@ -4,7 +4,6 @@ using System.Threading.Tasks; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Roslynator.CSharp; namespace Roslynator.CSharp.Refactorings; diff --git a/src/Analyzers.CodeFixes/CSharp/Refactorings/UnconstrainedTypeParameterCheckedForNullRefactoring.cs b/src/Analyzers.CodeFixes/CSharp/Refactorings/UnconstrainedTypeParameterCheckedForNullRefactoring.cs index 4b815a23c6..bbf4917e91 100644 --- a/src/Analyzers.CodeFixes/CSharp/Refactorings/UnconstrainedTypeParameterCheckedForNullRefactoring.cs +++ b/src/Analyzers.CodeFixes/CSharp/Refactorings/UnconstrainedTypeParameterCheckedForNullRefactoring.cs @@ -5,7 +5,6 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Roslynator.CSharp; using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory; using static Roslynator.CSharp.CSharpFactory; diff --git a/src/Analyzers.CodeFixes/CSharp/Refactorings/UseExclusiveOrOperatorRefactoring.cs b/src/Analyzers.CodeFixes/CSharp/Refactorings/UseExclusiveOrOperatorRefactoring.cs index cca0119027..01027a183f 100644 --- a/src/Analyzers.CodeFixes/CSharp/Refactorings/UseExclusiveOrOperatorRefactoring.cs +++ b/src/Analyzers.CodeFixes/CSharp/Refactorings/UseExclusiveOrOperatorRefactoring.cs @@ -5,7 +5,6 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Roslynator.CSharp; using static Roslynator.CSharp.CSharpFactory; namespace Roslynator.CSharp.Refactorings; diff --git a/src/Analyzers.CodeFixes/CSharp/Refactorings/ValueTypeObjectIsNeverEqualToNullRefactoring.cs b/src/Analyzers.CodeFixes/CSharp/Refactorings/ValueTypeObjectIsNeverEqualToNullRefactoring.cs index 7b03dfd69d..936492e833 100644 --- a/src/Analyzers.CodeFixes/CSharp/Refactorings/ValueTypeObjectIsNeverEqualToNullRefactoring.cs +++ b/src/Analyzers.CodeFixes/CSharp/Refactorings/ValueTypeObjectIsNeverEqualToNullRefactoring.cs @@ -5,7 +5,6 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Roslynator.CSharp; using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory; using static Roslynator.CSharp.CSharpFactory; diff --git a/src/Analyzers.CodeFixes/CSharp/SyntaxRewriters/UseAsyncAwaitRewriter.cs b/src/Analyzers.CodeFixes/CSharp/SyntaxRewriters/UseAsyncAwaitRewriter.cs index 0fddfcdeeb..f1e20b16de 100644 --- a/src/Analyzers.CodeFixes/CSharp/SyntaxRewriters/UseAsyncAwaitRewriter.cs +++ b/src/Analyzers.CodeFixes/CSharp/SyntaxRewriters/UseAsyncAwaitRewriter.cs @@ -4,8 +4,6 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Formatting; -using Roslynator; -using Roslynator.CSharp; using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory; using static Roslynator.CSharp.CSharpFactory; diff --git a/src/Analyzers.xml b/src/Analyzers.xml index 3668c8bb60..4e010d95f7 100644 --- a/src/Analyzers.xml +++ b/src/Analyzers.xml @@ -7973,4 +7973,4 @@ class FooCodeFixProvider : CodeFixProvider - + \ No newline at end of file diff --git a/src/Analyzers/CSharp/Analysis/AddOrRemoveAccessibilityModifiersAnalyzer.cs b/src/Analyzers/CSharp/Analysis/AddOrRemoveAccessibilityModifiersAnalyzer.cs index 07fef41f71..5b62213f45 100644 --- a/src/Analyzers/CSharp/Analysis/AddOrRemoveAccessibilityModifiersAnalyzer.cs +++ b/src/Analyzers/CSharp/Analysis/AddOrRemoveAccessibilityModifiersAnalyzer.cs @@ -10,7 +10,6 @@ using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Diagnostics; using Microsoft.CodeAnalysis.Text; -using Roslynator.CSharp; using Roslynator.CSharp.CodeStyle; namespace Roslynator.CSharp.Analysis; diff --git a/src/Analyzers/CSharp/Analysis/AnonymousMethodAnalyzer.cs b/src/Analyzers/CSharp/Analysis/AnonymousMethodAnalyzer.cs index b8a4fd019e..1dee712d00 100644 --- a/src/Analyzers/CSharp/Analysis/AnonymousMethodAnalyzer.cs +++ b/src/Analyzers/CSharp/Analysis/AnonymousMethodAnalyzer.cs @@ -5,7 +5,6 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Diagnostics; -using Roslynator.CSharp; namespace Roslynator.CSharp.Analysis; diff --git a/src/Analyzers/CSharp/Analysis/BooleanLiteralAnalyzer.cs b/src/Analyzers/CSharp/Analysis/BooleanLiteralAnalyzer.cs index 369dc88516..c46e7d8bea 100644 --- a/src/Analyzers/CSharp/Analysis/BooleanLiteralAnalyzer.cs +++ b/src/Analyzers/CSharp/Analysis/BooleanLiteralAnalyzer.cs @@ -6,7 +6,6 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Diagnostics; -using Roslynator.CSharp; namespace Roslynator.CSharp.Analysis; diff --git a/src/Analyzers/CSharp/Analysis/ConditionalExpressionAnalyzer.cs b/src/Analyzers/CSharp/Analysis/ConditionalExpressionAnalyzer.cs index 12b37f2551..9fb604bb24 100644 --- a/src/Analyzers/CSharp/Analysis/ConditionalExpressionAnalyzer.cs +++ b/src/Analyzers/CSharp/Analysis/ConditionalExpressionAnalyzer.cs @@ -5,7 +5,6 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Diagnostics; -using Roslynator.CSharp; namespace Roslynator.CSharp.Analysis; diff --git a/src/Analyzers/CSharp/Analysis/InlineLocalVariableAnalyzer.cs b/src/Analyzers/CSharp/Analysis/InlineLocalVariableAnalyzer.cs index bd2bf24a1f..dbbe30558d 100644 --- a/src/Analyzers/CSharp/Analysis/InlineLocalVariableAnalyzer.cs +++ b/src/Analyzers/CSharp/Analysis/InlineLocalVariableAnalyzer.cs @@ -8,7 +8,6 @@ using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Diagnostics; using Microsoft.CodeAnalysis.Text; -using Roslynator.CSharp; using Roslynator.CSharp.Syntax; using Roslynator.CSharp.SyntaxWalkers; diff --git a/src/Analyzers/CSharp/Analysis/InvocationExpressionAnalyzer.cs b/src/Analyzers/CSharp/Analysis/InvocationExpressionAnalyzer.cs index e62689a676..8c09b3435f 100644 --- a/src/Analyzers/CSharp/Analysis/InvocationExpressionAnalyzer.cs +++ b/src/Analyzers/CSharp/Analysis/InvocationExpressionAnalyzer.cs @@ -7,7 +7,6 @@ using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Diagnostics; using Microsoft.CodeAnalysis.Text; -using Roslynator.CSharp; using Roslynator.CSharp.Analysis.UseMethodChaining; using Roslynator.CSharp.Syntax; diff --git a/src/Analyzers/CSharp/Analysis/NormalizeNullCheckAnalyzer.cs b/src/Analyzers/CSharp/Analysis/NormalizeNullCheckAnalyzer.cs index 766b06f76b..2ccf3ed96e 100644 --- a/src/Analyzers/CSharp/Analysis/NormalizeNullCheckAnalyzer.cs +++ b/src/Analyzers/CSharp/Analysis/NormalizeNullCheckAnalyzer.cs @@ -5,7 +5,6 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Diagnostics; -using Roslynator.CSharp; using Roslynator.CSharp.CodeStyle; using Roslynator.CSharp.Syntax; diff --git a/src/Analyzers/CSharp/Analysis/OptimizeLinqMethodCallAnalysis.cs b/src/Analyzers/CSharp/Analysis/OptimizeLinqMethodCallAnalysis.cs index d756eb5d96..57a39f1e1d 100644 --- a/src/Analyzers/CSharp/Analysis/OptimizeLinqMethodCallAnalysis.cs +++ b/src/Analyzers/CSharp/Analysis/OptimizeLinqMethodCallAnalysis.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Collections.Immutable; using System.Diagnostics; -using System.Linq; using System.Threading; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; diff --git a/src/Analyzers/CSharp/Analysis/RemoveOriginalExceptionFromThrowStatementAnalyzer.cs b/src/Analyzers/CSharp/Analysis/RemoveOriginalExceptionFromThrowStatementAnalyzer.cs index 8e8b047179..652f1ed392 100644 --- a/src/Analyzers/CSharp/Analysis/RemoveOriginalExceptionFromThrowStatementAnalyzer.cs +++ b/src/Analyzers/CSharp/Analysis/RemoveOriginalExceptionFromThrowStatementAnalyzer.cs @@ -8,7 +8,6 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Diagnostics; -using Roslynator.CSharp.SyntaxWalkers; namespace Roslynator.CSharp.Analysis; diff --git a/src/Analyzers/CSharp/Analysis/RemoveRedundantAsyncAwaitAnalyzer.cs b/src/Analyzers/CSharp/Analysis/RemoveRedundantAsyncAwaitAnalyzer.cs index bd02a6e1bb..be076ad9ba 100644 --- a/src/Analyzers/CSharp/Analysis/RemoveRedundantAsyncAwaitAnalyzer.cs +++ b/src/Analyzers/CSharp/Analysis/RemoveRedundantAsyncAwaitAnalyzer.cs @@ -6,7 +6,6 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Diagnostics; -using Roslynator.CSharp; namespace Roslynator.CSharp.Analysis; diff --git a/src/Analyzers/CSharp/Analysis/RemoveRedundantDefaultSwitchSectionAnalyzer.cs b/src/Analyzers/CSharp/Analysis/RemoveRedundantDefaultSwitchSectionAnalyzer.cs index 8bf98bec04..ddad71cc2c 100644 --- a/src/Analyzers/CSharp/Analysis/RemoveRedundantDefaultSwitchSectionAnalyzer.cs +++ b/src/Analyzers/CSharp/Analysis/RemoveRedundantDefaultSwitchSectionAnalyzer.cs @@ -6,7 +6,6 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Diagnostics; -using Roslynator.CSharp; namespace Roslynator.CSharp.Analysis; diff --git a/src/Analyzers/CSharp/Analysis/RemoveRedundantOverridingMemberAnalyzer.cs b/src/Analyzers/CSharp/Analysis/RemoveRedundantOverridingMemberAnalyzer.cs index 669af8488d..9ddef47f0e 100644 --- a/src/Analyzers/CSharp/Analysis/RemoveRedundantOverridingMemberAnalyzer.cs +++ b/src/Analyzers/CSharp/Analysis/RemoveRedundantOverridingMemberAnalyzer.cs @@ -7,7 +7,6 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Diagnostics; -using Roslynator.CSharp; using Roslynator.CSharp.Syntax; namespace Roslynator.CSharp.Analysis; diff --git a/src/Analyzers/CSharp/Analysis/RemoveUnnecessaryCaseLabelAnalyzer.cs b/src/Analyzers/CSharp/Analysis/RemoveUnnecessaryCaseLabelAnalyzer.cs index 36340050b3..8618762ca9 100644 --- a/src/Analyzers/CSharp/Analysis/RemoveUnnecessaryCaseLabelAnalyzer.cs +++ b/src/Analyzers/CSharp/Analysis/RemoveUnnecessaryCaseLabelAnalyzer.cs @@ -1,12 +1,10 @@ // Copyright (c) .NET Foundation and Contributors. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Collections.Immutable; -using System.Linq; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Diagnostics; -using Roslynator.CSharp; namespace Roslynator.CSharp.Analysis; diff --git a/src/Analyzers/CSharp/Analysis/SimplifyBooleanComparisonAnalysis.cs b/src/Analyzers/CSharp/Analysis/SimplifyBooleanComparisonAnalysis.cs index b5e2527ebd..c9c2c6f99c 100644 --- a/src/Analyzers/CSharp/Analysis/SimplifyBooleanComparisonAnalysis.cs +++ b/src/Analyzers/CSharp/Analysis/SimplifyBooleanComparisonAnalysis.cs @@ -4,7 +4,6 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Diagnostics; -using Roslynator.CSharp; namespace Roslynator.CSharp.Analysis; diff --git a/src/Analyzers/CSharp/Analysis/SimplifyNestedUsingStatementAnalyzer.cs b/src/Analyzers/CSharp/Analysis/SimplifyNestedUsingStatementAnalyzer.cs index 3a525ceecf..2b06c97363 100644 --- a/src/Analyzers/CSharp/Analysis/SimplifyNestedUsingStatementAnalyzer.cs +++ b/src/Analyzers/CSharp/Analysis/SimplifyNestedUsingStatementAnalyzer.cs @@ -5,7 +5,6 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Diagnostics; -using Roslynator.CSharp; namespace Roslynator.CSharp.Analysis; diff --git a/src/Analyzers/CSharp/Analysis/SimplifyNullableOfTAnalyzer.cs b/src/Analyzers/CSharp/Analysis/SimplifyNullableOfTAnalyzer.cs index 051b7478d2..55e8ab7f34 100644 --- a/src/Analyzers/CSharp/Analysis/SimplifyNullableOfTAnalyzer.cs +++ b/src/Analyzers/CSharp/Analysis/SimplifyNullableOfTAnalyzer.cs @@ -6,7 +6,6 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Diagnostics; -using Roslynator.CSharp; namespace Roslynator.CSharp.Analysis; diff --git a/src/Analyzers/CSharp/Analysis/UnnecessaryUnsafeContextAnalyzer.cs b/src/Analyzers/CSharp/Analysis/UnnecessaryUnsafeContextAnalyzer.cs index e0efd1f808..7a7a178aad 100644 --- a/src/Analyzers/CSharp/Analysis/UnnecessaryUnsafeContextAnalyzer.cs +++ b/src/Analyzers/CSharp/Analysis/UnnecessaryUnsafeContextAnalyzer.cs @@ -1,6 +1,5 @@ // Copyright (c) .NET Foundation and Contributors. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using System; using System.Collections.Immutable; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; diff --git a/src/Analyzers/CSharp/Analysis/UseAutoPropertyAnalyzer.cs b/src/Analyzers/CSharp/Analysis/UseAutoPropertyAnalyzer.cs index b9ece75fc0..c7691ce7a0 100644 --- a/src/Analyzers/CSharp/Analysis/UseAutoPropertyAnalyzer.cs +++ b/src/Analyzers/CSharp/Analysis/UseAutoPropertyAnalyzer.cs @@ -9,7 +9,6 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Diagnostics; -using Roslynator.CSharp; using Roslynator.CSharp.SyntaxWalkers; namespace Roslynator.CSharp.Analysis; diff --git a/src/Analyzers/CSharp/Analysis/UseBlockBodyOrExpressionBodyAnalyzer.cs b/src/Analyzers/CSharp/Analysis/UseBlockBodyOrExpressionBodyAnalyzer.cs index eba7ac0be5..03fe0fe2f2 100644 --- a/src/Analyzers/CSharp/Analysis/UseBlockBodyOrExpressionBodyAnalyzer.cs +++ b/src/Analyzers/CSharp/Analysis/UseBlockBodyOrExpressionBodyAnalyzer.cs @@ -5,7 +5,6 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Diagnostics; -using Roslynator.CSharp; using Roslynator.CSharp.CodeStyle; namespace Roslynator.CSharp.Analysis; diff --git a/src/Analyzers/CSharp/Analysis/UseConditionalAccessAnalyzer.cs b/src/Analyzers/CSharp/Analysis/UseConditionalAccessAnalyzer.cs index d9d2fc3925..b629f92688 100644 --- a/src/Analyzers/CSharp/Analysis/UseConditionalAccessAnalyzer.cs +++ b/src/Analyzers/CSharp/Analysis/UseConditionalAccessAnalyzer.cs @@ -9,7 +9,6 @@ using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Diagnostics; using Microsoft.CodeAnalysis.Text; -using Roslynator.CSharp; using Roslynator.CSharp.Syntax; namespace Roslynator.CSharp.Analysis; diff --git a/src/Analyzers/CSharp/Analysis/UseExclusiveOrOperatorAnalyzer.cs b/src/Analyzers/CSharp/Analysis/UseExclusiveOrOperatorAnalyzer.cs index 41e38e7105..e772527889 100644 --- a/src/Analyzers/CSharp/Analysis/UseExclusiveOrOperatorAnalyzer.cs +++ b/src/Analyzers/CSharp/Analysis/UseExclusiveOrOperatorAnalyzer.cs @@ -5,7 +5,6 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Diagnostics; -using Roslynator.CSharp; using Roslynator.CSharp.Syntax; using static Roslynator.CSharp.CSharpFactory; diff --git a/src/Analyzers/CSharp/Analysis/UseNameOfOperatorAnalyzer.cs b/src/Analyzers/CSharp/Analysis/UseNameOfOperatorAnalyzer.cs index dc353fb3ab..86884e2c61 100644 --- a/src/Analyzers/CSharp/Analysis/UseNameOfOperatorAnalyzer.cs +++ b/src/Analyzers/CSharp/Analysis/UseNameOfOperatorAnalyzer.cs @@ -8,7 +8,6 @@ using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Diagnostics; using Microsoft.CodeAnalysis.Text; -using Roslynator.CSharp; using Roslynator.CSharp.Syntax; namespace Roslynator.CSharp.Analysis; diff --git a/src/Analyzers/CSharp/Analysis/UseStringComparisonAnalysis.cs b/src/Analyzers/CSharp/Analysis/UseStringComparisonAnalysis.cs index 3f5d37ed56..a6248ecc63 100644 --- a/src/Analyzers/CSharp/Analysis/UseStringComparisonAnalysis.cs +++ b/src/Analyzers/CSharp/Analysis/UseStringComparisonAnalysis.cs @@ -7,7 +7,6 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Diagnostics; -using Roslynator.CSharp; using Roslynator.CSharp.Syntax; namespace Roslynator.CSharp.Analysis; diff --git a/src/Analyzers/CSharp/Analysis/UseStringIsNullOrEmptyMethodAnalyzer.cs b/src/Analyzers/CSharp/Analysis/UseStringIsNullOrEmptyMethodAnalyzer.cs index 53603c6190..159a041170 100644 --- a/src/Analyzers/CSharp/Analysis/UseStringIsNullOrEmptyMethodAnalyzer.cs +++ b/src/Analyzers/CSharp/Analysis/UseStringIsNullOrEmptyMethodAnalyzer.cs @@ -7,7 +7,6 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Diagnostics; -using Roslynator.CSharp; using Roslynator.CSharp.Syntax; namespace Roslynator.CSharp.Analysis; diff --git a/src/CSharp.Workspaces/CSharp/CSharpSyntaxFactsService.cs b/src/CSharp.Workspaces/CSharp/CSharpSyntaxFactsService.cs index 58618b01ec..ed28f77af0 100644 --- a/src/CSharp.Workspaces/CSharp/CSharpSyntaxFactsService.cs +++ b/src/CSharp.Workspaces/CSharp/CSharpSyntaxFactsService.cs @@ -3,7 +3,6 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Host.Mef; -using Roslynator.CSharp; namespace Roslynator.CSharp; diff --git a/src/CSharp/CSharp/Extensions/SyntaxExtensions.cs b/src/CSharp/CSharp/Extensions/SyntaxExtensions.cs index f4299f2578..389d6bb961 100644 --- a/src/CSharp/CSharp/Extensions/SyntaxExtensions.cs +++ b/src/CSharp/CSharp/Extensions/SyntaxExtensions.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; -using System.Collections.Immutable; using System.Diagnostics; using System.Linq; using System.Threading; @@ -16,7 +15,6 @@ using Roslynator.CSharp.SyntaxWalkers; using Roslynator.Documentation; using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory; -using static Roslynator.CSharp.CSharpFactory; namespace Roslynator.CSharp; diff --git a/src/CodeAnalysis.Analyzers.CodeFixes/CSharp/AttributeArgumentCodeFixProvider.cs b/src/CodeAnalysis.Analyzers.CodeFixes/CSharp/AttributeArgumentCodeFixProvider.cs index fbbdf989ce..a0a7feb93e 100644 --- a/src/CodeAnalysis.Analyzers.CodeFixes/CSharp/AttributeArgumentCodeFixProvider.cs +++ b/src/CodeAnalysis.Analyzers.CodeFixes/CSharp/AttributeArgumentCodeFixProvider.cs @@ -24,7 +24,7 @@ public sealed class AttributeArgumentCodeFixProvider : BaseCodeFixProvider public override ImmutableArray FixableDiagnosticIds { - get { return ImmutableArray.Create(DiagnosticIdentifiers.UnknownLanguageName); } + get { return ImmutableArray.Create(CodeAnalysisDiagnosticIdentifiers.UnknownLanguageName); } } public override async Task RegisterCodeFixesAsync(CodeFixContext context) @@ -39,7 +39,7 @@ public override async Task RegisterCodeFixesAsync(CodeFixContext context) switch (diagnostic.Id) { - case DiagnosticIdentifiers.UnknownLanguageName: + case CodeAnalysisDiagnosticIdentifiers.UnknownLanguageName: { foreach (string languageName in RoslynUtility.WellKnownLanguageNames) { diff --git a/src/CodeAnalysis.Analyzers.CodeFixes/CSharp/AttributeCodeFixProvider.cs b/src/CodeAnalysis.Analyzers.CodeFixes/CSharp/AttributeCodeFixProvider.cs index 6e0309d7b4..4db611cf67 100644 --- a/src/CodeAnalysis.Analyzers.CodeFixes/CSharp/AttributeCodeFixProvider.cs +++ b/src/CodeAnalysis.Analyzers.CodeFixes/CSharp/AttributeCodeFixProvider.cs @@ -23,8 +23,8 @@ public override ImmutableArray FixableDiagnosticIds get { return ImmutableArray.Create( - DiagnosticIdentifiers.SpecifyExportCodeFixProviderAttributeName, - DiagnosticIdentifiers.SpecifyExportCodeRefactoringProviderAttributeName); + CodeAnalysisDiagnosticIdentifiers.SpecifyExportCodeFixProviderAttributeName, + CodeAnalysisDiagnosticIdentifiers.SpecifyExportCodeRefactoringProviderAttributeName); } } @@ -40,8 +40,8 @@ public override async Task RegisterCodeFixesAsync(CodeFixContext context) switch (diagnostic.Id) { - case DiagnosticIdentifiers.SpecifyExportCodeFixProviderAttributeName: - case DiagnosticIdentifiers.SpecifyExportCodeRefactoringProviderAttributeName: + case CodeAnalysisDiagnosticIdentifiers.SpecifyExportCodeFixProviderAttributeName: + case CodeAnalysisDiagnosticIdentifiers.SpecifyExportCodeRefactoringProviderAttributeName: { CodeAction codeAction = CodeAction.Create( "Specify name", diff --git a/src/CodeAnalysis.Analyzers.CodeFixes/CSharp/BinaryExpressionCodeFixProvider.cs b/src/CodeAnalysis.Analyzers.CodeFixes/CSharp/BinaryExpressionCodeFixProvider.cs index 40db5a9ac9..a50172a888 100644 --- a/src/CodeAnalysis.Analyzers.CodeFixes/CSharp/BinaryExpressionCodeFixProvider.cs +++ b/src/CodeAnalysis.Analyzers.CodeFixes/CSharp/BinaryExpressionCodeFixProvider.cs @@ -25,8 +25,8 @@ public override ImmutableArray FixableDiagnosticIds get { return ImmutableArray.Create( - DiagnosticIdentifiers.CallAnyInsteadOfAccessingCount, - DiagnosticIdentifiers.UnnecessaryNullCheck); + CodeAnalysisDiagnosticIdentifiers.CallAnyInsteadOfAccessingCount, + CodeAnalysisDiagnosticIdentifiers.UnnecessaryNullCheck); } } @@ -42,7 +42,7 @@ public override async Task RegisterCodeFixesAsync(CodeFixContext context) switch (diagnostic.Id) { - case DiagnosticIdentifiers.CallAnyInsteadOfAccessingCount: + case CodeAnalysisDiagnosticIdentifiers.CallAnyInsteadOfAccessingCount: { CodeAction codeAction = CodeAction.Create( "Call 'Any' instead of accessing 'Count'", @@ -52,7 +52,7 @@ public override async Task RegisterCodeFixesAsync(CodeFixContext context) context.RegisterCodeFix(codeAction, diagnostic); break; } - case DiagnosticIdentifiers.UnnecessaryNullCheck: + case CodeAnalysisDiagnosticIdentifiers.UnnecessaryNullCheck: { CodeAction codeAction = CodeAction.Create( "Remove unnecessary null check", diff --git a/src/CodeAnalysis.Analyzers.CodeFixes/CSharp/ConditionalAccessExpressionCodeFixProvider.cs b/src/CodeAnalysis.Analyzers.CodeFixes/CSharp/ConditionalAccessExpressionCodeFixProvider.cs index 4fb5e616ad..2fdd485879 100644 --- a/src/CodeAnalysis.Analyzers.CodeFixes/CSharp/ConditionalAccessExpressionCodeFixProvider.cs +++ b/src/CodeAnalysis.Analyzers.CodeFixes/CSharp/ConditionalAccessExpressionCodeFixProvider.cs @@ -18,7 +18,7 @@ public sealed class ConditionalAccessExpressionCodeFixProvider : BaseCodeFixProv { public override ImmutableArray FixableDiagnosticIds { - get { return ImmutableArray.Create(DiagnosticIdentifiers.UnnecessaryConditionalAccess); } + get { return ImmutableArray.Create(CodeAnalysisDiagnosticIdentifiers.UnnecessaryConditionalAccess); } } public override async Task RegisterCodeFixesAsync(CodeFixContext context) diff --git a/src/CodeAnalysis.Analyzers.CodeFixes/CSharp/ElementAccessExpressionCodeFixProvider.cs b/src/CodeAnalysis.Analyzers.CodeFixes/CSharp/ElementAccessExpressionCodeFixProvider.cs index db593f588d..4fdf62d458 100644 --- a/src/CodeAnalysis.Analyzers.CodeFixes/CSharp/ElementAccessExpressionCodeFixProvider.cs +++ b/src/CodeAnalysis.Analyzers.CodeFixes/CSharp/ElementAccessExpressionCodeFixProvider.cs @@ -19,7 +19,7 @@ public sealed class ElementAccessExpressionCodeFixProvider : BaseCodeFixProvider { public override ImmutableArray FixableDiagnosticIds { - get { return ImmutableArray.Create(DiagnosticIdentifiers.CallLastInsteadOfUsingElementAccess); } + get { return ImmutableArray.Create(CodeAnalysisDiagnosticIdentifiers.CallLastInsteadOfUsingElementAccess); } } public override async Task RegisterCodeFixesAsync(CodeFixContext context) diff --git a/src/CodeAnalysis.Analyzers.CodeFixes/CSharp/InvocationExpressionCodeFixProvider.cs b/src/CodeAnalysis.Analyzers.CodeFixes/CSharp/InvocationExpressionCodeFixProvider.cs index 01cdc60adf..f1405a00f9 100644 --- a/src/CodeAnalysis.Analyzers.CodeFixes/CSharp/InvocationExpressionCodeFixProvider.cs +++ b/src/CodeAnalysis.Analyzers.CodeFixes/CSharp/InvocationExpressionCodeFixProvider.cs @@ -25,8 +25,8 @@ public override ImmutableArray FixableDiagnosticIds get { return ImmutableArray.Create( - DiagnosticIdentifiers.UseElementAccess, - DiagnosticIdentifiers.UseReturnValue); + CodeAnalysisDiagnosticIdentifiers.UseElementAccess, + CodeAnalysisDiagnosticIdentifiers.UseReturnValue); } } @@ -42,7 +42,7 @@ public override async Task RegisterCodeFixesAsync(CodeFixContext context) switch (diagnostic.Id) { - case DiagnosticIdentifiers.UseElementAccess: + case CodeAnalysisDiagnosticIdentifiers.UseElementAccess: { CodeAction codeAction = CodeAction.Create( "Use [] instead of calling 'First'", @@ -52,7 +52,7 @@ public override async Task RegisterCodeFixesAsync(CodeFixContext context) context.RegisterCodeFix(codeAction, diagnostic); break; } - case DiagnosticIdentifiers.UseReturnValue: + case CodeAnalysisDiagnosticIdentifiers.UseReturnValue: { CodeAction codeAction = CodeAction.Create( $"Introduce local for '{invocationExpression}'", diff --git a/src/CodeAnalysis.Analyzers.CodeFixes/CSharp/SimpleMemberAccessExpressionCodeFixProvider.cs b/src/CodeAnalysis.Analyzers.CodeFixes/CSharp/SimpleMemberAccessExpressionCodeFixProvider.cs index d8a20e092f..77009d2704 100644 --- a/src/CodeAnalysis.Analyzers.CodeFixes/CSharp/SimpleMemberAccessExpressionCodeFixProvider.cs +++ b/src/CodeAnalysis.Analyzers.CodeFixes/CSharp/SimpleMemberAccessExpressionCodeFixProvider.cs @@ -18,7 +18,7 @@ public sealed class SimpleMemberAccessExpressionCodeFixProvider : BaseCodeFixPro { public override ImmutableArray FixableDiagnosticIds { - get { return ImmutableArray.Create(DiagnosticIdentifiers.UsePropertySyntaxNodeSpanStart); } + get { return ImmutableArray.Create(CodeAnalysisDiagnosticIdentifiers.UsePropertySyntaxNodeSpanStart); } } public override async Task RegisterCodeFixesAsync(CodeFixContext context) diff --git a/src/CodeAnalysis.Analyzers.CodeFixes/CSharp/UsePatternMatchingCodeFixProvider.cs b/src/CodeAnalysis.Analyzers.CodeFixes/CSharp/UsePatternMatchingCodeFixProvider.cs index eaa28637bc..db537d197b 100644 --- a/src/CodeAnalysis.Analyzers.CodeFixes/CSharp/UsePatternMatchingCodeFixProvider.cs +++ b/src/CodeAnalysis.Analyzers.CodeFixes/CSharp/UsePatternMatchingCodeFixProvider.cs @@ -26,7 +26,7 @@ public sealed class UsePatternMatchingCodeFixProvider : BaseCodeFixProvider public override ImmutableArray FixableDiagnosticIds { - get { return ImmutableArray.Create(DiagnosticIdentifiers.UsePatternMatching); } + get { return ImmutableArray.Create(CodeAnalysisDiagnosticIdentifiers.UsePatternMatching); } } public override async Task RegisterCodeFixesAsync(CodeFixContext context) diff --git a/src/CodeAnalysis.Analyzers/CSharp/ElementAccessExpressionAnalyzer.cs b/src/CodeAnalysis.Analyzers/CSharp/ElementAccessExpressionAnalyzer.cs index bacb3c7b5e..c364609cb9 100644 --- a/src/CodeAnalysis.Analyzers/CSharp/ElementAccessExpressionAnalyzer.cs +++ b/src/CodeAnalysis.Analyzers/CSharp/ElementAccessExpressionAnalyzer.cs @@ -20,7 +20,7 @@ public override ImmutableArray SupportedDiagnostics get { if (_supportedDiagnostics.IsDefault) - Immutable.InterlockedInitialize(ref _supportedDiagnostics, DiagnosticRules.CallLastInsteadOfUsingElementAccess); + Immutable.InterlockedInitialize(ref _supportedDiagnostics, CodeAnalysisDiagnosticRules.CallLastInsteadOfUsingElementAccess); return _supportedDiagnostics; } @@ -79,6 +79,6 @@ private static void AnalyzeElementAccessExpression(SyntaxNodeAnalysisContext con return; } - DiagnosticHelpers.ReportDiagnostic(context, DiagnosticRules.CallLastInsteadOfUsingElementAccess, elementAccessExpression.ArgumentList); + DiagnosticHelpers.ReportDiagnostic(context, CodeAnalysisDiagnosticRules.CallLastInsteadOfUsingElementAccess, elementAccessExpression.ArgumentList); } } diff --git a/src/CodeAnalysis.Analyzers/CSharp/InvocationExpressionAnalyzer.cs b/src/CodeAnalysis.Analyzers/CSharp/InvocationExpressionAnalyzer.cs index 25ef0bf2e8..69d90b6817 100644 --- a/src/CodeAnalysis.Analyzers/CSharp/InvocationExpressionAnalyzer.cs +++ b/src/CodeAnalysis.Analyzers/CSharp/InvocationExpressionAnalyzer.cs @@ -24,9 +24,9 @@ public override ImmutableArray SupportedDiagnostics { Immutable.InterlockedInitialize( ref _supportedDiagnostics, - DiagnosticRules.UnnecessaryNullCheck, - DiagnosticRules.UseElementAccess, - DiagnosticRules.UseReturnValue); + CodeAnalysisDiagnosticRules.UnnecessaryNullCheck, + CodeAnalysisDiagnosticRules.UseElementAccess, + CodeAnalysisDiagnosticRules.UseReturnValue); } return _supportedDiagnostics; @@ -64,7 +64,7 @@ private static void AnalyzeInvocationExpression(SyntaxNodeAnalysisContext contex { case "First": { - if (DiagnosticRules.UseElementAccess.IsEffective(context)) + if (CodeAnalysisDiagnosticRules.UseElementAccess.IsEffective(context)) UseElementAccessInsteadOfCallingFirst(); break; @@ -79,14 +79,14 @@ private static void AnalyzeInvocationExpression(SyntaxNodeAnalysisContext contex { case "ElementAt": { - if (DiagnosticRules.UseElementAccess.IsEffective(context)) + if (CodeAnalysisDiagnosticRules.UseElementAccess.IsEffective(context)) UseElementAccessInsteadOfCallingElementAt(); break; } case "IsKind": { - if (DiagnosticRules.UnnecessaryNullCheck.IsEffective(context)) + if (CodeAnalysisDiagnosticRules.UnnecessaryNullCheck.IsEffective(context)) AnalyzeUnnecessaryNullCheck(); break; @@ -97,7 +97,7 @@ private static void AnalyzeInvocationExpression(SyntaxNodeAnalysisContext contex } } - if (DiagnosticRules.UseReturnValue.IsEffective(context) + if (CodeAnalysisDiagnosticRules.UseReturnValue.IsEffective(context) && invocationExpression.IsParentKind(SyntaxKind.ExpressionStatement)) { UseReturnValue(); @@ -138,7 +138,7 @@ void AnalyzeUnnecessaryNullCheck() DiagnosticHelpers.ReportDiagnostic( context, - DiagnosticRules.UnnecessaryNullCheck, + CodeAnalysisDiagnosticRules.UnnecessaryNullCheck, Location.Create(invocationInfo.InvocationExpression.SyntaxTree, span)); } @@ -161,7 +161,7 @@ void UseElementAccessInsteadOfCallingFirst() DiagnosticHelpers.ReportDiagnostic( context, - DiagnosticRules.UseElementAccess, + CodeAnalysisDiagnosticRules.UseElementAccess, Location.Create(invocationExpression.SyntaxTree, span)); } @@ -184,7 +184,7 @@ void UseElementAccessInsteadOfCallingElementAt() DiagnosticHelpers.ReportDiagnostic( context, - DiagnosticRules.UseElementAccess, + CodeAnalysisDiagnosticRules.UseElementAccess, Location.Create(invocationExpression.SyntaxTree, span)); } @@ -204,7 +204,7 @@ void UseReturnValue() if (!RoslynSymbolUtility.IsRoslynType(methodSymbol.ReturnType)) return; - DiagnosticHelpers.ReportDiagnostic(context, DiagnosticRules.UseReturnValue, invocationExpression); + DiagnosticHelpers.ReportDiagnostic(context, CodeAnalysisDiagnosticRules.UseReturnValue, invocationExpression); } } } diff --git a/src/CodeAnalysis.Analyzers/CSharp/NamedTypeSymbolAnalyzer.cs b/src/CodeAnalysis.Analyzers/CSharp/NamedTypeSymbolAnalyzer.cs index 500d6a3603..cc81906b9e 100644 --- a/src/CodeAnalysis.Analyzers/CSharp/NamedTypeSymbolAnalyzer.cs +++ b/src/CodeAnalysis.Analyzers/CSharp/NamedTypeSymbolAnalyzer.cs @@ -22,9 +22,9 @@ public override ImmutableArray SupportedDiagnostics { Immutable.InterlockedInitialize( ref _supportedDiagnostics, - DiagnosticRules.UnknownLanguageName, - DiagnosticRules.SpecifyExportCodeFixProviderAttributeName, - DiagnosticRules.SpecifyExportCodeRefactoringProviderAttributeName); + CodeAnalysisDiagnosticRules.UnknownLanguageName, + CodeAnalysisDiagnosticRules.SpecifyExportCodeFixProviderAttributeName, + CodeAnalysisDiagnosticRules.SpecifyExportCodeRefactoringProviderAttributeName); } return _supportedDiagnostics; @@ -94,7 +94,7 @@ private static void AnalyzeDiagnosticAnalyzer(SymbolAnalysisContext context, INa if (attribute is null) return; - if (DiagnosticRules.UnknownLanguageName.IsEffective(context)) + if (CodeAnalysisDiagnosticRules.UnknownLanguageName.IsEffective(context)) AnalyzeLanguageName(context, attribute); } @@ -105,13 +105,13 @@ private static void AnalyzeCodeFixProvider(SymbolAnalysisContext context, INamed if (attribute is null) return; - if (DiagnosticRules.UnknownLanguageName.IsEffective(context)) + if (CodeAnalysisDiagnosticRules.UnknownLanguageName.IsEffective(context)) AnalyzeLanguageName(context, attribute); - if (DiagnosticRules.SpecifyExportCodeFixProviderAttributeName.IsEffective(context) + if (CodeAnalysisDiagnosticRules.SpecifyExportCodeFixProviderAttributeName.IsEffective(context) && !ContainsNamedArgument(attribute, "Name")) { - ReportDiagnostic(context, attribute, DiagnosticRules.SpecifyExportCodeFixProviderAttributeName); + ReportDiagnostic(context, attribute, CodeAnalysisDiagnosticRules.SpecifyExportCodeFixProviderAttributeName); } } @@ -122,13 +122,13 @@ private static void AnalyzeCodeRefactoringProvider(SymbolAnalysisContext context if (attribute is null) return; - if (DiagnosticRules.UnknownLanguageName.IsEffective(context)) + if (CodeAnalysisDiagnosticRules.UnknownLanguageName.IsEffective(context)) AnalyzeLanguageName(context, attribute); - if (DiagnosticRules.SpecifyExportCodeRefactoringProviderAttributeName.IsEffective(context) + if (CodeAnalysisDiagnosticRules.SpecifyExportCodeRefactoringProviderAttributeName.IsEffective(context) && !ContainsNamedArgument(attribute, "Name")) { - ReportDiagnostic(context, attribute, DiagnosticRules.SpecifyExportCodeRefactoringProviderAttributeName); + ReportDiagnostic(context, attribute, CodeAnalysisDiagnosticRules.SpecifyExportCodeRefactoringProviderAttributeName); } } @@ -196,7 +196,7 @@ private static void ReportUnknownLanguageName(SymbolAnalysisContext context, Att { if (argumentIndex == i) { - DiagnosticHelpers.ReportDiagnostic(context, DiagnosticRules.UnknownLanguageName, arguments[i].Expression); + DiagnosticHelpers.ReportDiagnostic(context, CodeAnalysisDiagnosticRules.UnknownLanguageName, arguments[i].Expression); break; } } diff --git a/src/CodeAnalysis.Analyzers/CSharp/SimpleMemberAccessExpressionAnalyzer.cs b/src/CodeAnalysis.Analyzers/CSharp/SimpleMemberAccessExpressionAnalyzer.cs index 0324c9fc18..8683fb308a 100644 --- a/src/CodeAnalysis.Analyzers/CSharp/SimpleMemberAccessExpressionAnalyzer.cs +++ b/src/CodeAnalysis.Analyzers/CSharp/SimpleMemberAccessExpressionAnalyzer.cs @@ -25,8 +25,8 @@ public override ImmutableArray SupportedDiagnostics { Immutable.InterlockedInitialize( ref _supportedDiagnostics, - DiagnosticRules.UsePropertySyntaxNodeSpanStart, - DiagnosticRules.CallAnyInsteadOfAccessingCount); + CodeAnalysisDiagnosticRules.UsePropertySyntaxNodeSpanStart, + CodeAnalysisDiagnosticRules.CallAnyInsteadOfAccessingCount); } return _supportedDiagnostics; @@ -85,7 +85,7 @@ private static void AnalyzeSimpleMemberAccessExpression(SyntaxNodeAnalysisContex if (!symbol2.ContainingType.HasMetadataName(MetadataNames.Microsoft_CodeAnalysis_SyntaxNode)) break; - DiagnosticHelpers.ReportDiagnostic(context, DiagnosticRules.UsePropertySyntaxNodeSpanStart, memberAccessExpression); + DiagnosticHelpers.ReportDiagnostic(context, CodeAnalysisDiagnosticRules.UsePropertySyntaxNodeSpanStart, memberAccessExpression); break; } case "Count": @@ -139,7 +139,7 @@ void CallAnyInsteadOfUsingCount() ? TextSpan.FromBounds(name.SpanStart, numericLiteralExpression.Span.End) : TextSpan.FromBounds(numericLiteralExpression.SpanStart, name.Span.End); - DiagnosticHelpers.ReportDiagnostic(context, DiagnosticRules.CallAnyInsteadOfAccessingCount, Location.Create(memberAccessExpression.SyntaxTree, span)); + DiagnosticHelpers.ReportDiagnostic(context, CodeAnalysisDiagnosticRules.CallAnyInsteadOfAccessingCount, Location.Create(memberAccessExpression.SyntaxTree, span)); } } } diff --git a/src/CodeAnalysis.Analyzers/CSharp/UnnecessaryConditionalAccessAnalyzer.cs b/src/CodeAnalysis.Analyzers/CSharp/UnnecessaryConditionalAccessAnalyzer.cs index 33ad9f308c..1351501dab 100644 --- a/src/CodeAnalysis.Analyzers/CSharp/UnnecessaryConditionalAccessAnalyzer.cs +++ b/src/CodeAnalysis.Analyzers/CSharp/UnnecessaryConditionalAccessAnalyzer.cs @@ -24,8 +24,8 @@ public override ImmutableArray SupportedDiagnostics { Immutable.InterlockedInitialize( ref _supportedDiagnostics, - DiagnosticRules.UnnecessaryConditionalAccess, - DiagnosticRules.UnnecessaryConditionalAccessFadeOut); + CodeAnalysisDiagnosticRules.UnnecessaryConditionalAccess, + CodeAnalysisDiagnosticRules.UnnecessaryConditionalAccessFadeOut); } return _supportedDiagnostics; @@ -114,7 +114,7 @@ private static void AnalyzeBinaryExpression(SyntaxNodeAnalysisContext context) if (!parameters[1].Type.HasMetadataName(RoslynMetadataNames.Microsoft_CodeAnalysis_CSharp_SyntaxKind)) return; - DiagnosticHelpers.ReportDiagnostic(context, DiagnosticRules.UnnecessaryConditionalAccess, conditionalAccess.OperatorToken); - DiagnosticHelpers.ReportDiagnostic(context, DiagnosticRules.UnnecessaryConditionalAccessFadeOut, binaryExpression.Right); + DiagnosticHelpers.ReportDiagnostic(context, CodeAnalysisDiagnosticRules.UnnecessaryConditionalAccess, conditionalAccess.OperatorToken); + DiagnosticHelpers.ReportDiagnostic(context, CodeAnalysisDiagnosticRules.UnnecessaryConditionalAccessFadeOut, binaryExpression.Right); } } diff --git a/src/CodeAnalysis.Analyzers/CSharp/UsePatternMatchingAnalyzer.cs b/src/CodeAnalysis.Analyzers/CSharp/UsePatternMatchingAnalyzer.cs index 52fc97520e..9877f70866 100644 --- a/src/CodeAnalysis.Analyzers/CSharp/UsePatternMatchingAnalyzer.cs +++ b/src/CodeAnalysis.Analyzers/CSharp/UsePatternMatchingAnalyzer.cs @@ -30,7 +30,7 @@ public override ImmutableArray SupportedDiagnostics get { if (_supportedDiagnostics.IsDefault) - Immutable.InterlockedInitialize(ref _supportedDiagnostics, DiagnosticRules.UsePatternMatching); + Immutable.InterlockedInitialize(ref _supportedDiagnostics, CodeAnalysisDiagnosticRules.UsePatternMatching); return _supportedDiagnostics; } @@ -187,7 +187,7 @@ private static void AnalyzeSwitchStatement(SyntaxNodeAnalysisContext context) return; } - DiagnosticHelpers.ReportDiagnostic(context, DiagnosticRules.UsePatternMatching, switchStatement.SwitchKeyword); + DiagnosticHelpers.ReportDiagnostic(context, CodeAnalysisDiagnosticRules.UsePatternMatching, switchStatement.SwitchKeyword); string GetName() { @@ -320,7 +320,7 @@ void Analyze(StatementSyntax statement) if (!CSharpFactory.AreEquivalent(isKindExpression.Expression, castExpression.Expression)) return; - DiagnosticHelpers.ReportDiagnostic(context, DiagnosticRules.UsePatternMatching, ifStatement.IfKeyword); + DiagnosticHelpers.ReportDiagnostic(context, CodeAnalysisDiagnosticRules.UsePatternMatching, ifStatement.IfKeyword); } } diff --git a/src/CodeFixes/CSharp/CodeFixes/DeclareAsNullableCodeFixProvider.cs b/src/CodeFixes/CSharp/CodeFixes/DeclareAsNullableCodeFixProvider.cs index 6dd1104900..c745e9516c 100644 --- a/src/CodeFixes/CSharp/CodeFixes/DeclareAsNullableCodeFixProvider.cs +++ b/src/CodeFixes/CSharp/CodeFixes/DeclareAsNullableCodeFixProvider.cs @@ -2,7 +2,6 @@ using System.Collections.Immutable; using System.Composition; -using System.Linq; using System.Threading.Tasks; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CodeActions; diff --git a/src/CommandLine/ConsoleHelpWriter.cs b/src/CommandLine/ConsoleHelpWriter.cs index 27a4627d8f..2497d695f7 100644 --- a/src/CommandLine/ConsoleHelpWriter.cs +++ b/src/CommandLine/ConsoleHelpWriter.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; -using Roslynator; using Roslynator.CommandLine.Help; using static Roslynator.Logger; diff --git a/src/Common/CSharp/Analysis/ConvertLambdaExpressionBodyToExpressionBodyAnalysis.cs b/src/Common/CSharp/Analysis/ConvertLambdaExpressionBodyToExpressionBodyAnalysis.cs index 077e5884e0..8d4d83d84e 100644 --- a/src/Common/CSharp/Analysis/ConvertLambdaExpressionBodyToExpressionBodyAnalysis.cs +++ b/src/Common/CSharp/Analysis/ConvertLambdaExpressionBodyToExpressionBodyAnalysis.cs @@ -1,7 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Linq; -using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Text; diff --git a/src/Common/CSharp/Analysis/RemoveAsyncAwaitAnalysis.cs b/src/Common/CSharp/Analysis/RemoveAsyncAwaitAnalysis.cs index c8132903bc..dfa7810b23 100644 --- a/src/Common/CSharp/Analysis/RemoveAsyncAwaitAnalysis.cs +++ b/src/Common/CSharp/Analysis/RemoveAsyncAwaitAnalysis.cs @@ -6,8 +6,6 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Roslynator; -using Roslynator.CSharp; using Roslynator.CSharp.Syntax; using Roslynator.CSharp.SyntaxWalkers; diff --git a/src/Common/CSharp/SyntaxTriviaAnalysis.cs b/src/Common/CSharp/SyntaxTriviaAnalysis.cs index 657c588eb3..e995ce2e8b 100644 --- a/src/Common/CSharp/SyntaxTriviaAnalysis.cs +++ b/src/Common/CSharp/SyntaxTriviaAnalysis.cs @@ -9,7 +9,6 @@ using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Diagnostics; using Microsoft.CodeAnalysis.Text; -using Roslynator.CSharp; using Roslynator.Text; using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory; diff --git a/src/CodeAnalysis.Analyzers/CSharp/DiagnosticIdentifiers.Generated.cs b/src/Common/CodeAnalysis/CodeAnalysisDiagnosticIdentifiers.Generated.cs similarity index 90% rename from src/CodeAnalysis.Analyzers/CSharp/DiagnosticIdentifiers.Generated.cs rename to src/Common/CodeAnalysis/CodeAnalysisDiagnosticIdentifiers.Generated.cs index b24b02d6ba..ff4a6a791f 100644 --- a/src/CodeAnalysis.Analyzers/CSharp/DiagnosticIdentifiers.Generated.cs +++ b/src/Common/CodeAnalysis/CodeAnalysisDiagnosticIdentifiers.Generated.cs @@ -4,9 +4,9 @@ using System; -namespace Roslynator.CodeAnalysis.CSharp +namespace Roslynator.CodeAnalysis { - public static partial class DiagnosticIdentifiers + public static partial class CodeAnalysisDiagnosticIdentifiers { public const string UsePatternMatching = "RCS9001"; public const string UsePropertySyntaxNodeSpanStart = "RCS9002"; diff --git a/src/CodeAnalysis.Analyzers/CSharp/DiagnosticRules.Generated.cs b/src/Common/CodeAnalysis/CodeAnalysisDiagnosticRules.Generated.cs similarity index 70% rename from src/CodeAnalysis.Analyzers/CSharp/DiagnosticRules.Generated.cs rename to src/Common/CodeAnalysis/CodeAnalysisDiagnosticRules.Generated.cs index 33801bbaf6..5e78ca4a84 100644 --- a/src/CodeAnalysis.Analyzers/CSharp/DiagnosticRules.Generated.cs +++ b/src/Common/CodeAnalysis/CodeAnalysisDiagnosticRules.Generated.cs @@ -5,143 +5,143 @@ using System; using Microsoft.CodeAnalysis; -namespace Roslynator.CodeAnalysis.CSharp +namespace Roslynator.CodeAnalysis { - public static partial class DiagnosticRules + public static partial class CodeAnalysisDiagnosticRules { /// RCS9001 public static readonly DiagnosticDescriptor UsePatternMatching = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.UsePatternMatching, + id: CodeAnalysisDiagnosticIdentifiers.UsePatternMatching, title: "Use pattern matching", messageFormat: "Use pattern matching", category: DiagnosticCategories.Roslynator, defaultSeverity: DiagnosticSeverity.Hidden, isEnabledByDefault: true, description: null, - helpLinkUri: DiagnosticIdentifiers.UsePatternMatching, - customTags: Array.Empty()); + helpLinkUri: CodeAnalysisDiagnosticIdentifiers.UsePatternMatching, + customTags: []); /// RCS9002 public static readonly DiagnosticDescriptor UsePropertySyntaxNodeSpanStart = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.UsePropertySyntaxNodeSpanStart, + id: CodeAnalysisDiagnosticIdentifiers.UsePropertySyntaxNodeSpanStart, title: "Use property SyntaxNode.SpanStart", messageFormat: "Use property SyntaxNode.SpanStart", category: DiagnosticCategories.Roslynator, defaultSeverity: DiagnosticSeverity.Info, isEnabledByDefault: true, description: null, - helpLinkUri: DiagnosticIdentifiers.UsePropertySyntaxNodeSpanStart, - customTags: Array.Empty()); + helpLinkUri: CodeAnalysisDiagnosticIdentifiers.UsePropertySyntaxNodeSpanStart, + customTags: []); /// RCS9003 public static readonly DiagnosticDescriptor UnnecessaryConditionalAccess = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.UnnecessaryConditionalAccess, + id: CodeAnalysisDiagnosticIdentifiers.UnnecessaryConditionalAccess, title: "Unnecessary conditional access", messageFormat: "Unnecessary conditional access", category: DiagnosticCategories.Roslynator, defaultSeverity: DiagnosticSeverity.Info, isEnabledByDefault: true, description: null, - helpLinkUri: DiagnosticIdentifiers.UnnecessaryConditionalAccess, + helpLinkUri: CodeAnalysisDiagnosticIdentifiers.UnnecessaryConditionalAccess, customTags: WellKnownDiagnosticTags.Unnecessary); public static readonly DiagnosticDescriptor UnnecessaryConditionalAccessFadeOut = DiagnosticDescriptorFactory.CreateFadeOut(UnnecessaryConditionalAccess); /// RCS9004 public static readonly DiagnosticDescriptor CallAnyInsteadOfAccessingCount = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.CallAnyInsteadOfAccessingCount, + id: CodeAnalysisDiagnosticIdentifiers.CallAnyInsteadOfAccessingCount, title: "Call 'Any' instead of accessing 'Count'", messageFormat: "Call 'Any' instead of accessing 'Count'", category: DiagnosticCategories.Roslynator, defaultSeverity: DiagnosticSeverity.Info, isEnabledByDefault: true, description: null, - helpLinkUri: DiagnosticIdentifiers.CallAnyInsteadOfAccessingCount, - customTags: Array.Empty()); + helpLinkUri: CodeAnalysisDiagnosticIdentifiers.CallAnyInsteadOfAccessingCount, + customTags: []); /// RCS9005 public static readonly DiagnosticDescriptor UnnecessaryNullCheck = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.UnnecessaryNullCheck, + id: CodeAnalysisDiagnosticIdentifiers.UnnecessaryNullCheck, title: "Unnecessary null check", messageFormat: "Unnecessary null check", category: DiagnosticCategories.Roslynator, defaultSeverity: DiagnosticSeverity.Info, isEnabledByDefault: true, description: null, - helpLinkUri: DiagnosticIdentifiers.UnnecessaryNullCheck, + helpLinkUri: CodeAnalysisDiagnosticIdentifiers.UnnecessaryNullCheck, customTags: WellKnownDiagnosticTags.Unnecessary); /// RCS9006 public static readonly DiagnosticDescriptor UseElementAccess = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.UseElementAccess, + id: CodeAnalysisDiagnosticIdentifiers.UseElementAccess, title: "Use element access", messageFormat: "Use element access", category: DiagnosticCategories.Roslynator, defaultSeverity: DiagnosticSeverity.Info, isEnabledByDefault: true, description: null, - helpLinkUri: DiagnosticIdentifiers.UseElementAccess, - customTags: Array.Empty()); + helpLinkUri: CodeAnalysisDiagnosticIdentifiers.UseElementAccess, + customTags: []); /// RCS9007 public static readonly DiagnosticDescriptor UseReturnValue = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.UseReturnValue, + id: CodeAnalysisDiagnosticIdentifiers.UseReturnValue, title: "Use return value", messageFormat: "Use return value", category: DiagnosticCategories.Roslynator, defaultSeverity: DiagnosticSeverity.Warning, isEnabledByDefault: true, description: null, - helpLinkUri: DiagnosticIdentifiers.UseReturnValue, - customTags: Array.Empty()); + helpLinkUri: CodeAnalysisDiagnosticIdentifiers.UseReturnValue, + customTags: []); /// RCS9008 public static readonly DiagnosticDescriptor CallLastInsteadOfUsingElementAccess = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.CallLastInsteadOfUsingElementAccess, + id: CodeAnalysisDiagnosticIdentifiers.CallLastInsteadOfUsingElementAccess, title: "Call 'Last' instead of using []", messageFormat: "Call 'Last' instead of using []", category: DiagnosticCategories.Roslynator, defaultSeverity: DiagnosticSeverity.Info, isEnabledByDefault: true, description: null, - helpLinkUri: DiagnosticIdentifiers.CallLastInsteadOfUsingElementAccess, - customTags: Array.Empty()); + helpLinkUri: CodeAnalysisDiagnosticIdentifiers.CallLastInsteadOfUsingElementAccess, + customTags: []); /// RCS9009 public static readonly DiagnosticDescriptor UnknownLanguageName = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.UnknownLanguageName, + id: CodeAnalysisDiagnosticIdentifiers.UnknownLanguageName, title: "Unknown language name", messageFormat: "Unknown language name", category: DiagnosticCategories.Roslynator, defaultSeverity: DiagnosticSeverity.Warning, isEnabledByDefault: true, description: null, - helpLinkUri: DiagnosticIdentifiers.UnknownLanguageName, - customTags: Array.Empty()); + helpLinkUri: CodeAnalysisDiagnosticIdentifiers.UnknownLanguageName, + customTags: []); /// RCS9010 public static readonly DiagnosticDescriptor SpecifyExportCodeRefactoringProviderAttributeName = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.SpecifyExportCodeRefactoringProviderAttributeName, + id: CodeAnalysisDiagnosticIdentifiers.SpecifyExportCodeRefactoringProviderAttributeName, title: "Specify ExportCodeRefactoringProviderAttribute.Name", messageFormat: "Specify ExportCodeRefactoringProviderAttribute.Name", category: DiagnosticCategories.Roslynator, defaultSeverity: DiagnosticSeverity.Hidden, isEnabledByDefault: true, description: null, - helpLinkUri: DiagnosticIdentifiers.SpecifyExportCodeRefactoringProviderAttributeName, - customTags: Array.Empty()); + helpLinkUri: CodeAnalysisDiagnosticIdentifiers.SpecifyExportCodeRefactoringProviderAttributeName, + customTags: []); /// RCS9011 public static readonly DiagnosticDescriptor SpecifyExportCodeFixProviderAttributeName = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.SpecifyExportCodeFixProviderAttributeName, + id: CodeAnalysisDiagnosticIdentifiers.SpecifyExportCodeFixProviderAttributeName, title: "Specify ExportCodeFixProviderAttribute.Name", messageFormat: "Specify ExportCodeFixProviderAttribute.Name", category: DiagnosticCategories.Roslynator, defaultSeverity: DiagnosticSeverity.Hidden, isEnabledByDefault: true, description: null, - helpLinkUri: DiagnosticIdentifiers.SpecifyExportCodeFixProviderAttributeName, - customTags: Array.Empty()); + helpLinkUri: CodeAnalysisDiagnosticIdentifiers.SpecifyExportCodeFixProviderAttributeName, + customTags: []); } } \ No newline at end of file diff --git a/src/Common/CommonDiagnosticRules.cs b/src/Common/CommonDiagnosticRules.cs index 5bfc2b082d..1e1d372e2d 100644 --- a/src/Common/CommonDiagnosticRules.cs +++ b/src/Common/CommonDiagnosticRules.cs @@ -1,6 +1,5 @@ // Copyright (c) .NET Foundation and Contributors. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using System; using Microsoft.CodeAnalysis; #pragma warning disable RS2008 // Enable analyzer release tracking @@ -18,7 +17,7 @@ internal static class CommonDiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: null, - customTags: Array.Empty()); + customTags: []); public static readonly DiagnosticDescriptor AnalyzerOptionIsObsolete = DiagnosticDescriptorFactory.Create( id: CommonDiagnosticIdentifiers.AnalyzerOptionIsObsolete, @@ -29,7 +28,7 @@ internal static class CommonDiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: null, - customTags: Array.Empty()); + customTags: []); public static readonly DiagnosticDescriptor RequiredConfigOptionNotSet = DiagnosticDescriptorFactory.Create( id: CommonDiagnosticIdentifiers.RequiredConfigOptionNotSet, @@ -40,5 +39,5 @@ internal static class CommonDiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: null, - customTags: Array.Empty()); + customTags: []); } diff --git a/src/Analyzers/CSharp/DiagnosticIdentifiers.Generated.cs b/src/Common/DiagnosticIdentifiers.Generated.cs similarity index 79% rename from src/Analyzers/CSharp/DiagnosticIdentifiers.Generated.cs rename to src/Common/DiagnosticIdentifiers.Generated.cs index dd1cb8ae80..7cb40c987c 100644 --- a/src/Analyzers/CSharp/DiagnosticIdentifiers.Generated.cs +++ b/src/Common/DiagnosticIdentifiers.Generated.cs @@ -4,10 +4,63 @@ using System; -namespace Roslynator.CSharp +namespace Roslynator { public static partial class DiagnosticIdentifiers { + public const string AddBlankLineAfterEmbeddedStatement = "RCS0001"; + public const string AddBlankLineAfterRegionDirective = "RCS0002"; + public const string AddBlankLineAfterUsingDirectiveList = "RCS0003"; + public const string AddBlankLineBeforeEndRegionDirective = "RCS0005"; + public const string AddBlankLineBeforeUsingDirectiveList = "RCS0006"; + public const string AddBlankLineBetweenAccessors = "RCS0007"; + public const string AddBlankLineBetweenClosingBraceAndNextStatement = "RCS0008"; + public const string AddBlankLineBetweenDeclarationAndDocumentationComment = "RCS0009"; + public const string AddBlankLineBetweenDeclarations = "RCS0010"; + public const string BlankLineBetweenSingleLineAccessors = "RCS0011"; + public const string AddBlankLineBetweenSingleLineDeclarations = "RCS0012"; + public const string AddBlankLineBetweenSingleLineDeclarationsOfDifferentKind = "RCS0013"; + public const string AddBlankLineBetweenSwitchSections = "RCS0014"; + public const string BlankLineBetweenUsingDirectives = "RCS0015"; + public const string PutAttributeListOnItsOwnLine = "RCS0016"; + public const string FormatAccessorBraces = "RCS0020"; + public const string FormatBlockBraces = "RCS0021"; + public const string AddNewLineAfterOpeningBraceOfEmptyBlock = "RCS0022"; + public const string FormatTypeDeclarationBraces = "RCS0023"; + public const string AddNewLineAfterSwitchLabel = "RCS0024"; + public const string PutFullAccessorOnItsOwnLine = "RCS0025"; + public const string PlaceNewLineAfterOrBeforeBinaryOperator = "RCS0027"; + public const string PlaceNewLineAfterOrBeforeConditionalOperator = "RCS0028"; + public const string PutConstructorInitializerOnItsOwnLine = "RCS0029"; + public const string PutEmbeddedStatementOnItsOwnLine = "RCS0030"; + public const string PutEnumMemberOnItsOwnLine = "RCS0031"; + public const string PlaceNewLineAfterOrBeforeArrowToken = "RCS0032"; + public const string PutStatementOnItsOwnLine = "RCS0033"; + public const string PutTypeParameterConstraintOnItsOwnLine = "RCS0034"; + public const string RemoveBlankLineBetweenSingleLineDeclarationsOfSameKind = "RCS0036"; + public const string RemoveBlankLineBetweenUsingDirectivesWithSameRootNamespace = "RCS0038"; + public const string RemoveNewLineBeforeBaseList = "RCS0039"; + public const string RemoveNewLineBetweenIfKeywordAndElseKeyword = "RCS0041"; + public const string PutAutoAccessorsOnSingleLine = "RCS0042"; + public const string FormatAccessorBracesOnSingleLineWhenExpressionIsOnSingleLine = "RCS0043"; + public const string UseCarriageReturnAndLinefeedAsNewLine = "RCS0044"; + public const string UseLinefeedAsNewLine = "RCS0045"; + public const string UseSpacesInsteadOfTab = "RCS0046"; + public const string WrapAndIndentEachNodeInList = "RCS0047"; + public const string PutInitializerOnSingleLine = "RCS0048"; + public const string AddBlankLineAfterTopComment = "RCS0049"; + public const string AddBlankLineBeforeTopDeclaration = "RCS0050"; + public const string AddOrRemoveNewLineBeforeWhileInDoStatement = "RCS0051"; + public const string PlaceNewLineAfterOrBeforeEqualsToken = "RCS0052"; + public const string FixFormattingOfList = "RCS0053"; + public const string FixFormattingOfCallChain = "RCS0054"; + public const string FixFormattingOfBinaryExpressionChain = "RCS0055"; + public const string LineIsTooLong = "RCS0056"; + public const string NormalizeWhitespaceAtBeginningOfFile = "RCS0057"; + public const string NormalizeWhitespaceAtEndOfFile = "RCS0058"; + public const string PlaceNewLineAfterOrBeforeNullConditionalOperator = "RCS0059"; + public const string BlankLineAfterFileScopedNamespaceDeclaration = "RCS0060"; + public const string BlankLineBetweenSwitchSections = "RCS0061"; public const string AddBracesWhenExpressionSpansOverMultipleLines = "RCS1001"; public const string RemoveBraces = "RCS1002"; public const string AddBracesToIfElseWhenExpressionSpansOverMultipleLines = "RCS1003"; diff --git a/src/Analyzers/CSharp/DiagnosticRules.Generated.cs b/src/Common/DiagnosticRules.Generated.cs similarity index 77% rename from src/Analyzers/CSharp/DiagnosticRules.Generated.cs rename to src/Common/DiagnosticRules.Generated.cs index 9e0d1ca25f..2768f9adc0 100644 --- a/src/Analyzers/CSharp/DiagnosticRules.Generated.cs +++ b/src/Common/DiagnosticRules.Generated.cs @@ -5,10 +5,646 @@ using System; using Microsoft.CodeAnalysis; -namespace Roslynator.CSharp +namespace Roslynator { public static partial class DiagnosticRules { + /// RCS0001 + public static readonly DiagnosticDescriptor AddBlankLineAfterEmbeddedStatement = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.AddBlankLineAfterEmbeddedStatement, + title: "Add blank line after embedded statement", + messageFormat: "Add blank line after embedded statement", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.AddBlankLineAfterEmbeddedStatement, + customTags: []); + + /// RCS0002 + public static readonly DiagnosticDescriptor AddBlankLineAfterRegionDirective = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.AddBlankLineAfterRegionDirective, + title: "Add blank line after #region", + messageFormat: "Add blank line after #region", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.AddBlankLineAfterRegionDirective, + customTags: []); + + /// RCS0003 + public static readonly DiagnosticDescriptor AddBlankLineAfterUsingDirectiveList = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.AddBlankLineAfterUsingDirectiveList, + title: "Add blank line after using directive list", + messageFormat: "Add blank line after using directive list", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.AddBlankLineAfterUsingDirectiveList, + customTags: []); + + /// RCS0005 + public static readonly DiagnosticDescriptor AddBlankLineBeforeEndRegionDirective = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.AddBlankLineBeforeEndRegionDirective, + title: "Add blank line before #endregion", + messageFormat: "Add blank line before #endregion", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.AddBlankLineBeforeEndRegionDirective, + customTags: []); + + /// RCS0006 + public static readonly DiagnosticDescriptor AddBlankLineBeforeUsingDirectiveList = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.AddBlankLineBeforeUsingDirectiveList, + title: "Add blank line before using directive list", + messageFormat: "Add blank line before using directive list", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.AddBlankLineBeforeUsingDirectiveList, + customTags: []); + + /// RCS0007 + public static readonly DiagnosticDescriptor AddBlankLineBetweenAccessors = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.AddBlankLineBetweenAccessors, + title: "Add blank line between accessors", + messageFormat: "Add blank line between accessors", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.AddBlankLineBetweenAccessors, + customTags: []); + + /// RCS0008 + public static readonly DiagnosticDescriptor AddBlankLineBetweenClosingBraceAndNextStatement = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.AddBlankLineBetweenClosingBraceAndNextStatement, + title: "Add blank line between closing brace and next statement", + messageFormat: "Add blank line between closing brace and next statement", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.AddBlankLineBetweenClosingBraceAndNextStatement, + customTags: []); + + /// RCS0009 + public static readonly DiagnosticDescriptor AddBlankLineBetweenDeclarationAndDocumentationComment = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.AddBlankLineBetweenDeclarationAndDocumentationComment, + title: "Add blank line between declaration and documentation comment", + messageFormat: "Add blank line between declaration and documentation comment", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.AddBlankLineBetweenDeclarationAndDocumentationComment, + customTags: []); + + /// RCS0010 + public static readonly DiagnosticDescriptor AddBlankLineBetweenDeclarations = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.AddBlankLineBetweenDeclarations, + title: "Add blank line between declarations", + messageFormat: "Add blank line between declarations", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.AddBlankLineBetweenDeclarations, + customTags: []); + + /// RCS0011 + public static readonly DiagnosticDescriptor BlankLineBetweenSingleLineAccessors = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.BlankLineBetweenSingleLineAccessors, + title: "Add/remove blank line between single-line accessors", + messageFormat: "{0} blank line between single-line accessors", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.BlankLineBetweenSingleLineAccessors, + customTags: []); + + /// RCS0012 + public static readonly DiagnosticDescriptor AddBlankLineBetweenSingleLineDeclarations = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.AddBlankLineBetweenSingleLineDeclarations, + title: "Add blank line between single-line declarations", + messageFormat: "Add blank line between single-line declarations", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.AddBlankLineBetweenSingleLineDeclarations, + customTags: []); + + /// RCS0013 + public static readonly DiagnosticDescriptor AddBlankLineBetweenSingleLineDeclarationsOfDifferentKind = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.AddBlankLineBetweenSingleLineDeclarationsOfDifferentKind, + title: "Add blank line between single-line declarations of different kind", + messageFormat: "Add blank line between single-line declarations of different kind", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.AddBlankLineBetweenSingleLineDeclarationsOfDifferentKind, + customTags: []); + + /// RCS0014 + public static readonly DiagnosticDescriptor AddBlankLineBetweenSwitchSections = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.AddBlankLineBetweenSwitchSections, + title: "[deprecated] Add blank line between switch sections", + messageFormat: "([deprecated] Use RCS0061 instead) Add blank line between switch sections", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.AddBlankLineBetweenSwitchSections, + customTags: []); + + /// RCS0015 + public static readonly DiagnosticDescriptor BlankLineBetweenUsingDirectives = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.BlankLineBetweenUsingDirectives, + title: "Add/remove blank line between using directives", + messageFormat: "{0} blank line between using directives", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.BlankLineBetweenUsingDirectives, + customTags: []); + + /// RCS0016 + public static readonly DiagnosticDescriptor PutAttributeListOnItsOwnLine = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.PutAttributeListOnItsOwnLine, + title: "Put attribute list on its own line", + messageFormat: "Put attribute list on its own line", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.PutAttributeListOnItsOwnLine, + customTags: []); + + /// RCS0020 + public static readonly DiagnosticDescriptor FormatAccessorBraces = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.FormatAccessorBraces, + title: "Format accessor's braces on a single line or multiple lines", + messageFormat: "Format braces on {0}", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.FormatAccessorBraces, + customTags: []); + + /// RCS0021 + public static readonly DiagnosticDescriptor FormatBlockBraces = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.FormatBlockBraces, + title: "Format block's braces on a single line or multiple lines", + messageFormat: "Format braces on {0}", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.FormatBlockBraces, + customTags: []); + + /// RCS0022 + public static readonly DiagnosticDescriptor AddNewLineAfterOpeningBraceOfEmptyBlock = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.AddNewLineAfterOpeningBraceOfEmptyBlock, + title: "[deprecated] Add new line after opening brace of empty block", + messageFormat: "([deprecated] Use RCS0021 instead) Format braces on multiple lines", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.AddNewLineAfterOpeningBraceOfEmptyBlock, + customTags: []); + + /// RCS0023 + public static readonly DiagnosticDescriptor FormatTypeDeclarationBraces = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.FormatTypeDeclarationBraces, + title: "Format type declaration's braces", + messageFormat: "Format type declaration's braces", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.FormatTypeDeclarationBraces, + customTags: []); + + /// RCS0024 + public static readonly DiagnosticDescriptor AddNewLineAfterSwitchLabel = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.AddNewLineAfterSwitchLabel, + title: "Add new line after switch label", + messageFormat: "Add new line after switch label", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.AddNewLineAfterSwitchLabel, + customTags: []); + + /// RCS0025 + public static readonly DiagnosticDescriptor PutFullAccessorOnItsOwnLine = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.PutFullAccessorOnItsOwnLine, + title: "Put full accessor on its own line", + messageFormat: "Put full accessor on its own line", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.PutFullAccessorOnItsOwnLine, + customTags: []); + + /// RCS0027 + public static readonly DiagnosticDescriptor PlaceNewLineAfterOrBeforeBinaryOperator = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.PlaceNewLineAfterOrBeforeBinaryOperator, + title: "Place new line after/before binary operator", + messageFormat: "Place new line {0} binary operator", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.PlaceNewLineAfterOrBeforeBinaryOperator, + customTags: []); + + /// RCS0028 + public static readonly DiagnosticDescriptor PlaceNewLineAfterOrBeforeConditionalOperator = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.PlaceNewLineAfterOrBeforeConditionalOperator, + title: "Place new line after/before '?:' operator", + messageFormat: "Place new line {0} operator", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.PlaceNewLineAfterOrBeforeConditionalOperator, + customTags: []); + + /// RCS0029 + public static readonly DiagnosticDescriptor PutConstructorInitializerOnItsOwnLine = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.PutConstructorInitializerOnItsOwnLine, + title: "Put constructor initializer on its own line", + messageFormat: "Put constructor initializer on its own line", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.PutConstructorInitializerOnItsOwnLine, + customTags: []); + + /// RCS0030 + public static readonly DiagnosticDescriptor PutEmbeddedStatementOnItsOwnLine = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.PutEmbeddedStatementOnItsOwnLine, + title: "Put embedded statement on its own line", + messageFormat: "Put embedded statement on its own line", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.PutEmbeddedStatementOnItsOwnLine, + customTags: []); + + /// RCS0031 + public static readonly DiagnosticDescriptor PutEnumMemberOnItsOwnLine = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.PutEnumMemberOnItsOwnLine, + title: "Put enum member on its own line", + messageFormat: "Put enum member on its own line", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.PutEnumMemberOnItsOwnLine, + customTags: []); + + /// RCS0032 + public static readonly DiagnosticDescriptor PlaceNewLineAfterOrBeforeArrowToken = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.PlaceNewLineAfterOrBeforeArrowToken, + title: "Place new line after/before arrow token", + messageFormat: "Place new line {0} arrow token", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.PlaceNewLineAfterOrBeforeArrowToken, + customTags: []); + + /// RCS0033 + public static readonly DiagnosticDescriptor PutStatementOnItsOwnLine = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.PutStatementOnItsOwnLine, + title: "Put statement on its own line", + messageFormat: "Put statement on its own line", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.PutStatementOnItsOwnLine, + customTags: []); + + /// RCS0034 + public static readonly DiagnosticDescriptor PutTypeParameterConstraintOnItsOwnLine = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.PutTypeParameterConstraintOnItsOwnLine, + title: "Put type parameter constraint on its own line", + messageFormat: "Put type parameter constraint on its own line", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.PutTypeParameterConstraintOnItsOwnLine, + customTags: []); + + /// RCS0036 + public static readonly DiagnosticDescriptor RemoveBlankLineBetweenSingleLineDeclarationsOfSameKind = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.RemoveBlankLineBetweenSingleLineDeclarationsOfSameKind, + title: "Remove blank line between single-line declarations of same kind", + messageFormat: "Remove blank line between single-line declarations of same kind", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.RemoveBlankLineBetweenSingleLineDeclarationsOfSameKind, + customTags: []); + + /// RCS0038 + public static readonly DiagnosticDescriptor RemoveBlankLineBetweenUsingDirectivesWithSameRootNamespace = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.RemoveBlankLineBetweenUsingDirectivesWithSameRootNamespace, + title: "[deprecated] Remove blank line between using directives with same root namespace", + messageFormat: "([deprecated] Use RCS0015 instead) Remove blank line between using directives", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.RemoveBlankLineBetweenUsingDirectivesWithSameRootNamespace, + customTags: []); + + /// RCS0039 + public static readonly DiagnosticDescriptor RemoveNewLineBeforeBaseList = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.RemoveNewLineBeforeBaseList, + title: "Remove new line before base list", + messageFormat: "Remove new line before base list", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.RemoveNewLineBeforeBaseList, + customTags: []); + + /// RCS0041 + public static readonly DiagnosticDescriptor RemoveNewLineBetweenIfKeywordAndElseKeyword = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.RemoveNewLineBetweenIfKeywordAndElseKeyword, + title: "Remove new line between 'if' keyword and 'else' keyword", + messageFormat: "Remove new line between 'if' keyword and 'else' keyword", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.RemoveNewLineBetweenIfKeywordAndElseKeyword, + customTags: []); + + /// RCS0042 + public static readonly DiagnosticDescriptor PutAutoAccessorsOnSingleLine = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.PutAutoAccessorsOnSingleLine, + title: "Put auto-accessors on a single line", + messageFormat: "Put auto-accessors on a single line", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.PutAutoAccessorsOnSingleLine, + customTags: []); + + /// RCS0043 + public static readonly DiagnosticDescriptor FormatAccessorBracesOnSingleLineWhenExpressionIsOnSingleLine = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.FormatAccessorBracesOnSingleLineWhenExpressionIsOnSingleLine, + title: "[deprecated] Format accessor's braces on a single line when expression is on single line", + messageFormat: "([deprecated] Use RCS0020 with option 'roslynator_accessor_braces_style = single_line_when_expression_is_on_single_line') Format braces on a single line", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.FormatAccessorBracesOnSingleLineWhenExpressionIsOnSingleLine, + customTags: []); + + /// RCS0044 + public static readonly DiagnosticDescriptor UseCarriageReturnAndLinefeedAsNewLine = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.UseCarriageReturnAndLinefeedAsNewLine, + title: "Use carriage return + linefeed as new line", + messageFormat: "Use carriage return + linefeed as new line", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.UseCarriageReturnAndLinefeedAsNewLine, + customTags: []); + + /// RCS0045 + public static readonly DiagnosticDescriptor UseLinefeedAsNewLine = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.UseLinefeedAsNewLine, + title: "Use linefeed as new line", + messageFormat: "Use linefeed as new line", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.UseLinefeedAsNewLine, + customTags: []); + + /// RCS0046 + public static readonly DiagnosticDescriptor UseSpacesInsteadOfTab = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.UseSpacesInsteadOfTab, + title: "Use spaces instead of tab", + messageFormat: "Use spaces instead of tab", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.UseSpacesInsteadOfTab, + customTags: []); + + /// RCS0047 + public static readonly DiagnosticDescriptor WrapAndIndentEachNodeInList = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.WrapAndIndentEachNodeInList, + title: "[deprecated] Wrap and indent each node in list", + messageFormat: "([deprecated] Use RCS0053 instead) Wrap and indent each node in list", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.WrapAndIndentEachNodeInList, + customTags: []); + + /// RCS0048 + public static readonly DiagnosticDescriptor PutInitializerOnSingleLine = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.PutInitializerOnSingleLine, + title: "Put initializer on a single line", + messageFormat: "Put initializer on a single line", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Hidden, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.PutInitializerOnSingleLine, + customTags: []); + + /// RCS0049 + public static readonly DiagnosticDescriptor AddBlankLineAfterTopComment = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.AddBlankLineAfterTopComment, + title: "Add blank line after top comment", + messageFormat: "Add blank line after top comment", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.AddBlankLineAfterTopComment, + customTags: []); + + /// RCS0050 + public static readonly DiagnosticDescriptor AddBlankLineBeforeTopDeclaration = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.AddBlankLineBeforeTopDeclaration, + title: "Add blank line before top declaration", + messageFormat: "Add blank line before top declaration", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.AddBlankLineBeforeTopDeclaration, + customTags: []); + + /// RCS0051 + public static readonly DiagnosticDescriptor AddOrRemoveNewLineBeforeWhileInDoStatement = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.AddOrRemoveNewLineBeforeWhileInDoStatement, + title: "Add/remove new line before 'while' in 'do' statement", + messageFormat: "{0} new line before 'while' in 'do' statement", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.AddOrRemoveNewLineBeforeWhileInDoStatement, + customTags: []); + + /// RCS0052 + public static readonly DiagnosticDescriptor PlaceNewLineAfterOrBeforeEqualsToken = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.PlaceNewLineAfterOrBeforeEqualsToken, + title: "Place new line after/before equals token", + messageFormat: "Place new line {0} equals token", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.PlaceNewLineAfterOrBeforeEqualsToken, + customTags: []); + + /// RCS0053 + public static readonly DiagnosticDescriptor FixFormattingOfList = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.FixFormattingOfList, + title: "Fix formatting of a list", + messageFormat: "Fix formatting of {0}", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.FixFormattingOfList, + customTags: []); + + /// RCS0054 + public static readonly DiagnosticDescriptor FixFormattingOfCallChain = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.FixFormattingOfCallChain, + title: "Fix formatting of a call chain", + messageFormat: "Fix formatting of a call chain", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.FixFormattingOfCallChain, + customTags: []); + + /// RCS0055 + public static readonly DiagnosticDescriptor FixFormattingOfBinaryExpressionChain = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.FixFormattingOfBinaryExpressionChain, + title: "Fix formatting of a binary expression chain", + messageFormat: "Fix formatting of a binary expression chain", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.FixFormattingOfBinaryExpressionChain, + customTags: []); + + /// RCS0056 + public static readonly DiagnosticDescriptor LineIsTooLong = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.LineIsTooLong, + title: "A line is too long", + messageFormat: "A line is too long ({0} characters)", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.LineIsTooLong, + customTags: []); + + /// RCS0057 + public static readonly DiagnosticDescriptor NormalizeWhitespaceAtBeginningOfFile = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.NormalizeWhitespaceAtBeginningOfFile, + title: "Normalize whitespace at the beginning of a file", + messageFormat: "Normalize whitespace at the beginning of a file", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.NormalizeWhitespaceAtBeginningOfFile, + customTags: []); + + /// RCS0058 + public static readonly DiagnosticDescriptor NormalizeWhitespaceAtEndOfFile = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.NormalizeWhitespaceAtEndOfFile, + title: "Normalize whitespace at the end of a file", + messageFormat: "Normalize whitespace at the end of a file", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.NormalizeWhitespaceAtEndOfFile, + customTags: []); + + /// RCS0059 + public static readonly DiagnosticDescriptor PlaceNewLineAfterOrBeforeNullConditionalOperator = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.PlaceNewLineAfterOrBeforeNullConditionalOperator, + title: "Place new line after/before null-conditional operator", + messageFormat: "Place new line {0} null-conditional operator", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.PlaceNewLineAfterOrBeforeNullConditionalOperator, + customTags: []); + + /// RCS0060 + public static readonly DiagnosticDescriptor BlankLineAfterFileScopedNamespaceDeclaration = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.BlankLineAfterFileScopedNamespaceDeclaration, + title: "Add/remove line after file scoped namespace declaration", + messageFormat: "{0} line after file scoped namespace declaration", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.BlankLineAfterFileScopedNamespaceDeclaration, + customTags: []); + + /// RCS0061 + public static readonly DiagnosticDescriptor BlankLineBetweenSwitchSections = DiagnosticDescriptorFactory.Create( + id: DiagnosticIdentifiers.BlankLineBetweenSwitchSections, + title: "Add/remove blank line between switch sections", + messageFormat: "{0} blank line between switch sections", + category: DiagnosticCategories.Roslynator, + defaultSeverity: DiagnosticSeverity.Info, + isEnabledByDefault: false, + description: null, + helpLinkUri: DiagnosticIdentifiers.BlankLineBetweenSwitchSections, + customTags: []); + /// RCS1001 public static readonly DiagnosticDescriptor AddBracesWhenExpressionSpansOverMultipleLines = DiagnosticDescriptorFactory.Create( id: DiagnosticIdentifiers.AddBracesWhenExpressionSpansOverMultipleLines, @@ -19,7 +655,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.AddBracesWhenExpressionSpansOverMultipleLines, - customTags: Array.Empty()); + customTags: []); /// RCS1002 public static readonly DiagnosticDescriptor RemoveBraces = DiagnosticDescriptorFactory.Create( @@ -31,7 +667,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.RemoveBraces, - customTags: Array.Empty()); + customTags: []); public static readonly DiagnosticDescriptor RemoveBracesFadeOut = DiagnosticDescriptorFactory.CreateFadeOut(RemoveBraces); @@ -45,7 +681,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.AddBracesToIfElseWhenExpressionSpansOverMultipleLines, - customTags: Array.Empty()); + customTags: []); /// RCS1004 public static readonly DiagnosticDescriptor RemoveBracesFromIfElse = DiagnosticDescriptorFactory.Create( @@ -57,7 +693,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.RemoveBracesFromIfElse, - customTags: Array.Empty()); + customTags: []); public static readonly DiagnosticDescriptor RemoveBracesFromIfElseFadeOut = DiagnosticDescriptorFactory.CreateFadeOut(RemoveBracesFromIfElse); @@ -71,7 +707,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.SimplifyNestedUsingStatement, - customTags: Array.Empty()); + customTags: []); public static readonly DiagnosticDescriptor SimplifyNestedUsingStatementFadeOut = DiagnosticDescriptorFactory.CreateFadeOut(SimplifyNestedUsingStatement); @@ -85,7 +721,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.MergeElseWithNestedIf, - customTags: Array.Empty()); + customTags: []); public static readonly DiagnosticDescriptor MergeElseWithNestedIfFadeOut = DiagnosticDescriptorFactory.CreateFadeOut(MergeElseWithNestedIf); @@ -99,7 +735,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.AddBraces, - customTags: Array.Empty()); + customTags: []); /// RCS1008 public static readonly DiagnosticDescriptor UseExplicitTypeInsteadOfVarWhenTypeIsNotObvious = DiagnosticDescriptorFactory.Create( @@ -111,7 +747,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.UseExplicitTypeInsteadOfVarWhenTypeIsNotObvious, - customTags: Array.Empty()); + customTags: []); /// RCS1009 public static readonly DiagnosticDescriptor UseExplicitTypeInsteadOfVarInForEach = DiagnosticDescriptorFactory.Create( @@ -123,7 +759,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.UseExplicitTypeInsteadOfVarInForEach, - customTags: Array.Empty()); + customTags: []); /// RCS1010 public static readonly DiagnosticDescriptor UseVarInsteadOfExplicitTypeWhenTypeIsObvious = DiagnosticDescriptorFactory.Create( @@ -147,7 +783,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.UseExplicitTypeInsteadOfVarWhenTypeIsObvious, - customTags: Array.Empty()); + customTags: []); /// RCS1013 public static readonly DiagnosticDescriptor UsePredefinedType = DiagnosticDescriptorFactory.Create( @@ -171,7 +807,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.UseExplicitlyOrImplicitlyTypedArray, - customTags: Array.Empty()); + customTags: []); /// RCS1015 public static readonly DiagnosticDescriptor UseNameOfOperator = DiagnosticDescriptorFactory.Create( @@ -183,7 +819,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.UseNameOfOperator, - customTags: Array.Empty()); + customTags: []); public static readonly DiagnosticDescriptor UseNameOfOperatorFadeOut = DiagnosticDescriptorFactory.CreateFadeOut(UseNameOfOperator); @@ -197,7 +833,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.UseBlockBodyOrExpressionBody, - customTags: Array.Empty()); + customTags: []); /// RCS1018 public static readonly DiagnosticDescriptor AddOrRemoveAccessibilityModifiers = DiagnosticDescriptorFactory.Create( @@ -209,7 +845,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.AddOrRemoveAccessibilityModifiers, - customTags: Array.Empty()); + customTags: []); /// RCS1019 public static readonly DiagnosticDescriptor OrderModifiers = DiagnosticDescriptorFactory.Create( @@ -221,7 +857,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.OrderModifiers, - customTags: Array.Empty()); + customTags: []); /// RCS1020 public static readonly DiagnosticDescriptor SimplifyNullableOfT = DiagnosticDescriptorFactory.Create( @@ -245,7 +881,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.ConvertLambdaExpressionBodyToExpressionBody, - customTags: Array.Empty()); + customTags: []); public static readonly DiagnosticDescriptor ConvertLambdaExpressionBodyToExpressionBodyFadeOut = DiagnosticDescriptorFactory.CreateFadeOut(ConvertLambdaExpressionBodyToExpressionBody); @@ -273,7 +909,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.RemoveRedundantParentheses, - customTags: Array.Empty()); + customTags: []); public static readonly DiagnosticDescriptor RemoveRedundantParenthesesFadeOut = DiagnosticDescriptorFactory.CreateFadeOut(RemoveRedundantParentheses); @@ -323,7 +959,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.RemoveUnnecessaryBlankLine, - customTags: Array.Empty()); + customTags: []); /// RCS1037 public static readonly DiagnosticDescriptor RemoveTrailingWhitespace = DiagnosticDescriptorFactory.Create( @@ -335,7 +971,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.RemoveTrailingWhitespace, - customTags: Array.Empty()); + customTags: []); /// RCS1038 public static readonly DiagnosticDescriptor RemoveEmptyStatement = DiagnosticDescriptorFactory.Create( @@ -431,7 +1067,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.AsynchronousMethodNameShouldEndWithAsync, - customTags: Array.Empty()); + customTags: []); /// RCS1047 public static readonly DiagnosticDescriptor NonAsynchronousMethodNameShouldNotEndWithAsync = DiagnosticDescriptorFactory.Create( @@ -443,7 +1079,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.NonAsynchronousMethodNameShouldNotEndWithAsync, - customTags: Array.Empty()); + customTags: []); public static readonly DiagnosticDescriptor NonAsynchronousMethodNameShouldNotEndWithAsyncFadeOut = DiagnosticDescriptorFactory.CreateFadeOut(NonAsynchronousMethodNameShouldNotEndWithAsync); @@ -457,7 +1093,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.UseLambdaExpressionInsteadOfAnonymousMethod, - customTags: Array.Empty()); + customTags: []); public static readonly DiagnosticDescriptor UseLambdaExpressionInsteadOfAnonymousMethodFadeOut = DiagnosticDescriptorFactory.CreateFadeOut(UseLambdaExpressionInsteadOfAnonymousMethod); @@ -471,7 +1107,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.SimplifyBooleanComparison, - customTags: Array.Empty()); + customTags: []); public static readonly DiagnosticDescriptor SimplifyBooleanComparisonFadeOut = DiagnosticDescriptorFactory.CreateFadeOut(SimplifyBooleanComparison); @@ -497,7 +1133,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.AddOrRemoveParenthesesFromConditionInConditionalOperator, - customTags: Array.Empty()); + customTags: []); /// RCS1052 public static readonly DiagnosticDescriptor DeclareEachAttributeSeparately = DiagnosticDescriptorFactory.Create( @@ -509,7 +1145,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.DeclareEachAttributeSeparately, - customTags: Array.Empty()); + customTags: []); /// RCS1055 public static readonly DiagnosticDescriptor UnnecessarySemicolonAtEndOfDeclaration = DiagnosticDescriptorFactory.Create( @@ -533,7 +1169,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.AvoidUsageOfUsingAliasDirective, - customTags: Array.Empty()); + customTags: []); /// RCS1058 public static readonly DiagnosticDescriptor UseCompoundAssignment = DiagnosticDescriptorFactory.Create( @@ -545,7 +1181,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.UseCompoundAssignment, - customTags: Array.Empty()); + customTags: []); public static readonly DiagnosticDescriptor UseCompoundAssignmentFadeOut = DiagnosticDescriptorFactory.CreateFadeOut(UseCompoundAssignment); @@ -559,7 +1195,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.AvoidLockingOnPubliclyAccessibleInstance, - customTags: Array.Empty()); + customTags: []); /// RCS1060 public static readonly DiagnosticDescriptor DeclareEachTypeInSeparateFile = DiagnosticDescriptorFactory.Create( @@ -571,7 +1207,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.DeclareEachTypeInSeparateFile, - customTags: Array.Empty()); + customTags: []); /// RCS1061 public static readonly DiagnosticDescriptor MergeIfWithNestedIf = DiagnosticDescriptorFactory.Create( @@ -583,7 +1219,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.MergeIfWithNestedIf, - customTags: Array.Empty()); + customTags: []); public static readonly DiagnosticDescriptor MergeIfWithNestedIfFadeOut = DiagnosticDescriptorFactory.CreateFadeOut(MergeIfWithNestedIf); @@ -597,7 +1233,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.AvoidUsageOfDoStatementToCreateInfiniteLoop, - customTags: Array.Empty()); + customTags: []); /// RCS1064 public static readonly DiagnosticDescriptor AvoidUsageOfForStatementToCreateInfiniteLoop = DiagnosticDescriptorFactory.Create( @@ -609,7 +1245,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.AvoidUsageOfForStatementToCreateInfiniteLoop, - customTags: Array.Empty()); + customTags: []); /// RCS1065 public static readonly DiagnosticDescriptor AvoidUsageOfWhileStatementToCreateInfiniteLoop = DiagnosticDescriptorFactory.Create( @@ -621,7 +1257,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.AvoidUsageOfWhileStatementToCreateInfiniteLoop, - customTags: Array.Empty()); + customTags: []); /// RCS1066 public static readonly DiagnosticDescriptor RemoveEmptyFinallyClause = DiagnosticDescriptorFactory.Create( @@ -647,7 +1283,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.SimplifyLogicalNegation, - customTags: Array.Empty()); + customTags: []); /// RCS1069 public static readonly DiagnosticDescriptor RemoveUnnecessaryCaseLabel = DiagnosticDescriptorFactory.Create( @@ -707,7 +1343,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.ConvertIfToReturnStatement, - customTags: Array.Empty()); + customTags: []); public static readonly DiagnosticDescriptor ConvertIfToReturnStatementFadeOut = DiagnosticDescriptorFactory.CreateFadeOut(ConvertIfToReturnStatement); @@ -733,7 +1369,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.AvoidEmptyCatchClauseThatCatchesSystemException, - customTags: Array.Empty()); + customTags: []); /// RCS1077 public static readonly DiagnosticDescriptor OptimizeLinqMethodCall = DiagnosticDescriptorFactory.Create( @@ -745,7 +1381,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.OptimizeLinqMethodCall, - customTags: Array.Empty()); + customTags: []); /// RCS1078 public static readonly DiagnosticDescriptor UseEmptyStringLiteralOrStringEmpty = DiagnosticDescriptorFactory.Create( @@ -769,7 +1405,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.ThrowingOfNewNotImplementedException, - customTags: Array.Empty()); + customTags: []); /// RCS1080 public static readonly DiagnosticDescriptor UseCountOrLengthPropertyInsteadOfAnyMethod = DiagnosticDescriptorFactory.Create( @@ -781,7 +1417,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.UseCountOrLengthPropertyInsteadOfAnyMethod, - customTags: Array.Empty()); + customTags: []); /// RCS1081 public static readonly DiagnosticDescriptor SplitVariableDeclaration = DiagnosticDescriptorFactory.Create( @@ -793,7 +1429,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.SplitVariableDeclaration, - customTags: Array.Empty()); + customTags: []); /// RCS1084 public static readonly DiagnosticDescriptor UseCoalesceExpressionInsteadOfConditionalExpression = DiagnosticDescriptorFactory.Create( @@ -805,7 +1441,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.UseCoalesceExpressionInsteadOfConditionalExpression, - customTags: Array.Empty()); + customTags: []); /// RCS1085 public static readonly DiagnosticDescriptor UseAutoProperty = DiagnosticDescriptorFactory.Create( @@ -817,7 +1453,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.UseAutoProperty, - customTags: Array.Empty()); + customTags: []); public static readonly DiagnosticDescriptor UseAutoPropertyFadeOut = DiagnosticDescriptorFactory.CreateFadeOut(UseAutoProperty); @@ -831,7 +1467,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.UseUnaryOperatorInsteadOfAssignment, - customTags: Array.Empty()); + customTags: []); public static readonly DiagnosticDescriptor UseUnaryOperatorInsteadOfAssignmentFadeOut = DiagnosticDescriptorFactory.CreateFadeOut(UseUnaryOperatorInsteadOfAssignment); @@ -845,7 +1481,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.ConfigureAwait, - customTags: Array.Empty()); + customTags: []); /// RCS1091 public static readonly DiagnosticDescriptor RemoveEmptyRegion = DiagnosticDescriptorFactory.Create( @@ -857,7 +1493,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.RemoveEmptyRegion, - customTags: Array.Empty()); + customTags: []); public static readonly DiagnosticDescriptor RemoveEmptyRegionFadeOut = DiagnosticDescriptorFactory.CreateFadeOut(RemoveEmptyRegion); @@ -871,7 +1507,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.FileContainsNoCode, - customTags: Array.Empty()); + customTags: []); /// RCS1094 public static readonly DiagnosticDescriptor DeclareUsingDirectiveOnTopLevel = DiagnosticDescriptorFactory.Create( @@ -883,7 +1519,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.DeclareUsingDirectiveOnTopLevel, - customTags: Array.Empty()); + customTags: []); /// RCS1096 public static readonly DiagnosticDescriptor UseHasFlagMethodOrBitwiseOperator = DiagnosticDescriptorFactory.Create( @@ -895,7 +1531,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.UseHasFlagMethodOrBitwiseOperator, - customTags: Array.Empty()); + customTags: []); /// RCS1097 public static readonly DiagnosticDescriptor RemoveRedundantToStringCall = DiagnosticDescriptorFactory.Create( @@ -919,7 +1555,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.ConstantValuesShouldBePlacedOnRightSideOfComparisons, - customTags: Array.Empty()); + customTags: []); /// RCS1099 public static readonly DiagnosticDescriptor DefaultLabelShouldBeLastLabelInSwitchSection = DiagnosticDescriptorFactory.Create( @@ -931,7 +1567,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.DefaultLabelShouldBeLastLabelInSwitchSection, - customTags: Array.Empty()); + customTags: []); /// RCS1100 public static readonly DiagnosticDescriptor FormatDocumentationSummaryOnSingleLine = DiagnosticDescriptorFactory.Create( @@ -943,7 +1579,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.FormatDocumentationSummaryOnSingleLine, - customTags: Array.Empty()); + customTags: []); /// RCS1101 public static readonly DiagnosticDescriptor FormatDocumentationSummaryOnMultipleLines = DiagnosticDescriptorFactory.Create( @@ -955,7 +1591,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.FormatDocumentationSummaryOnMultipleLines, - customTags: Array.Empty()); + customTags: []); /// RCS1102 public static readonly DiagnosticDescriptor MakeClassStatic = DiagnosticDescriptorFactory.Create( @@ -967,7 +1603,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.MakeClassStatic, - customTags: Array.Empty()); + customTags: []); /// RCS1103 public static readonly DiagnosticDescriptor ConvertIfToAssignment = DiagnosticDescriptorFactory.Create( @@ -979,7 +1615,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.ConvertIfToAssignment, - customTags: Array.Empty()); + customTags: []); /// RCS1104 public static readonly DiagnosticDescriptor SimplifyConditionalExpression = DiagnosticDescriptorFactory.Create( @@ -991,7 +1627,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.SimplifyConditionalExpression, - customTags: Array.Empty()); + customTags: []); /// RCS1105 public static readonly DiagnosticDescriptor UnnecessaryInterpolation = DiagnosticDescriptorFactory.Create( @@ -1003,7 +1639,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.UnnecessaryInterpolation, - customTags: Array.Empty()); + customTags: []); /// RCS1106 public static readonly DiagnosticDescriptor RemoveEmptyDestructor = DiagnosticDescriptorFactory.Create( @@ -1039,7 +1675,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.AddStaticModifierToAllPartialClassDeclarations, - customTags: Array.Empty()); + customTags: []); /// RCS1110 public static readonly DiagnosticDescriptor DeclareTypeInsideNamespace = DiagnosticDescriptorFactory.Create( @@ -1051,7 +1687,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.DeclareTypeInsideNamespace, - customTags: Array.Empty()); + customTags: []); /// RCS1111 public static readonly DiagnosticDescriptor AddBracesToSwitchSectionWithMultipleStatements = DiagnosticDescriptorFactory.Create( @@ -1063,7 +1699,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.AddBracesToSwitchSectionWithMultipleStatements, - customTags: Array.Empty()); + customTags: []); /// RCS1112 public static readonly DiagnosticDescriptor CombineEnumerableWhereMethodChain = DiagnosticDescriptorFactory.Create( @@ -1075,7 +1711,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.CombineEnumerableWhereMethodChain, - customTags: Array.Empty()); + customTags: []); public static readonly DiagnosticDescriptor CombineEnumerableWhereMethodChainFadeOut = DiagnosticDescriptorFactory.CreateFadeOut(CombineEnumerableWhereMethodChain); @@ -1089,7 +1725,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.UseStringIsNullOrEmptyMethod, - customTags: Array.Empty()); + customTags: []); /// RCS1114 public static readonly DiagnosticDescriptor RemoveRedundantDelegateCreation = DiagnosticDescriptorFactory.Create( @@ -1101,7 +1737,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.RemoveRedundantDelegateCreation, - customTags: Array.Empty()); + customTags: []); public static readonly DiagnosticDescriptor RemoveRedundantDelegateCreationFadeOut = DiagnosticDescriptorFactory.CreateFadeOut(RemoveRedundantDelegateCreation); @@ -1115,7 +1751,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.MarkLocalVariableAsConst, - customTags: Array.Empty()); + customTags: []); /// RCS1123 public static readonly DiagnosticDescriptor AddParenthesesWhenNecessary = DiagnosticDescriptorFactory.Create( @@ -1127,7 +1763,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.AddParenthesesWhenNecessary, - customTags: Array.Empty()); + customTags: []); /// RCS1124 public static readonly DiagnosticDescriptor InlineLocalVariable = DiagnosticDescriptorFactory.Create( @@ -1139,7 +1775,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.InlineLocalVariable, - customTags: Array.Empty()); + customTags: []); public static readonly DiagnosticDescriptor InlineLocalVariableFadeOut = DiagnosticDescriptorFactory.CreateFadeOut(InlineLocalVariable); @@ -1153,7 +1789,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.AddBracesToIfElse, - customTags: Array.Empty()); + customTags: []); /// RCS1128 public static readonly DiagnosticDescriptor UseCoalesceExpression = DiagnosticDescriptorFactory.Create( @@ -1165,7 +1801,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.UseCoalesceExpression, - customTags: Array.Empty()); + customTags: []); /// RCS1129 public static readonly DiagnosticDescriptor RemoveRedundantFieldInitialization = DiagnosticDescriptorFactory.Create( @@ -1189,7 +1825,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.BitwiseOperationOnEnumWithoutFlagsAttribute, - customTags: Array.Empty()); + customTags: []); /// RCS1132 public static readonly DiagnosticDescriptor RemoveRedundantOverridingMember = DiagnosticDescriptorFactory.Create( @@ -1237,7 +1873,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.DeclareEnumMemberWithZeroValue, - customTags: Array.Empty()); + customTags: []); /// RCS1136 public static readonly DiagnosticDescriptor MergeSwitchSectionsWithEquivalentContent = DiagnosticDescriptorFactory.Create( @@ -1261,7 +1897,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.AddSummaryToDocumentationComment, - customTags: Array.Empty()); + customTags: []); /// RCS1139 public static readonly DiagnosticDescriptor AddSummaryElementToDocumentationComment = DiagnosticDescriptorFactory.Create( @@ -1273,7 +1909,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.AddSummaryElementToDocumentationComment, - customTags: Array.Empty()); + customTags: []); /// RCS1140 public static readonly DiagnosticDescriptor AddExceptionToDocumentationComment = DiagnosticDescriptorFactory.Create( @@ -1285,7 +1921,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.AddExceptionToDocumentationComment, - customTags: Array.Empty()); + customTags: []); /// RCS1141 public static readonly DiagnosticDescriptor AddParamElementToDocumentationComment = DiagnosticDescriptorFactory.Create( @@ -1297,7 +1933,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.AddParamElementToDocumentationComment, - customTags: Array.Empty()); + customTags: []); /// RCS1142 public static readonly DiagnosticDescriptor AddTypeParamElementToDocumentationComment = DiagnosticDescriptorFactory.Create( @@ -1309,7 +1945,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.AddTypeParamElementToDocumentationComment, - customTags: Array.Empty()); + customTags: []); /// RCS1143 public static readonly DiagnosticDescriptor SimplifyCoalesceExpression = DiagnosticDescriptorFactory.Create( @@ -1345,7 +1981,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.UseConditionalAccess, - customTags: Array.Empty()); + customTags: []); /// RCS1151 public static readonly DiagnosticDescriptor RemoveRedundantCast = DiagnosticDescriptorFactory.Create( @@ -1369,7 +2005,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.SortEnumMembers, - customTags: Array.Empty()); + customTags: []); /// RCS1155 public static readonly DiagnosticDescriptor UseStringComparison = DiagnosticDescriptorFactory.Create( @@ -1381,7 +2017,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.UseStringComparison, - customTags: Array.Empty()); + customTags: []); /// RCS1156 public static readonly DiagnosticDescriptor UseStringLengthInsteadOfComparisonWithEmptyString = DiagnosticDescriptorFactory.Create( @@ -1393,7 +2029,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.UseStringLengthInsteadOfComparisonWithEmptyString, - customTags: Array.Empty()); + customTags: []); /// RCS1157 public static readonly DiagnosticDescriptor CompositeEnumValueContainsUndefinedFlag = DiagnosticDescriptorFactory.Create( @@ -1405,7 +2041,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.CompositeEnumValueContainsUndefinedFlag, - customTags: Array.Empty()); + customTags: []); /// RCS1158 public static readonly DiagnosticDescriptor StaticMemberInGenericTypeShouldUseTypeParameter = DiagnosticDescriptorFactory.Create( @@ -1417,7 +2053,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.StaticMemberInGenericTypeShouldUseTypeParameter, - customTags: Array.Empty()); + customTags: []); /// RCS1159 public static readonly DiagnosticDescriptor UseGenericEventHandler = DiagnosticDescriptorFactory.Create( @@ -1429,7 +2065,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.UseGenericEventHandler, - customTags: Array.Empty()); + customTags: []); /// RCS1160 public static readonly DiagnosticDescriptor AbstractTypeShouldNotHavePublicConstructors = DiagnosticDescriptorFactory.Create( @@ -1441,7 +2077,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.AbstractTypeShouldNotHavePublicConstructors, - customTags: Array.Empty()); + customTags: []); /// RCS1161 public static readonly DiagnosticDescriptor EnumShouldDeclareExplicitValues = DiagnosticDescriptorFactory.Create( @@ -1453,7 +2089,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.EnumShouldDeclareExplicitValues, - customTags: Array.Empty()); + customTags: []); /// RCS1162 public static readonly DiagnosticDescriptor AvoidChainOfAssignments = DiagnosticDescriptorFactory.Create( @@ -1465,7 +2101,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.AvoidChainOfAssignments, - customTags: Array.Empty()); + customTags: []); /// RCS1163 public static readonly DiagnosticDescriptor UnusedParameter = DiagnosticDescriptorFactory.Create( @@ -1501,7 +2137,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.UnconstrainedTypeParameterCheckedForNull, - customTags: Array.Empty()); + customTags: []); /// RCS1166 public static readonly DiagnosticDescriptor ValueTypeObjectIsNeverEqualToNull = DiagnosticDescriptorFactory.Create( @@ -1513,7 +2149,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.ValueTypeObjectIsNeverEqualToNull, - customTags: Array.Empty()); + customTags: []); /// RCS1168 public static readonly DiagnosticDescriptor ParameterNameDiffersFromBase = DiagnosticDescriptorFactory.Create( @@ -1525,7 +2161,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.ParameterNameDiffersFromBase, - customTags: Array.Empty()); + customTags: []); /// RCS1169 public static readonly DiagnosticDescriptor MakeFieldReadOnly = DiagnosticDescriptorFactory.Create( @@ -1537,7 +2173,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.MakeFieldReadOnly, - customTags: Array.Empty()); + customTags: []); /// RCS1170 public static readonly DiagnosticDescriptor UseReadOnlyAutoProperty = DiagnosticDescriptorFactory.Create( @@ -1561,7 +2197,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.SimplifyLazyInitialization, - customTags: Array.Empty()); + customTags: []); /// RCS1172 public static readonly DiagnosticDescriptor UseIsOperatorInsteadOfAsOperator = DiagnosticDescriptorFactory.Create( @@ -1573,7 +2209,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.UseIsOperatorInsteadOfAsOperator, - customTags: Array.Empty()); + customTags: []); /// RCS1173 public static readonly DiagnosticDescriptor UseCoalesceExpressionInsteadOfIf = DiagnosticDescriptorFactory.Create( @@ -1585,7 +2221,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.UseCoalesceExpressionInsteadOfIf, - customTags: Array.Empty()); + customTags: []); /// RCS1174 public static readonly DiagnosticDescriptor RemoveRedundantAsyncAwait = DiagnosticDescriptorFactory.Create( @@ -1597,7 +2233,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.RemoveRedundantAsyncAwait, - customTags: Array.Empty()); + customTags: []); public static readonly DiagnosticDescriptor RemoveRedundantAsyncAwaitFadeOut = DiagnosticDescriptorFactory.CreateFadeOut(RemoveRedundantAsyncAwait); @@ -1623,7 +2259,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.UseVarInsteadOfExplicitTypeWhenTypeIsNotObvious, - customTags: Array.Empty()); + customTags: []); /// RCS1177 public static readonly DiagnosticDescriptor UseVarInsteadOfExplicitTypeInForEach = DiagnosticDescriptorFactory.Create( @@ -1635,7 +2271,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.UseVarInsteadOfExplicitTypeInForEach, - customTags: Array.Empty()); + customTags: []); /// RCS1179 public static readonly DiagnosticDescriptor UnnecessaryAssignment = DiagnosticDescriptorFactory.Create( @@ -1647,7 +2283,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.UnnecessaryAssignment, - customTags: Array.Empty()); + customTags: []); /// RCS1180 public static readonly DiagnosticDescriptor InlineLazyInitialization = DiagnosticDescriptorFactory.Create( @@ -1659,7 +2295,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.InlineLazyInitialization, - customTags: Array.Empty()); + customTags: []); /// RCS1181 public static readonly DiagnosticDescriptor ConvertCommentToDocumentationComment = DiagnosticDescriptorFactory.Create( @@ -1671,7 +2307,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.ConvertCommentToDocumentationComment, - customTags: Array.Empty()); + customTags: []); /// RCS1182 public static readonly DiagnosticDescriptor RemoveRedundantBaseInterface = DiagnosticDescriptorFactory.Create( @@ -1695,7 +2331,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.UseRegexInstanceInsteadOfStaticMethod, - customTags: Array.Empty()); + customTags: []); /// RCS1187 public static readonly DiagnosticDescriptor UseConstantInsteadOfField = DiagnosticDescriptorFactory.Create( @@ -1707,7 +2343,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.UseConstantInsteadOfField, - customTags: Array.Empty()); + customTags: []); /// RCS1188 public static readonly DiagnosticDescriptor RemoveRedundantAutoPropertyInitialization = DiagnosticDescriptorFactory.Create( @@ -1731,7 +2367,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.AddOrRemoveRegionName, - customTags: Array.Empty()); + customTags: []); /// RCS1190 public static readonly DiagnosticDescriptor JoinStringExpressions = DiagnosticDescriptorFactory.Create( @@ -1743,7 +2379,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.JoinStringExpressions, - customTags: Array.Empty()); + customTags: []); /// RCS1191 public static readonly DiagnosticDescriptor DeclareEnumValueAsCombinationOfNames = DiagnosticDescriptorFactory.Create( @@ -1755,7 +2391,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.DeclareEnumValueAsCombinationOfNames, - customTags: Array.Empty()); + customTags: []); /// RCS1192 public static readonly DiagnosticDescriptor UnnecessaryUsageOfVerbatimStringLiteral = DiagnosticDescriptorFactory.Create( @@ -1779,7 +2415,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.OverridingMemberShouldNotChangeParamsModifier, - customTags: Array.Empty()); + customTags: []); /// RCS1194 public static readonly DiagnosticDescriptor ImplementExceptionConstructors = DiagnosticDescriptorFactory.Create( @@ -1791,7 +2427,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.ImplementExceptionConstructors, - customTags: Array.Empty()); + customTags: []); /// RCS1195 public static readonly DiagnosticDescriptor UseExclusiveOrOperator = DiagnosticDescriptorFactory.Create( @@ -1803,7 +2439,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.UseExclusiveOrOperator, - customTags: Array.Empty()); + customTags: []); /// RCS1196 public static readonly DiagnosticDescriptor CallExtensionMethodAsInstanceMethod = DiagnosticDescriptorFactory.Create( @@ -1815,7 +2451,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.CallExtensionMethodAsInstanceMethod, - customTags: Array.Empty()); + customTags: []); /// RCS1197 public static readonly DiagnosticDescriptor OptimizeStringBuilderAppendCall = DiagnosticDescriptorFactory.Create( @@ -1827,7 +2463,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.OptimizeStringBuilderAppendCall, - customTags: Array.Empty()); + customTags: []); /// RCS1198 public static readonly DiagnosticDescriptor AvoidBoxingOfValueType = DiagnosticDescriptorFactory.Create( @@ -1839,7 +2475,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.AvoidBoxingOfValueType, - customTags: Array.Empty()); + customTags: []); /// RCS1199 public static readonly DiagnosticDescriptor UnnecessaryNullCheck = DiagnosticDescriptorFactory.Create( @@ -1851,7 +2487,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.UnnecessaryNullCheck, - customTags: Array.Empty()); + customTags: []); /// RCS1200 public static readonly DiagnosticDescriptor CallThenByInsteadOfOrderBy = DiagnosticDescriptorFactory.Create( @@ -1863,7 +2499,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.CallThenByInsteadOfOrderBy, - customTags: Array.Empty()); + customTags: []); /// RCS1201 public static readonly DiagnosticDescriptor UseMethodChaining = DiagnosticDescriptorFactory.Create( @@ -1875,7 +2511,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.UseMethodChaining, - customTags: Array.Empty()); + customTags: []); /// RCS1202 public static readonly DiagnosticDescriptor AvoidNullReferenceException = DiagnosticDescriptorFactory.Create( @@ -1887,7 +2523,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.AvoidNullReferenceException, - customTags: Array.Empty()); + customTags: []); /// RCS1203 public static readonly DiagnosticDescriptor UseAttributeUsageAttribute = DiagnosticDescriptorFactory.Create( @@ -1899,7 +2535,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.UseAttributeUsageAttribute, - customTags: Array.Empty()); + customTags: []); /// RCS1204 public static readonly DiagnosticDescriptor UseEventArgsEmpty = DiagnosticDescriptorFactory.Create( @@ -1911,7 +2547,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.UseEventArgsEmpty, - customTags: Array.Empty()); + customTags: []); /// RCS1205 public static readonly DiagnosticDescriptor OrderNamedArguments = DiagnosticDescriptorFactory.Create( @@ -1923,7 +2559,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.OrderNamedArguments, - customTags: Array.Empty()); + customTags: []); /// RCS1206 public static readonly DiagnosticDescriptor UseConditionalAccessInsteadOfConditionalExpression = DiagnosticDescriptorFactory.Create( @@ -1935,7 +2571,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.UseConditionalAccessInsteadOfConditionalExpression, - customTags: Array.Empty()); + customTags: []); /// RCS1207 public static readonly DiagnosticDescriptor UseAnonymousFunctionOrMethodGroup = DiagnosticDescriptorFactory.Create( @@ -1947,7 +2583,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.UseAnonymousFunctionOrMethodGroup, - customTags: Array.Empty()); + customTags: []); /// RCS1208 public static readonly DiagnosticDescriptor ReduceIfNesting = DiagnosticDescriptorFactory.Create( @@ -1959,7 +2595,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.ReduceIfNesting, - customTags: Array.Empty()); + customTags: []); /// RCS1209 public static readonly DiagnosticDescriptor OrderTypeParameterConstraints = DiagnosticDescriptorFactory.Create( @@ -1971,7 +2607,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.OrderTypeParameterConstraints, - customTags: Array.Empty()); + customTags: []); /// RCS1210 public static readonly DiagnosticDescriptor ReturnCompletedTaskInsteadOfNull = DiagnosticDescriptorFactory.Create( @@ -1983,7 +2619,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.ReturnCompletedTaskInsteadOfNull, - customTags: Array.Empty()); + customTags: []); /// RCS1211 public static readonly DiagnosticDescriptor RemoveUnnecessaryElse = DiagnosticDescriptorFactory.Create( @@ -1995,7 +2631,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.RemoveUnnecessaryElse, - customTags: Array.Empty()); + customTags: []); /// RCS1212 public static readonly DiagnosticDescriptor RemoveRedundantAssignment = DiagnosticDescriptorFactory.Create( @@ -2007,7 +2643,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.RemoveRedundantAssignment, - customTags: Array.Empty()); + customTags: []); public static readonly DiagnosticDescriptor RemoveRedundantAssignmentFadeOut = DiagnosticDescriptorFactory.CreateFadeOut(RemoveRedundantAssignment); @@ -2033,7 +2669,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.UnnecessaryInterpolatedString, - customTags: Array.Empty()); + customTags: []); public static readonly DiagnosticDescriptor UnnecessaryInterpolatedStringFadeOut = DiagnosticDescriptorFactory.CreateFadeOut(UnnecessaryInterpolatedString); @@ -2047,7 +2683,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.ExpressionIsAlwaysEqualToTrueOrFalse, - customTags: Array.Empty()); + customTags: []); /// RCS1216 public static readonly DiagnosticDescriptor UnnecessaryUnsafeContext = DiagnosticDescriptorFactory.Create( @@ -2071,7 +2707,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.ConvertInterpolatedStringToConcatenation, - customTags: Array.Empty()); + customTags: []); public static readonly DiagnosticDescriptor ConvertInterpolatedStringToConcatenationFadeOut = DiagnosticDescriptorFactory.CreateFadeOut(ConvertInterpolatedStringToConcatenation); @@ -2085,7 +2721,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.SimplifyCodeBranching, - customTags: Array.Empty()); + customTags: []); /// RCS1220 public static readonly DiagnosticDescriptor UsePatternMatchingInsteadOfIsAndCast = DiagnosticDescriptorFactory.Create( @@ -2097,7 +2733,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.UsePatternMatchingInsteadOfIsAndCast, - customTags: Array.Empty()); + customTags: []); /// RCS1221 public static readonly DiagnosticDescriptor UsePatternMatchingInsteadOfAsAndNullCheck = DiagnosticDescriptorFactory.Create( @@ -2109,7 +2745,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.UsePatternMatchingInsteadOfAsAndNullCheck, - customTags: Array.Empty()); + customTags: []); /// RCS1222 public static readonly DiagnosticDescriptor MergePreprocessorDirectives = DiagnosticDescriptorFactory.Create( @@ -2121,7 +2757,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.MergePreprocessorDirectives, - customTags: Array.Empty()); + customTags: []); /// RCS1223 public static readonly DiagnosticDescriptor MarkTypeWithDebuggerDisplayAttribute = DiagnosticDescriptorFactory.Create( @@ -2133,7 +2769,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.MarkTypeWithDebuggerDisplayAttribute, - customTags: Array.Empty()); + customTags: []); /// RCS1224 public static readonly DiagnosticDescriptor MakeMethodExtensionMethod = DiagnosticDescriptorFactory.Create( @@ -2145,7 +2781,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.MakeMethodExtensionMethod, - customTags: Array.Empty()); + customTags: []); /// RCS1225 public static readonly DiagnosticDescriptor MakeClassSealed = DiagnosticDescriptorFactory.Create( @@ -2157,7 +2793,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.MakeClassSealed, - customTags: Array.Empty()); + customTags: []); /// RCS1226 public static readonly DiagnosticDescriptor AddParagraphToDocumentationComment = DiagnosticDescriptorFactory.Create( @@ -2169,7 +2805,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.AddParagraphToDocumentationComment, - customTags: Array.Empty()); + customTags: []); /// RCS1227 public static readonly DiagnosticDescriptor ValidateArgumentsCorrectly = DiagnosticDescriptorFactory.Create( @@ -2181,7 +2817,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.ValidateArgumentsCorrectly, - customTags: Array.Empty()); + customTags: []); /// RCS1228 public static readonly DiagnosticDescriptor UnusedElementInDocumentationComment = DiagnosticDescriptorFactory.Create( @@ -2205,7 +2841,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.UseAsyncAwait, - customTags: Array.Empty()); + customTags: []); /// RCS1230 public static readonly DiagnosticDescriptor UnnecessaryExplicitUseOfEnumerator = DiagnosticDescriptorFactory.Create( @@ -2217,7 +2853,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.UnnecessaryExplicitUseOfEnumerator, - customTags: Array.Empty()); + customTags: []); /// RCS1231 public static readonly DiagnosticDescriptor MakeParameterRefReadOnly = DiagnosticDescriptorFactory.Create( @@ -2229,7 +2865,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.MakeParameterRefReadOnly, - customTags: Array.Empty()); + customTags: []); /// RCS1232 public static readonly DiagnosticDescriptor OrderElementsInDocumentationComment = DiagnosticDescriptorFactory.Create( @@ -2241,7 +2877,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.OrderElementsInDocumentationComment, - customTags: Array.Empty()); + customTags: []); /// RCS1233 public static readonly DiagnosticDescriptor UseShortCircuitingOperator = DiagnosticDescriptorFactory.Create( @@ -2253,7 +2889,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.UseShortCircuitingOperator, - customTags: Array.Empty()); + customTags: []); /// RCS1234 public static readonly DiagnosticDescriptor DuplicateEnumValue = DiagnosticDescriptorFactory.Create( @@ -2265,7 +2901,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.DuplicateEnumValue, - customTags: Array.Empty()); + customTags: []); /// RCS1235 public static readonly DiagnosticDescriptor OptimizeMethodCall = DiagnosticDescriptorFactory.Create( @@ -2277,7 +2913,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.OptimizeMethodCall, - customTags: Array.Empty()); + customTags: []); /// RCS1236 public static readonly DiagnosticDescriptor UseExceptionFilter = DiagnosticDescriptorFactory.Create( @@ -2289,7 +2925,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.UseExceptionFilter, - customTags: Array.Empty()); + customTags: []); /// RCS1237 public static readonly DiagnosticDescriptor UseBitShiftOperator = DiagnosticDescriptorFactory.Create( @@ -2301,7 +2937,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.UseBitShiftOperator, - customTags: Array.Empty()); + customTags: []); /// RCS1238 public static readonly DiagnosticDescriptor AvoidNestedConditionalOperators = DiagnosticDescriptorFactory.Create( @@ -2313,7 +2949,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.AvoidNestedConditionalOperators, - customTags: Array.Empty()); + customTags: []); /// RCS1239 public static readonly DiagnosticDescriptor UseForStatementInsteadOfWhileStatement = DiagnosticDescriptorFactory.Create( @@ -2325,7 +2961,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.UseForStatementInsteadOfWhileStatement, - customTags: Array.Empty()); + customTags: []); /// RCS1240 public static readonly DiagnosticDescriptor UnnecessaryOperator = DiagnosticDescriptorFactory.Create( @@ -2337,7 +2973,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.UnnecessaryOperator, - customTags: Array.Empty()); + customTags: []); /// RCS1241 public static readonly DiagnosticDescriptor ImplementNonGenericCounterpart = DiagnosticDescriptorFactory.Create( @@ -2349,7 +2985,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.ImplementNonGenericCounterpart, - customTags: Array.Empty()); + customTags: []); /// RCS1242 public static readonly DiagnosticDescriptor DoNotPassNonReadOnlyStructByReadOnlyReference = DiagnosticDescriptorFactory.Create( @@ -2361,7 +2997,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.DoNotPassNonReadOnlyStructByReadOnlyReference, - customTags: Array.Empty()); + customTags: []); /// RCS1243 public static readonly DiagnosticDescriptor DuplicateWordInComment = DiagnosticDescriptorFactory.Create( @@ -2397,7 +3033,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.UseElementAccess, - customTags: Array.Empty()); + customTags: []); /// RCS1247 public static readonly DiagnosticDescriptor FixDocumentationCommentTag = DiagnosticDescriptorFactory.Create( @@ -2409,7 +3045,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.FixDocumentationCommentTag, - customTags: Array.Empty()); + customTags: []); /// RCS1248 public static readonly DiagnosticDescriptor NormalizeNullCheck = DiagnosticDescriptorFactory.Create( @@ -2421,7 +3057,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.NormalizeNullCheck, - customTags: Array.Empty()); + customTags: []); /// RCS1249 public static readonly DiagnosticDescriptor UnnecessaryNullForgivingOperator = DiagnosticDescriptorFactory.Create( @@ -2445,7 +3081,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.UseImplicitOrExplicitObjectCreation, - customTags: Array.Empty()); + customTags: []); /// RCS1251 public static readonly DiagnosticDescriptor RemoveUnnecessaryBraces = DiagnosticDescriptorFactory.Create( @@ -2469,7 +3105,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.NormalizeUsageOfInfiniteLoop, - customTags: Array.Empty()); + customTags: []); /// RCS1253 public static readonly DiagnosticDescriptor FormatDocumentationCommentSummary = DiagnosticDescriptorFactory.Create( @@ -2481,7 +3117,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.FormatDocumentationCommentSummary, - customTags: Array.Empty()); + customTags: []); /// RCS1254 public static readonly DiagnosticDescriptor NormalizeFormatOfEnumFlagValue = DiagnosticDescriptorFactory.Create( @@ -2493,7 +3129,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.NormalizeFormatOfEnumFlagValue, - customTags: Array.Empty()); + customTags: []); /// RCS1255 public static readonly DiagnosticDescriptor SimplifyArgumentNullCheck = DiagnosticDescriptorFactory.Create( @@ -2505,7 +3141,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.SimplifyArgumentNullCheck, - customTags: Array.Empty()); + customTags: []); /// RCS1256 public static readonly DiagnosticDescriptor InvalidArgumentNullCheck = DiagnosticDescriptorFactory.Create( @@ -2517,7 +3153,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.InvalidArgumentNullCheck, - customTags: Array.Empty()); + customTags: []); /// RCS1257 public static readonly DiagnosticDescriptor UseEnumFieldExplicitly = DiagnosticDescriptorFactory.Create( @@ -2529,7 +3165,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.UseEnumFieldExplicitly, - customTags: Array.Empty()); + customTags: []); /// RCS1258 public static readonly DiagnosticDescriptor UnnecessaryEnumFlag = DiagnosticDescriptorFactory.Create( @@ -2565,7 +3201,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.AddOrRemoveTrailingComma, - customTags: Array.Empty()); + customTags: []); /// RCS1261 public static readonly DiagnosticDescriptor DisposeResourceAsynchronously = DiagnosticDescriptorFactory.Create( @@ -2577,7 +3213,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.DisposeResourceAsynchronously, - customTags: Array.Empty()); + customTags: []); /// RCS1262 public static readonly DiagnosticDescriptor UnnecessaryRawStringLiteral = DiagnosticDescriptorFactory.Create( @@ -2601,7 +3237,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.InvalidReferenceInDocumentationComment, - customTags: Array.Empty()); + customTags: []); /// RCS1264 public static readonly DiagnosticDescriptor UseVarOrExplicitType = DiagnosticDescriptorFactory.Create( @@ -2613,7 +3249,7 @@ public static partial class DiagnosticRules isEnabledByDefault: false, description: null, helpLinkUri: DiagnosticIdentifiers.UseVarOrExplicitType, - customTags: Array.Empty()); + customTags: []); /// RCS1265 public static readonly DiagnosticDescriptor RemoveRedundantCatchBlock = DiagnosticDescriptorFactory.Create( @@ -2625,7 +3261,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.RemoveRedundantCatchBlock, - customTags: Array.Empty()); + customTags: []); /// RCS1266 public static readonly DiagnosticDescriptor UseRawStringLiteral = DiagnosticDescriptorFactory.Create( @@ -2637,7 +3273,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.UseRawStringLiteral, - customTags: Array.Empty()); + customTags: []); /// RCS1267 public static readonly DiagnosticDescriptor UseStringInterpolationInsteadOfStringConcat = DiagnosticDescriptorFactory.Create( @@ -2649,7 +3285,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.UseStringInterpolationInsteadOfStringConcat, - customTags: Array.Empty()); + customTags: []); /// RCS1268 public static readonly DiagnosticDescriptor SimplifyNumericComparison = DiagnosticDescriptorFactory.Create( @@ -2661,7 +3297,7 @@ public static partial class DiagnosticRules isEnabledByDefault: true, description: null, helpLinkUri: DiagnosticIdentifiers.SimplifyNumericComparison, - customTags: Array.Empty()); + customTags: []); } } \ No newline at end of file diff --git a/src/Core/DiagnosticIdPrefix.cs b/src/Core/DiagnosticIdPrefix.cs index dd1b1c9411..ae5b9c5fe2 100644 --- a/src/Core/DiagnosticIdPrefix.cs +++ b/src/Core/DiagnosticIdPrefix.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Diagnostics; using System.Linq; -using Microsoft.CodeAnalysis; using static Roslynator.WellKnownDiagnosticIdPrefixes; namespace Roslynator; diff --git a/src/Documentation/Extensions/SymbolExtensions.cs b/src/Documentation/Extensions/SymbolExtensions.cs index 1b1da86f47..7267418d01 100644 --- a/src/Documentation/Extensions/SymbolExtensions.cs +++ b/src/Documentation/Extensions/SymbolExtensions.cs @@ -6,7 +6,6 @@ using System.Diagnostics; using System.Linq; using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.CSharp; namespace Roslynator.Documentation; diff --git a/src/Documentation/SymbolDefinitionWriter.cs b/src/Documentation/SymbolDefinitionWriter.cs index 23f4983783..6f03fcc30c 100644 --- a/src/Documentation/SymbolDefinitionWriter.cs +++ b/src/Documentation/SymbolDefinitionWriter.cs @@ -8,7 +8,6 @@ using System.Threading; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; -using Roslynator.CSharp; using Roslynator.FindSymbols; namespace Roslynator.Documentation; diff --git a/src/Documentation/UrlProviders/DefaultUrlSegmentProvider.cs b/src/Documentation/UrlProviders/DefaultUrlSegmentProvider.cs index 786019ac73..2e62eecc3a 100644 --- a/src/Documentation/UrlProviders/DefaultUrlSegmentProvider.cs +++ b/src/Documentation/UrlProviders/DefaultUrlSegmentProvider.cs @@ -8,7 +8,6 @@ using System.Linq; using System.Text; using Microsoft.CodeAnalysis; -using Roslynator.CSharp; namespace Roslynator.Documentation; diff --git a/src/Formatting.Analyzers.CodeFixes/CSharp/AccessorDeclarationCodeFixProvider.cs b/src/Formatting.Analyzers.CodeFixes/CSharp/AccessorDeclarationCodeFixProvider.cs index 79b84551ad..38fdf4a96a 100644 --- a/src/Formatting.Analyzers.CodeFixes/CSharp/AccessorDeclarationCodeFixProvider.cs +++ b/src/Formatting.Analyzers.CodeFixes/CSharp/AccessorDeclarationCodeFixProvider.cs @@ -9,7 +9,6 @@ using Microsoft.CodeAnalysis.CodeFixes; using Microsoft.CodeAnalysis.CSharp.Syntax; using Roslynator.CSharp; -using Roslynator.Formatting.CSharp; namespace Roslynator.Formatting.CodeFixes.CSharp; diff --git a/src/Formatting.Analyzers.CodeFixes/CSharp/AccessorListCodeFixProvider.cs b/src/Formatting.Analyzers.CodeFixes/CSharp/AccessorListCodeFixProvider.cs index 97b90ee887..b99fb9afef 100644 --- a/src/Formatting.Analyzers.CodeFixes/CSharp/AccessorListCodeFixProvider.cs +++ b/src/Formatting.Analyzers.CodeFixes/CSharp/AccessorListCodeFixProvider.cs @@ -10,7 +10,6 @@ using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Text; using Roslynator.CSharp; -using Roslynator.Formatting.CSharp; namespace Roslynator.Formatting.CodeFixes.CSharp; diff --git a/src/Formatting.Analyzers.CodeFixes/CSharp/AddBlankLineBeforeAndAfterUsingDirectiveListCodeFixProvider.cs b/src/Formatting.Analyzers.CodeFixes/CSharp/AddBlankLineBeforeAndAfterUsingDirectiveListCodeFixProvider.cs index ee33cda6f7..9deb26ba80 100644 --- a/src/Formatting.Analyzers.CodeFixes/CSharp/AddBlankLineBeforeAndAfterUsingDirectiveListCodeFixProvider.cs +++ b/src/Formatting.Analyzers.CodeFixes/CSharp/AddBlankLineBeforeAndAfterUsingDirectiveListCodeFixProvider.cs @@ -6,7 +6,6 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CodeFixes; using Roslynator.CSharp; -using Roslynator.Formatting.CSharp; namespace Roslynator.Formatting.CodeFixes.CSharp; diff --git a/src/Formatting.Analyzers.CodeFixes/CSharp/BinaryExpressionCodeFixProvider.cs b/src/Formatting.Analyzers.CodeFixes/CSharp/BinaryExpressionCodeFixProvider.cs index a765640aa9..91f21eea71 100644 --- a/src/Formatting.Analyzers.CodeFixes/CSharp/BinaryExpressionCodeFixProvider.cs +++ b/src/Formatting.Analyzers.CodeFixes/CSharp/BinaryExpressionCodeFixProvider.cs @@ -7,7 +7,6 @@ using Microsoft.CodeAnalysis.CodeFixes; using Microsoft.CodeAnalysis.CSharp.Syntax; using Roslynator.CSharp; -using Roslynator.Formatting.CSharp; namespace Roslynator.Formatting.CodeFixes.CSharp; diff --git a/src/Formatting.Analyzers.CodeFixes/CSharp/BlankLineBetweenDeclarationsCodeFixProvider.cs b/src/Formatting.Analyzers.CodeFixes/CSharp/BlankLineBetweenDeclarationsCodeFixProvider.cs index c2b8df6f8a..92f204e1a7 100644 --- a/src/Formatting.Analyzers.CodeFixes/CSharp/BlankLineBetweenDeclarationsCodeFixProvider.cs +++ b/src/Formatting.Analyzers.CodeFixes/CSharp/BlankLineBetweenDeclarationsCodeFixProvider.cs @@ -6,7 +6,6 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CodeFixes; using Roslynator.CSharp; -using Roslynator.Formatting.CSharp; namespace Roslynator.Formatting.CodeFixes.CSharp; diff --git a/src/Formatting.Analyzers.CodeFixes/CSharp/BlockCodeFixProvider.cs b/src/Formatting.Analyzers.CodeFixes/CSharp/BlockCodeFixProvider.cs index 092359eb43..a62d6cdb35 100644 --- a/src/Formatting.Analyzers.CodeFixes/CSharp/BlockCodeFixProvider.cs +++ b/src/Formatting.Analyzers.CodeFixes/CSharp/BlockCodeFixProvider.cs @@ -9,7 +9,6 @@ using Microsoft.CodeAnalysis.CodeFixes; using Microsoft.CodeAnalysis.CSharp.Syntax; using Roslynator.CSharp; -using Roslynator.Formatting.CSharp; namespace Roslynator.Formatting.CodeFixes.CSharp; diff --git a/src/Formatting.Analyzers.CodeFixes/CSharp/CompilationUnitCodeFixProvider.cs b/src/Formatting.Analyzers.CodeFixes/CSharp/CompilationUnitCodeFixProvider.cs index 9da7f29429..7da2bbc801 100644 --- a/src/Formatting.Analyzers.CodeFixes/CSharp/CompilationUnitCodeFixProvider.cs +++ b/src/Formatting.Analyzers.CodeFixes/CSharp/CompilationUnitCodeFixProvider.cs @@ -9,7 +9,6 @@ using Microsoft.CodeAnalysis.CodeFixes; using Microsoft.CodeAnalysis.CSharp.Syntax; using Roslynator.CSharp; -using Roslynator.Formatting.CSharp; namespace Roslynator.Formatting.CodeFixes.CSharp; diff --git a/src/Formatting.Analyzers.CodeFixes/CSharp/ConditionalAccessExpressionCodeFixProvider.cs b/src/Formatting.Analyzers.CodeFixes/CSharp/ConditionalAccessExpressionCodeFixProvider.cs index 7d3ca21142..2479789b02 100644 --- a/src/Formatting.Analyzers.CodeFixes/CSharp/ConditionalAccessExpressionCodeFixProvider.cs +++ b/src/Formatting.Analyzers.CodeFixes/CSharp/ConditionalAccessExpressionCodeFixProvider.cs @@ -1,16 +1,12 @@ // Copyright (c) .NET Foundation and Contributors. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using System; using System.Collections.Immutable; using System.Composition; using System.Threading.Tasks; using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.CodeActions; using Microsoft.CodeAnalysis.CodeFixes; using Microsoft.CodeAnalysis.CSharp.Syntax; using Roslynator.CSharp; -using Roslynator.CSharp.CodeStyle; -using Roslynator.Formatting.CSharp; namespace Roslynator.Formatting.CodeFixes.CSharp; diff --git a/src/Formatting.Analyzers.CodeFixes/CSharp/DirectiveTriviaCodeFixProvider.cs b/src/Formatting.Analyzers.CodeFixes/CSharp/DirectiveTriviaCodeFixProvider.cs index e8f51b3155..4f536850b2 100644 --- a/src/Formatting.Analyzers.CodeFixes/CSharp/DirectiveTriviaCodeFixProvider.cs +++ b/src/Formatting.Analyzers.CodeFixes/CSharp/DirectiveTriviaCodeFixProvider.cs @@ -10,7 +10,6 @@ using Microsoft.CodeAnalysis.CodeFixes; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Roslynator.Formatting.CSharp; namespace Roslynator.Formatting.CodeFixes.CSharp; diff --git a/src/Formatting.Analyzers.CodeFixes/CSharp/EnumDeclarationCodeFixProvider.cs b/src/Formatting.Analyzers.CodeFixes/CSharp/EnumDeclarationCodeFixProvider.cs index 4c623387c9..736bdd6b42 100644 --- a/src/Formatting.Analyzers.CodeFixes/CSharp/EnumDeclarationCodeFixProvider.cs +++ b/src/Formatting.Analyzers.CodeFixes/CSharp/EnumDeclarationCodeFixProvider.cs @@ -6,7 +6,6 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CodeFixes; using Roslynator.CSharp; -using Roslynator.Formatting.CSharp; namespace Roslynator.Formatting.CodeFixes.CSharp; diff --git a/src/Formatting.Analyzers.CodeFixes/CSharp/FileScopedNamespaceDeclarationCodeFixProvider.cs b/src/Formatting.Analyzers.CodeFixes/CSharp/FileScopedNamespaceDeclarationCodeFixProvider.cs index b157774366..20dcc20fb7 100644 --- a/src/Formatting.Analyzers.CodeFixes/CSharp/FileScopedNamespaceDeclarationCodeFixProvider.cs +++ b/src/Formatting.Analyzers.CodeFixes/CSharp/FileScopedNamespaceDeclarationCodeFixProvider.cs @@ -6,7 +6,6 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CodeFixes; using Roslynator.CSharp; -using Roslynator.Formatting.CSharp; namespace Roslynator.Formatting.CodeFixes.CSharp; diff --git a/src/Formatting.Analyzers.CodeFixes/CSharp/FixFormattingOfBinaryExpressionChainCodeFixProvider.cs b/src/Formatting.Analyzers.CodeFixes/CSharp/FixFormattingOfBinaryExpressionChainCodeFixProvider.cs index bc57de4c1b..97bccabd40 100644 --- a/src/Formatting.Analyzers.CodeFixes/CSharp/FixFormattingOfBinaryExpressionChainCodeFixProvider.cs +++ b/src/Formatting.Analyzers.CodeFixes/CSharp/FixFormattingOfBinaryExpressionChainCodeFixProvider.cs @@ -7,7 +7,6 @@ using Microsoft.CodeAnalysis.CodeActions; using Microsoft.CodeAnalysis.CodeFixes; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Roslynator.Formatting.CSharp; namespace Roslynator.Formatting.CodeFixes.CSharp; diff --git a/src/Formatting.Analyzers.CodeFixes/CSharp/FixFormattingOfCallChainCodeFixProvider.cs b/src/Formatting.Analyzers.CodeFixes/CSharp/FixFormattingOfCallChainCodeFixProvider.cs index fe27e84bd0..60f3655bbe 100644 --- a/src/Formatting.Analyzers.CodeFixes/CSharp/FixFormattingOfCallChainCodeFixProvider.cs +++ b/src/Formatting.Analyzers.CodeFixes/CSharp/FixFormattingOfCallChainCodeFixProvider.cs @@ -10,7 +10,6 @@ using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Text; using Roslynator.CSharp; -using Roslynator.Formatting.CSharp; namespace Roslynator.Formatting.CodeFixes.CSharp; diff --git a/src/Formatting.Analyzers.CodeFixes/CSharp/FixFormattingOfListCodeFixProvider.cs b/src/Formatting.Analyzers.CodeFixes/CSharp/FixFormattingOfListCodeFixProvider.cs index d43f36a793..eb77f4d995 100644 --- a/src/Formatting.Analyzers.CodeFixes/CSharp/FixFormattingOfListCodeFixProvider.cs +++ b/src/Formatting.Analyzers.CodeFixes/CSharp/FixFormattingOfListCodeFixProvider.cs @@ -9,7 +9,6 @@ using Microsoft.CodeAnalysis.CodeFixes; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Roslynator.Formatting.CSharp; using static Roslynator.Formatting.CodeFixes.CSharp.CodeFixHelpers; namespace Roslynator.Formatting.CodeFixes.CSharp; diff --git a/src/Formatting.Analyzers.CodeFixes/CSharp/InitializerCodeFixProvider.cs b/src/Formatting.Analyzers.CodeFixes/CSharp/InitializerCodeFixProvider.cs index 9a2328be43..fda3b940c4 100644 --- a/src/Formatting.Analyzers.CodeFixes/CSharp/InitializerCodeFixProvider.cs +++ b/src/Formatting.Analyzers.CodeFixes/CSharp/InitializerCodeFixProvider.cs @@ -8,7 +8,6 @@ using Microsoft.CodeAnalysis.CodeFixes; using Microsoft.CodeAnalysis.CSharp.Syntax; using Roslynator.CSharp; -using Roslynator.Formatting.CSharp; namespace Roslynator.Formatting.CodeFixes.CSharp; diff --git a/src/Formatting.Analyzers.CodeFixes/CSharp/LineIsTooLong/LineIsTooLongCodeFixProvider.cs b/src/Formatting.Analyzers.CodeFixes/CSharp/LineIsTooLong/LineIsTooLongCodeFixProvider.cs index f25d27fe77..2750243aa3 100644 --- a/src/Formatting.Analyzers.CodeFixes/CSharp/LineIsTooLong/LineIsTooLongCodeFixProvider.cs +++ b/src/Formatting.Analyzers.CodeFixes/CSharp/LineIsTooLong/LineIsTooLongCodeFixProvider.cs @@ -16,7 +16,6 @@ using Roslynator.CSharp.CodeStyle; using Roslynator.CSharp.Syntax; using Roslynator.Formatting.CodeFixes.CSharp; -using Roslynator.Formatting.CSharp; using static Roslynator.Formatting.CodeFixes.CSharp.CodeFixHelpers; namespace Roslynator.Formatting.CodeFixes.LineIsTooLong; diff --git a/src/Formatting.Analyzers.CodeFixes/CSharp/MemberDeclarationCodeFixProvider.cs b/src/Formatting.Analyzers.CodeFixes/CSharp/MemberDeclarationCodeFixProvider.cs index 3f61eb2495..4bc14d498f 100644 --- a/src/Formatting.Analyzers.CodeFixes/CSharp/MemberDeclarationCodeFixProvider.cs +++ b/src/Formatting.Analyzers.CodeFixes/CSharp/MemberDeclarationCodeFixProvider.cs @@ -10,7 +10,6 @@ using Microsoft.CodeAnalysis.CodeFixes; using Microsoft.CodeAnalysis.CSharp.Syntax; using Roslynator.CSharp; -using Roslynator.Formatting.CSharp; namespace Roslynator.Formatting.CodeFixes.CSharp; diff --git a/src/Formatting.Analyzers.CodeFixes/CSharp/NormalizeWhitespaceAtEndOfFileCodeFixProvider.cs b/src/Formatting.Analyzers.CodeFixes/CSharp/NormalizeWhitespaceAtEndOfFileCodeFixProvider.cs index da2c618c54..752faca5e1 100644 --- a/src/Formatting.Analyzers.CodeFixes/CSharp/NormalizeWhitespaceAtEndOfFileCodeFixProvider.cs +++ b/src/Formatting.Analyzers.CodeFixes/CSharp/NormalizeWhitespaceAtEndOfFileCodeFixProvider.cs @@ -8,7 +8,6 @@ using Microsoft.CodeAnalysis.CodeFixes; using Microsoft.CodeAnalysis.CSharp.Syntax; using Roslynator.CSharp; -using Roslynator.Formatting.CSharp; namespace Roslynator.Formatting.CodeFixes.CSharp; diff --git a/src/Formatting.Analyzers.CodeFixes/CSharp/ReplaceTabWithSpacesCodeFixProvider.cs b/src/Formatting.Analyzers.CodeFixes/CSharp/ReplaceTabWithSpacesCodeFixProvider.cs index da36f52390..ea4317c80c 100644 --- a/src/Formatting.Analyzers.CodeFixes/CSharp/ReplaceTabWithSpacesCodeFixProvider.cs +++ b/src/Formatting.Analyzers.CodeFixes/CSharp/ReplaceTabWithSpacesCodeFixProvider.cs @@ -8,7 +8,6 @@ using Microsoft.CodeAnalysis.CodeActions; using Microsoft.CodeAnalysis.CodeFixes; using Microsoft.CodeAnalysis.Text; -using Roslynator.Formatting.CSharp; namespace Roslynator.Formatting.CodeFixes.CSharp; diff --git a/src/Formatting.Analyzers.CodeFixes/CSharp/StatementCodeFixProvider.cs b/src/Formatting.Analyzers.CodeFixes/CSharp/StatementCodeFixProvider.cs index 68d234b069..2fa3840de3 100644 --- a/src/Formatting.Analyzers.CodeFixes/CSharp/StatementCodeFixProvider.cs +++ b/src/Formatting.Analyzers.CodeFixes/CSharp/StatementCodeFixProvider.cs @@ -6,7 +6,6 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CodeFixes; using Roslynator.CSharp; -using Roslynator.Formatting.CSharp; namespace Roslynator.Formatting.CodeFixes.CSharp; diff --git a/src/Formatting.Analyzers.CodeFixes/CSharp/SwitchSectionCodeFixProvider.cs b/src/Formatting.Analyzers.CodeFixes/CSharp/SwitchSectionCodeFixProvider.cs index 2ed03adf3e..586d867c24 100644 --- a/src/Formatting.Analyzers.CodeFixes/CSharp/SwitchSectionCodeFixProvider.cs +++ b/src/Formatting.Analyzers.CodeFixes/CSharp/SwitchSectionCodeFixProvider.cs @@ -6,7 +6,6 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CodeFixes; using Roslynator.CSharp; -using Roslynator.Formatting.CSharp; namespace Roslynator.Formatting.CodeFixes.CSharp; diff --git a/src/Formatting.Analyzers.CodeFixes/CSharp/SyntaxTokenCodeFixProvider.cs b/src/Formatting.Analyzers.CodeFixes/CSharp/SyntaxTokenCodeFixProvider.cs index 6d6330cd05..49de20b3f8 100644 --- a/src/Formatting.Analyzers.CodeFixes/CSharp/SyntaxTokenCodeFixProvider.cs +++ b/src/Formatting.Analyzers.CodeFixes/CSharp/SyntaxTokenCodeFixProvider.cs @@ -7,7 +7,6 @@ using Microsoft.CodeAnalysis.CodeFixes; using Microsoft.CodeAnalysis.CSharp; using Roslynator.CSharp; -using Roslynator.Formatting.CSharp; namespace Roslynator.Formatting.CodeFixes.CSharp; diff --git a/src/Formatting.Analyzers.CodeFixes/CSharp/SyntaxTriviaCodeFixProvider.cs b/src/Formatting.Analyzers.CodeFixes/CSharp/SyntaxTriviaCodeFixProvider.cs index 244dc9ac8b..54da0848eb 100644 --- a/src/Formatting.Analyzers.CodeFixes/CSharp/SyntaxTriviaCodeFixProvider.cs +++ b/src/Formatting.Analyzers.CodeFixes/CSharp/SyntaxTriviaCodeFixProvider.cs @@ -6,7 +6,6 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CodeFixes; using Roslynator.CSharp; -using Roslynator.Formatting.CSharp; namespace Roslynator.Formatting.CodeFixes.CSharp; diff --git a/src/Formatting.Analyzers.CodeFixes/CSharp/TypeParameterConstraintClauseSyntaxCodeFixProvider.cs b/src/Formatting.Analyzers.CodeFixes/CSharp/TypeParameterConstraintClauseSyntaxCodeFixProvider.cs index 9625463ffb..7d55838237 100644 --- a/src/Formatting.Analyzers.CodeFixes/CSharp/TypeParameterConstraintClauseSyntaxCodeFixProvider.cs +++ b/src/Formatting.Analyzers.CodeFixes/CSharp/TypeParameterConstraintClauseSyntaxCodeFixProvider.cs @@ -8,7 +8,6 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Roslynator.CSharp; -using Roslynator.Formatting.CSharp; namespace Roslynator.Formatting.CodeFixes.CSharp; diff --git a/src/Formatting.Analyzers.CodeFixes/NewLineCodeFixProvider.cs b/src/Formatting.Analyzers.CodeFixes/NewLineCodeFixProvider.cs index 450d75dd13..492a5dc570 100644 --- a/src/Formatting.Analyzers.CodeFixes/NewLineCodeFixProvider.cs +++ b/src/Formatting.Analyzers.CodeFixes/NewLineCodeFixProvider.cs @@ -7,7 +7,6 @@ using Microsoft.CodeAnalysis.CodeActions; using Microsoft.CodeAnalysis.CodeFixes; using Microsoft.CodeAnalysis.Text; -using Roslynator.Formatting.CSharp; namespace Roslynator.Formatting.CodeFixes; diff --git a/src/Formatting.Analyzers/CSharp/AddBlankLineBeforeTopDeclarationAnalyzer.cs b/src/Formatting.Analyzers/CSharp/AddBlankLineBeforeTopDeclarationAnalyzer.cs index 64cdeb028b..f94e48f452 100644 --- a/src/Formatting.Analyzers/CSharp/AddBlankLineBeforeTopDeclarationAnalyzer.cs +++ b/src/Formatting.Analyzers/CSharp/AddBlankLineBeforeTopDeclarationAnalyzer.cs @@ -5,7 +5,6 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Diagnostics; -using Microsoft.CodeAnalysis.Text; using Roslynator.CSharp; namespace Roslynator.Formatting.CSharp; diff --git a/src/Formatting.Analyzers/CSharp/AddBlankLineBetweenClosingBraceAndNextStatementAnalyzer.cs b/src/Formatting.Analyzers/CSharp/AddBlankLineBetweenClosingBraceAndNextStatementAnalyzer.cs index 07be46030f..19d6f1e614 100644 --- a/src/Formatting.Analyzers/CSharp/AddBlankLineBetweenClosingBraceAndNextStatementAnalyzer.cs +++ b/src/Formatting.Analyzers/CSharp/AddBlankLineBetweenClosingBraceAndNextStatementAnalyzer.cs @@ -1,12 +1,10 @@ // Copyright (c) .NET Foundation and Contributors. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Collections.Immutable; -using System.Linq; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Diagnostics; -using Microsoft.CodeAnalysis.Text; using Roslynator.CSharp; namespace Roslynator.Formatting.CSharp; diff --git a/src/Formatting.Analyzers/CSharp/AddOrRemoveNewLineBeforeWhileInDoStatementAnalyzer.cs b/src/Formatting.Analyzers/CSharp/AddOrRemoveNewLineBeforeWhileInDoStatementAnalyzer.cs index e90b2d2e47..d89e75462a 100644 --- a/src/Formatting.Analyzers/CSharp/AddOrRemoveNewLineBeforeWhileInDoStatementAnalyzer.cs +++ b/src/Formatting.Analyzers/CSharp/AddOrRemoveNewLineBeforeWhileInDoStatementAnalyzer.cs @@ -5,7 +5,6 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Diagnostics; -using Microsoft.CodeAnalysis.Text; using Roslynator.CSharp; using Roslynator.CSharp.CodeStyle; diff --git a/src/Formatting.Analyzers/CSharp/BlankLineBetweenDeclarationsAnalyzer.cs b/src/Formatting.Analyzers/CSharp/BlankLineBetweenDeclarationsAnalyzer.cs index f96260cdde..7e104ef523 100644 --- a/src/Formatting.Analyzers/CSharp/BlankLineBetweenDeclarationsAnalyzer.cs +++ b/src/Formatting.Analyzers/CSharp/BlankLineBetweenDeclarationsAnalyzer.cs @@ -1,7 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Collections.Immutable; -using System.Linq; using System.Threading; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; diff --git a/src/Formatting.Analyzers/CSharp/DiagnosticIdentifiers.Generated.cs b/src/Formatting.Analyzers/CSharp/DiagnosticIdentifiers.Generated.cs deleted file mode 100644 index 937b9df58b..0000000000 --- a/src/Formatting.Analyzers/CSharp/DiagnosticIdentifiers.Generated.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) .NET Foundation and Contributors. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -// - -using System; - -namespace Roslynator.Formatting.CSharp -{ - public static partial class DiagnosticIdentifiers - { - public const string AddBlankLineAfterEmbeddedStatement = "RCS0001"; - public const string AddBlankLineAfterRegionDirective = "RCS0002"; - public const string AddBlankLineAfterUsingDirectiveList = "RCS0003"; - public const string AddBlankLineBeforeEndRegionDirective = "RCS0005"; - public const string AddBlankLineBeforeUsingDirectiveList = "RCS0006"; - public const string AddBlankLineBetweenAccessors = "RCS0007"; - public const string AddBlankLineBetweenClosingBraceAndNextStatement = "RCS0008"; - public const string AddBlankLineBetweenDeclarationAndDocumentationComment = "RCS0009"; - public const string AddBlankLineBetweenDeclarations = "RCS0010"; - public const string BlankLineBetweenSingleLineAccessors = "RCS0011"; - public const string AddBlankLineBetweenSingleLineDeclarations = "RCS0012"; - public const string AddBlankLineBetweenSingleLineDeclarationsOfDifferentKind = "RCS0013"; - public const string AddBlankLineBetweenSwitchSections = "RCS0014"; - public const string BlankLineBetweenUsingDirectives = "RCS0015"; - public const string PutAttributeListOnItsOwnLine = "RCS0016"; - public const string FormatAccessorBraces = "RCS0020"; - public const string FormatBlockBraces = "RCS0021"; - public const string AddNewLineAfterOpeningBraceOfEmptyBlock = "RCS0022"; - public const string FormatTypeDeclarationBraces = "RCS0023"; - public const string AddNewLineAfterSwitchLabel = "RCS0024"; - public const string PutFullAccessorOnItsOwnLine = "RCS0025"; - public const string PlaceNewLineAfterOrBeforeBinaryOperator = "RCS0027"; - public const string PlaceNewLineAfterOrBeforeConditionalOperator = "RCS0028"; - public const string PutConstructorInitializerOnItsOwnLine = "RCS0029"; - public const string PutEmbeddedStatementOnItsOwnLine = "RCS0030"; - public const string PutEnumMemberOnItsOwnLine = "RCS0031"; - public const string PlaceNewLineAfterOrBeforeArrowToken = "RCS0032"; - public const string PutStatementOnItsOwnLine = "RCS0033"; - public const string PutTypeParameterConstraintOnItsOwnLine = "RCS0034"; - public const string RemoveBlankLineBetweenSingleLineDeclarationsOfSameKind = "RCS0036"; - public const string RemoveBlankLineBetweenUsingDirectivesWithSameRootNamespace = "RCS0038"; - public const string RemoveNewLineBeforeBaseList = "RCS0039"; - public const string RemoveNewLineBetweenIfKeywordAndElseKeyword = "RCS0041"; - public const string PutAutoAccessorsOnSingleLine = "RCS0042"; - public const string FormatAccessorBracesOnSingleLineWhenExpressionIsOnSingleLine = "RCS0043"; - public const string UseCarriageReturnAndLinefeedAsNewLine = "RCS0044"; - public const string UseLinefeedAsNewLine = "RCS0045"; - public const string UseSpacesInsteadOfTab = "RCS0046"; - public const string WrapAndIndentEachNodeInList = "RCS0047"; - public const string PutInitializerOnSingleLine = "RCS0048"; - public const string AddBlankLineAfterTopComment = "RCS0049"; - public const string AddBlankLineBeforeTopDeclaration = "RCS0050"; - public const string AddOrRemoveNewLineBeforeWhileInDoStatement = "RCS0051"; - public const string PlaceNewLineAfterOrBeforeEqualsToken = "RCS0052"; - public const string FixFormattingOfList = "RCS0053"; - public const string FixFormattingOfCallChain = "RCS0054"; - public const string FixFormattingOfBinaryExpressionChain = "RCS0055"; - public const string LineIsTooLong = "RCS0056"; - public const string NormalizeWhitespaceAtBeginningOfFile = "RCS0057"; - public const string NormalizeWhitespaceAtEndOfFile = "RCS0058"; - public const string PlaceNewLineAfterOrBeforeNullConditionalOperator = "RCS0059"; - public const string BlankLineAfterFileScopedNamespaceDeclaration = "RCS0060"; - public const string BlankLineBetweenSwitchSections = "RCS0061"; - } -} \ No newline at end of file diff --git a/src/Formatting.Analyzers/CSharp/DiagnosticRules.Generated.cs b/src/Formatting.Analyzers/CSharp/DiagnosticRules.Generated.cs deleted file mode 100644 index bb553cf2b9..0000000000 --- a/src/Formatting.Analyzers/CSharp/DiagnosticRules.Generated.cs +++ /dev/null @@ -1,649 +0,0 @@ -// Copyright (c) .NET Foundation and Contributors. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -// - -using System; -using Microsoft.CodeAnalysis; - -namespace Roslynator.Formatting.CSharp -{ - public static partial class DiagnosticRules - { - /// RCS0001 - public static readonly DiagnosticDescriptor AddBlankLineAfterEmbeddedStatement = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.AddBlankLineAfterEmbeddedStatement, - title: "Add blank line after embedded statement", - messageFormat: "Add blank line after embedded statement", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.AddBlankLineAfterEmbeddedStatement, - customTags: Array.Empty()); - - /// RCS0002 - public static readonly DiagnosticDescriptor AddBlankLineAfterRegionDirective = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.AddBlankLineAfterRegionDirective, - title: "Add blank line after #region", - messageFormat: "Add blank line after #region", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.AddBlankLineAfterRegionDirective, - customTags: Array.Empty()); - - /// RCS0003 - public static readonly DiagnosticDescriptor AddBlankLineAfterUsingDirectiveList = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.AddBlankLineAfterUsingDirectiveList, - title: "Add blank line after using directive list", - messageFormat: "Add blank line after using directive list", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.AddBlankLineAfterUsingDirectiveList, - customTags: Array.Empty()); - - /// RCS0005 - public static readonly DiagnosticDescriptor AddBlankLineBeforeEndRegionDirective = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.AddBlankLineBeforeEndRegionDirective, - title: "Add blank line before #endregion", - messageFormat: "Add blank line before #endregion", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.AddBlankLineBeforeEndRegionDirective, - customTags: Array.Empty()); - - /// RCS0006 - public static readonly DiagnosticDescriptor AddBlankLineBeforeUsingDirectiveList = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.AddBlankLineBeforeUsingDirectiveList, - title: "Add blank line before using directive list", - messageFormat: "Add blank line before using directive list", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.AddBlankLineBeforeUsingDirectiveList, - customTags: Array.Empty()); - - /// RCS0007 - public static readonly DiagnosticDescriptor AddBlankLineBetweenAccessors = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.AddBlankLineBetweenAccessors, - title: "Add blank line between accessors", - messageFormat: "Add blank line between accessors", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.AddBlankLineBetweenAccessors, - customTags: Array.Empty()); - - /// RCS0008 - public static readonly DiagnosticDescriptor AddBlankLineBetweenClosingBraceAndNextStatement = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.AddBlankLineBetweenClosingBraceAndNextStatement, - title: "Add blank line between closing brace and next statement", - messageFormat: "Add blank line between closing brace and next statement", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.AddBlankLineBetweenClosingBraceAndNextStatement, - customTags: Array.Empty()); - - /// RCS0009 - public static readonly DiagnosticDescriptor AddBlankLineBetweenDeclarationAndDocumentationComment = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.AddBlankLineBetweenDeclarationAndDocumentationComment, - title: "Add blank line between declaration and documentation comment", - messageFormat: "Add blank line between declaration and documentation comment", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.AddBlankLineBetweenDeclarationAndDocumentationComment, - customTags: Array.Empty()); - - /// RCS0010 - public static readonly DiagnosticDescriptor AddBlankLineBetweenDeclarations = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.AddBlankLineBetweenDeclarations, - title: "Add blank line between declarations", - messageFormat: "Add blank line between declarations", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.AddBlankLineBetweenDeclarations, - customTags: Array.Empty()); - - /// RCS0011 - public static readonly DiagnosticDescriptor BlankLineBetweenSingleLineAccessors = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.BlankLineBetweenSingleLineAccessors, - title: "Add/remove blank line between single-line accessors", - messageFormat: "{0} blank line between single-line accessors", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.BlankLineBetweenSingleLineAccessors, - customTags: Array.Empty()); - - /// RCS0012 - public static readonly DiagnosticDescriptor AddBlankLineBetweenSingleLineDeclarations = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.AddBlankLineBetweenSingleLineDeclarations, - title: "Add blank line between single-line declarations", - messageFormat: "Add blank line between single-line declarations", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.AddBlankLineBetweenSingleLineDeclarations, - customTags: Array.Empty()); - - /// RCS0013 - public static readonly DiagnosticDescriptor AddBlankLineBetweenSingleLineDeclarationsOfDifferentKind = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.AddBlankLineBetweenSingleLineDeclarationsOfDifferentKind, - title: "Add blank line between single-line declarations of different kind", - messageFormat: "Add blank line between single-line declarations of different kind", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.AddBlankLineBetweenSingleLineDeclarationsOfDifferentKind, - customTags: Array.Empty()); - - /// RCS0014 - public static readonly DiagnosticDescriptor AddBlankLineBetweenSwitchSections = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.AddBlankLineBetweenSwitchSections, - title: "[deprecated] Add blank line between switch sections", - messageFormat: "([deprecated] Use RCS0061 instead) Add blank line between switch sections", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.AddBlankLineBetweenSwitchSections, - customTags: Array.Empty()); - - /// RCS0015 - public static readonly DiagnosticDescriptor BlankLineBetweenUsingDirectives = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.BlankLineBetweenUsingDirectives, - title: "Add/remove blank line between using directives", - messageFormat: "{0} blank line between using directives", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.BlankLineBetweenUsingDirectives, - customTags: Array.Empty()); - - /// RCS0016 - public static readonly DiagnosticDescriptor PutAttributeListOnItsOwnLine = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.PutAttributeListOnItsOwnLine, - title: "Put attribute list on its own line", - messageFormat: "Put attribute list on its own line", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.PutAttributeListOnItsOwnLine, - customTags: Array.Empty()); - - /// RCS0020 - public static readonly DiagnosticDescriptor FormatAccessorBraces = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.FormatAccessorBraces, - title: "Format accessor's braces on a single line or multiple lines", - messageFormat: "Format braces on {0}", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.FormatAccessorBraces, - customTags: Array.Empty()); - - /// RCS0021 - public static readonly DiagnosticDescriptor FormatBlockBraces = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.FormatBlockBraces, - title: "Format block's braces on a single line or multiple lines", - messageFormat: "Format braces on {0}", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.FormatBlockBraces, - customTags: Array.Empty()); - - /// RCS0022 - public static readonly DiagnosticDescriptor AddNewLineAfterOpeningBraceOfEmptyBlock = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.AddNewLineAfterOpeningBraceOfEmptyBlock, - title: "[deprecated] Add new line after opening brace of empty block", - messageFormat: "([deprecated] Use RCS0021 instead) Format braces on multiple lines", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.AddNewLineAfterOpeningBraceOfEmptyBlock, - customTags: Array.Empty()); - - /// RCS0023 - public static readonly DiagnosticDescriptor FormatTypeDeclarationBraces = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.FormatTypeDeclarationBraces, - title: "Format type declaration's braces", - messageFormat: "Format type declaration's braces", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.FormatTypeDeclarationBraces, - customTags: Array.Empty()); - - /// RCS0024 - public static readonly DiagnosticDescriptor AddNewLineAfterSwitchLabel = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.AddNewLineAfterSwitchLabel, - title: "Add new line after switch label", - messageFormat: "Add new line after switch label", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.AddNewLineAfterSwitchLabel, - customTags: Array.Empty()); - - /// RCS0025 - public static readonly DiagnosticDescriptor PutFullAccessorOnItsOwnLine = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.PutFullAccessorOnItsOwnLine, - title: "Put full accessor on its own line", - messageFormat: "Put full accessor on its own line", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.PutFullAccessorOnItsOwnLine, - customTags: Array.Empty()); - - /// RCS0027 - public static readonly DiagnosticDescriptor PlaceNewLineAfterOrBeforeBinaryOperator = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.PlaceNewLineAfterOrBeforeBinaryOperator, - title: "Place new line after/before binary operator", - messageFormat: "Place new line {0} binary operator", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.PlaceNewLineAfterOrBeforeBinaryOperator, - customTags: Array.Empty()); - - /// RCS0028 - public static readonly DiagnosticDescriptor PlaceNewLineAfterOrBeforeConditionalOperator = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.PlaceNewLineAfterOrBeforeConditionalOperator, - title: "Place new line after/before '?:' operator", - messageFormat: "Place new line {0} operator", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.PlaceNewLineAfterOrBeforeConditionalOperator, - customTags: Array.Empty()); - - /// RCS0029 - public static readonly DiagnosticDescriptor PutConstructorInitializerOnItsOwnLine = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.PutConstructorInitializerOnItsOwnLine, - title: "Put constructor initializer on its own line", - messageFormat: "Put constructor initializer on its own line", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.PutConstructorInitializerOnItsOwnLine, - customTags: Array.Empty()); - - /// RCS0030 - public static readonly DiagnosticDescriptor PutEmbeddedStatementOnItsOwnLine = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.PutEmbeddedStatementOnItsOwnLine, - title: "Put embedded statement on its own line", - messageFormat: "Put embedded statement on its own line", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.PutEmbeddedStatementOnItsOwnLine, - customTags: Array.Empty()); - - /// RCS0031 - public static readonly DiagnosticDescriptor PutEnumMemberOnItsOwnLine = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.PutEnumMemberOnItsOwnLine, - title: "Put enum member on its own line", - messageFormat: "Put enum member on its own line", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.PutEnumMemberOnItsOwnLine, - customTags: Array.Empty()); - - /// RCS0032 - public static readonly DiagnosticDescriptor PlaceNewLineAfterOrBeforeArrowToken = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.PlaceNewLineAfterOrBeforeArrowToken, - title: "Place new line after/before arrow token", - messageFormat: "Place new line {0} arrow token", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.PlaceNewLineAfterOrBeforeArrowToken, - customTags: Array.Empty()); - - /// RCS0033 - public static readonly DiagnosticDescriptor PutStatementOnItsOwnLine = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.PutStatementOnItsOwnLine, - title: "Put statement on its own line", - messageFormat: "Put statement on its own line", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.PutStatementOnItsOwnLine, - customTags: Array.Empty()); - - /// RCS0034 - public static readonly DiagnosticDescriptor PutTypeParameterConstraintOnItsOwnLine = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.PutTypeParameterConstraintOnItsOwnLine, - title: "Put type parameter constraint on its own line", - messageFormat: "Put type parameter constraint on its own line", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.PutTypeParameterConstraintOnItsOwnLine, - customTags: Array.Empty()); - - /// RCS0036 - public static readonly DiagnosticDescriptor RemoveBlankLineBetweenSingleLineDeclarationsOfSameKind = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.RemoveBlankLineBetweenSingleLineDeclarationsOfSameKind, - title: "Remove blank line between single-line declarations of same kind", - messageFormat: "Remove blank line between single-line declarations of same kind", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.RemoveBlankLineBetweenSingleLineDeclarationsOfSameKind, - customTags: Array.Empty()); - - /// RCS0038 - public static readonly DiagnosticDescriptor RemoveBlankLineBetweenUsingDirectivesWithSameRootNamespace = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.RemoveBlankLineBetweenUsingDirectivesWithSameRootNamespace, - title: "[deprecated] Remove blank line between using directives with same root namespace", - messageFormat: "([deprecated] Use RCS0015 instead) Remove blank line between using directives", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.RemoveBlankLineBetweenUsingDirectivesWithSameRootNamespace, - customTags: Array.Empty()); - - /// RCS0039 - public static readonly DiagnosticDescriptor RemoveNewLineBeforeBaseList = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.RemoveNewLineBeforeBaseList, - title: "Remove new line before base list", - messageFormat: "Remove new line before base list", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.RemoveNewLineBeforeBaseList, - customTags: Array.Empty()); - - /// RCS0041 - public static readonly DiagnosticDescriptor RemoveNewLineBetweenIfKeywordAndElseKeyword = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.RemoveNewLineBetweenIfKeywordAndElseKeyword, - title: "Remove new line between 'if' keyword and 'else' keyword", - messageFormat: "Remove new line between 'if' keyword and 'else' keyword", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.RemoveNewLineBetweenIfKeywordAndElseKeyword, - customTags: Array.Empty()); - - /// RCS0042 - public static readonly DiagnosticDescriptor PutAutoAccessorsOnSingleLine = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.PutAutoAccessorsOnSingleLine, - title: "Put auto-accessors on a single line", - messageFormat: "Put auto-accessors on a single line", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.PutAutoAccessorsOnSingleLine, - customTags: Array.Empty()); - - /// RCS0043 - public static readonly DiagnosticDescriptor FormatAccessorBracesOnSingleLineWhenExpressionIsOnSingleLine = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.FormatAccessorBracesOnSingleLineWhenExpressionIsOnSingleLine, - title: "[deprecated] Format accessor's braces on a single line when expression is on single line", - messageFormat: "([deprecated] Use RCS0020 with option 'roslynator_accessor_braces_style = single_line_when_expression_is_on_single_line') Format braces on a single line", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.FormatAccessorBracesOnSingleLineWhenExpressionIsOnSingleLine, - customTags: Array.Empty()); - - /// RCS0044 - public static readonly DiagnosticDescriptor UseCarriageReturnAndLinefeedAsNewLine = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.UseCarriageReturnAndLinefeedAsNewLine, - title: "Use carriage return + linefeed as new line", - messageFormat: "Use carriage return + linefeed as new line", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.UseCarriageReturnAndLinefeedAsNewLine, - customTags: Array.Empty()); - - /// RCS0045 - public static readonly DiagnosticDescriptor UseLinefeedAsNewLine = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.UseLinefeedAsNewLine, - title: "Use linefeed as new line", - messageFormat: "Use linefeed as new line", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.UseLinefeedAsNewLine, - customTags: Array.Empty()); - - /// RCS0046 - public static readonly DiagnosticDescriptor UseSpacesInsteadOfTab = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.UseSpacesInsteadOfTab, - title: "Use spaces instead of tab", - messageFormat: "Use spaces instead of tab", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.UseSpacesInsteadOfTab, - customTags: Array.Empty()); - - /// RCS0047 - public static readonly DiagnosticDescriptor WrapAndIndentEachNodeInList = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.WrapAndIndentEachNodeInList, - title: "[deprecated] Wrap and indent each node in list", - messageFormat: "([deprecated] Use RCS0053 instead) Wrap and indent each node in list", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.WrapAndIndentEachNodeInList, - customTags: Array.Empty()); - - /// RCS0048 - public static readonly DiagnosticDescriptor PutInitializerOnSingleLine = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.PutInitializerOnSingleLine, - title: "Put initializer on a single line", - messageFormat: "Put initializer on a single line", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Hidden, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.PutInitializerOnSingleLine, - customTags: Array.Empty()); - - /// RCS0049 - public static readonly DiagnosticDescriptor AddBlankLineAfterTopComment = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.AddBlankLineAfterTopComment, - title: "Add blank line after top comment", - messageFormat: "Add blank line after top comment", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.AddBlankLineAfterTopComment, - customTags: Array.Empty()); - - /// RCS0050 - public static readonly DiagnosticDescriptor AddBlankLineBeforeTopDeclaration = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.AddBlankLineBeforeTopDeclaration, - title: "Add blank line before top declaration", - messageFormat: "Add blank line before top declaration", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.AddBlankLineBeforeTopDeclaration, - customTags: Array.Empty()); - - /// RCS0051 - public static readonly DiagnosticDescriptor AddOrRemoveNewLineBeforeWhileInDoStatement = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.AddOrRemoveNewLineBeforeWhileInDoStatement, - title: "Add/remove new line before 'while' in 'do' statement", - messageFormat: "{0} new line before 'while' in 'do' statement", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.AddOrRemoveNewLineBeforeWhileInDoStatement, - customTags: Array.Empty()); - - /// RCS0052 - public static readonly DiagnosticDescriptor PlaceNewLineAfterOrBeforeEqualsToken = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.PlaceNewLineAfterOrBeforeEqualsToken, - title: "Place new line after/before equals token", - messageFormat: "Place new line {0} equals token", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.PlaceNewLineAfterOrBeforeEqualsToken, - customTags: Array.Empty()); - - /// RCS0053 - public static readonly DiagnosticDescriptor FixFormattingOfList = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.FixFormattingOfList, - title: "Fix formatting of a list", - messageFormat: "Fix formatting of {0}", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.FixFormattingOfList, - customTags: Array.Empty()); - - /// RCS0054 - public static readonly DiagnosticDescriptor FixFormattingOfCallChain = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.FixFormattingOfCallChain, - title: "Fix formatting of a call chain", - messageFormat: "Fix formatting of a call chain", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.FixFormattingOfCallChain, - customTags: Array.Empty()); - - /// RCS0055 - public static readonly DiagnosticDescriptor FixFormattingOfBinaryExpressionChain = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.FixFormattingOfBinaryExpressionChain, - title: "Fix formatting of a binary expression chain", - messageFormat: "Fix formatting of a binary expression chain", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.FixFormattingOfBinaryExpressionChain, - customTags: Array.Empty()); - - /// RCS0056 - public static readonly DiagnosticDescriptor LineIsTooLong = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.LineIsTooLong, - title: "A line is too long", - messageFormat: "A line is too long ({0} characters)", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.LineIsTooLong, - customTags: Array.Empty()); - - /// RCS0057 - public static readonly DiagnosticDescriptor NormalizeWhitespaceAtBeginningOfFile = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.NormalizeWhitespaceAtBeginningOfFile, - title: "Normalize whitespace at the beginning of a file", - messageFormat: "Normalize whitespace at the beginning of a file", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.NormalizeWhitespaceAtBeginningOfFile, - customTags: Array.Empty()); - - /// RCS0058 - public static readonly DiagnosticDescriptor NormalizeWhitespaceAtEndOfFile = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.NormalizeWhitespaceAtEndOfFile, - title: "Normalize whitespace at the end of a file", - messageFormat: "Normalize whitespace at the end of a file", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.NormalizeWhitespaceAtEndOfFile, - customTags: Array.Empty()); - - /// RCS0059 - public static readonly DiagnosticDescriptor PlaceNewLineAfterOrBeforeNullConditionalOperator = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.PlaceNewLineAfterOrBeforeNullConditionalOperator, - title: "Place new line after/before null-conditional operator", - messageFormat: "Place new line {0} null-conditional operator", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.PlaceNewLineAfterOrBeforeNullConditionalOperator, - customTags: Array.Empty()); - - /// RCS0060 - public static readonly DiagnosticDescriptor BlankLineAfterFileScopedNamespaceDeclaration = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.BlankLineAfterFileScopedNamespaceDeclaration, - title: "Add/remove line after file scoped namespace declaration", - messageFormat: "{0} line after file scoped namespace declaration", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.BlankLineAfterFileScopedNamespaceDeclaration, - customTags: Array.Empty()); - - /// RCS0061 - public static readonly DiagnosticDescriptor BlankLineBetweenSwitchSections = DiagnosticDescriptorFactory.Create( - id: DiagnosticIdentifiers.BlankLineBetweenSwitchSections, - title: "Add/remove blank line between switch sections", - messageFormat: "{0} blank line between switch sections", - category: DiagnosticCategories.Roslynator, - defaultSeverity: DiagnosticSeverity.Info, - isEnabledByDefault: false, - description: null, - helpLinkUri: DiagnosticIdentifiers.BlankLineBetweenSwitchSections, - customTags: Array.Empty()); - - } -} \ No newline at end of file diff --git a/src/Formatting.Analyzers/CSharp/LineIsTooLongAnalyzer.cs b/src/Formatting.Analyzers/CSharp/LineIsTooLongAnalyzer.cs index c72bbfe6cd..f2fd98033b 100644 --- a/src/Formatting.Analyzers/CSharp/LineIsTooLongAnalyzer.cs +++ b/src/Formatting.Analyzers/CSharp/LineIsTooLongAnalyzer.cs @@ -6,7 +6,6 @@ using Microsoft.CodeAnalysis.Diagnostics; using Microsoft.CodeAnalysis.Text; using Roslynator.CSharp; -using Roslynator.Formatting.CSharp; namespace Roslynator.Formatting; diff --git a/src/Formatting.Analyzers/CSharp/RemoveNewLineBetweenIfKeywordAndElseKeywordAnalyzer.cs b/src/Formatting.Analyzers/CSharp/RemoveNewLineBetweenIfKeywordAndElseKeywordAnalyzer.cs index cf18ecf3f3..e3411b2859 100644 --- a/src/Formatting.Analyzers/CSharp/RemoveNewLineBetweenIfKeywordAndElseKeywordAnalyzer.cs +++ b/src/Formatting.Analyzers/CSharp/RemoveNewLineBetweenIfKeywordAndElseKeywordAnalyzer.cs @@ -5,7 +5,6 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Diagnostics; -using Microsoft.CodeAnalysis.Text; using Roslynator.CSharp; namespace Roslynator.Formatting.CSharp; diff --git a/src/Formatting.Analyzers/UseCarriageReturnAndLinefeedAsNewLineAnalyzer.cs b/src/Formatting.Analyzers/UseCarriageReturnAndLinefeedAsNewLineAnalyzer.cs index d78c3d6208..4d24e21624 100644 --- a/src/Formatting.Analyzers/UseCarriageReturnAndLinefeedAsNewLineAnalyzer.cs +++ b/src/Formatting.Analyzers/UseCarriageReturnAndLinefeedAsNewLineAnalyzer.cs @@ -4,7 +4,6 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.Diagnostics; using Microsoft.CodeAnalysis.Text; -using Roslynator.Formatting.CSharp; namespace Roslynator.Formatting; diff --git a/src/Formatting.Analyzers/UseLinefeedAsNewLineAnalyzer.cs b/src/Formatting.Analyzers/UseLinefeedAsNewLineAnalyzer.cs index 7b47435172..4865e4f4e3 100644 --- a/src/Formatting.Analyzers/UseLinefeedAsNewLineAnalyzer.cs +++ b/src/Formatting.Analyzers/UseLinefeedAsNewLineAnalyzer.cs @@ -4,7 +4,6 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.Diagnostics; using Microsoft.CodeAnalysis.Text; -using Roslynator.Formatting.CSharp; namespace Roslynator.Formatting; diff --git a/src/Refactorings/CSharp/Refactorings/ChangeDeclarationExpressionTypeRefactoring.cs b/src/Refactorings/CSharp/Refactorings/ChangeDeclarationExpressionTypeRefactoring.cs index 9a3ada3b69..99a3f6a5dd 100644 --- a/src/Refactorings/CSharp/Refactorings/ChangeDeclarationExpressionTypeRefactoring.cs +++ b/src/Refactorings/CSharp/Refactorings/ChangeDeclarationExpressionTypeRefactoring.cs @@ -2,7 +2,6 @@ using System.Threading.Tasks; using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; namespace Roslynator.CSharp.Refactorings; diff --git a/src/Refactorings/CSharp/Refactorings/ConvertWhileToForRefactoring.cs b/src/Refactorings/CSharp/Refactorings/ConvertWhileToForRefactoring.cs index 26653f6142..5eae162eb7 100644 --- a/src/Refactorings/CSharp/Refactorings/ConvertWhileToForRefactoring.cs +++ b/src/Refactorings/CSharp/Refactorings/ConvertWhileToForRefactoring.cs @@ -10,7 +10,6 @@ using Roslynator.CSharp.Syntax; using Roslynator.CSharp.SyntaxWalkers; using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory; -using static Roslynator.CSharp.CSharpFactory; namespace Roslynator.CSharp.Refactorings; diff --git a/src/Refactorings/CSharp/Refactorings/IntroduceAndInitialize/IntroduceAndInitializeFieldInfo.cs b/src/Refactorings/CSharp/Refactorings/IntroduceAndInitialize/IntroduceAndInitializeFieldInfo.cs index 209f8e81ce..73338c3e16 100644 --- a/src/Refactorings/CSharp/Refactorings/IntroduceAndInitialize/IntroduceAndInitializeFieldInfo.cs +++ b/src/Refactorings/CSharp/Refactorings/IntroduceAndInitialize/IntroduceAndInitializeFieldInfo.cs @@ -1,7 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.CodeAnalysis.CSharp.Syntax; -using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory; using static Roslynator.CSharp.CSharpFactory; namespace Roslynator.CSharp.Refactorings.IntroduceAndInitialize; diff --git a/src/Refactorings/CSharp/Refactorings/MakeMemberVirtual/MakeMethodVirtualRefactoring.cs b/src/Refactorings/CSharp/Refactorings/MakeMemberVirtual/MakeMethodVirtualRefactoring.cs index dd395a1cf3..5722e8cd5a 100644 --- a/src/Refactorings/CSharp/Refactorings/MakeMemberVirtual/MakeMethodVirtualRefactoring.cs +++ b/src/Refactorings/CSharp/Refactorings/MakeMemberVirtual/MakeMethodVirtualRefactoring.cs @@ -6,7 +6,6 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory; -using static Roslynator.CSharp.CSharpFactory; namespace Roslynator.CSharp.Refactorings.MakeMemberVirtual; diff --git a/src/Refactorings/CSharp/Refactorings/UseIndexInitializerRefactoring.cs b/src/Refactorings/CSharp/Refactorings/UseIndexInitializerRefactoring.cs index 1f20d81dcf..5de27f60cc 100644 --- a/src/Refactorings/CSharp/Refactorings/UseIndexInitializerRefactoring.cs +++ b/src/Refactorings/CSharp/Refactorings/UseIndexInitializerRefactoring.cs @@ -7,7 +7,6 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Roslynator.CSharp; using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory; using static Roslynator.CSharp.CSharpFactory; diff --git a/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9001UsePatternMatchingTests.cs b/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9001UsePatternMatchingTests.cs index 10a8246d13..933622d1ac 100644 --- a/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9001UsePatternMatchingTests.cs +++ b/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9001UsePatternMatchingTests.cs @@ -2,17 +2,16 @@ using System.Threading.Tasks; using Microsoft.CodeAnalysis; -using Roslynator.CodeAnalysis.CSharp; using Roslynator.Testing.CSharp; using Xunit; -namespace Roslynator.CSharp.Analysis.Tests; +namespace Roslynator.CodeAnalysis.CSharp.Tests; public class RCS9001UsePatternMatchingTests : AbstractCSharpDiagnosticVerifier { - public override DiagnosticDescriptor Descriptor { get; } = DiagnosticRules.UsePatternMatching; + public override DiagnosticDescriptor Descriptor { get; } = CodeAnalysisDiagnosticRules.UsePatternMatching; - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.UsePatternMatching)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.UsePatternMatching)] public async Task Test_SwitchStatement() { await VerifyDiagnosticAndFixAsync(@" @@ -75,7 +74,7 @@ void M() "); } - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.UsePatternMatching)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.UsePatternMatching)] public async Task Test_SwitchStatement_LocalDeclaration() { await VerifyDiagnosticAndFixAsync(@" @@ -140,7 +139,7 @@ void M() "); } - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.UsePatternMatching)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.UsePatternMatching)] public async Task Test_IfStatement_IsKind() { await VerifyDiagnosticAndFixAsync(@" @@ -179,7 +178,7 @@ void M() "); } - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.UsePatternMatching)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.UsePatternMatching)] public async Task Test_IfStatement_IsKind_Conditional() { await VerifyDiagnosticAndFixAsync(@" @@ -218,7 +217,7 @@ void M() "); } - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.UsePatternMatching)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.UsePatternMatching)] public async Task Test_IfStatement_Kind() { await VerifyDiagnosticAndFixAsync(@" @@ -257,7 +256,7 @@ void M() "); } - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.UsePatternMatching)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.UsePatternMatching)] public async Task Test_IfStatement_Kind_Conditional() { await VerifyDiagnosticAndFixAsync(@" @@ -296,7 +295,7 @@ void M() "); } - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.UsePatternMatching)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.UsePatternMatching)] public async Task Test_IfStatement_NotIsKind() { await VerifyDiagnosticAndFixAsync(@" @@ -338,7 +337,7 @@ void M() "); } - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.UsePatternMatching)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.UsePatternMatching)] public async Task Test_IfStatement_NotIsKind_Embedded() { await VerifyDiagnosticAndFixAsync(@" @@ -376,7 +375,7 @@ void M() "); } - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.UsePatternMatching)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.UsePatternMatching)] public async Task Test_IfStatement_NotIsKind_Conditional() { await VerifyDiagnosticAndFixAsync(@" @@ -418,7 +417,7 @@ void M() "); } - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.UsePatternMatching)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.UsePatternMatching)] public async Task Test_IfStatement_NotKind() { await VerifyDiagnosticAndFixAsync(@" @@ -460,7 +459,7 @@ void M() "); } - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.UsePatternMatching)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.UsePatternMatching)] public async Task Test_IfStatement_NotKind_Conditional() { await VerifyDiagnosticAndFixAsync(@" @@ -502,7 +501,7 @@ void M() "); } - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.UsePatternMatching)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.UsePatternMatching)] public async Task TestNoDiagnostic_SwitchStatement_VariableIsReferenced() { await VerifyNoDiagnosticAsync(@" @@ -533,7 +532,7 @@ void M() "); } - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.UsePatternMatching)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.UsePatternMatching)] public async Task TestNoDiagnostic_IfStatement_SimpleMemberAccessExpression() { await VerifyNoDiagnosticAsync(@" diff --git a/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9002UsePropertySyntaxNodeSpanStartTests.cs b/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9002UsePropertySyntaxNodeSpanStartTests.cs index adaec134c6..d222e14626 100644 --- a/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9002UsePropertySyntaxNodeSpanStartTests.cs +++ b/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9002UsePropertySyntaxNodeSpanStartTests.cs @@ -2,17 +2,16 @@ using System.Threading.Tasks; using Microsoft.CodeAnalysis; -using Roslynator.CodeAnalysis.CSharp; using Roslynator.Testing.CSharp; using Xunit; -namespace Roslynator.CSharp.Analysis.Tests; +namespace Roslynator.CodeAnalysis.CSharp.Tests; public class RCS9002UsePropertySyntaxNodeSpanStartTests : AbstractCSharpDiagnosticVerifier { - public override DiagnosticDescriptor Descriptor { get; } = DiagnosticRules.UsePropertySyntaxNodeSpanStart; + public override DiagnosticDescriptor Descriptor { get; } = CodeAnalysisDiagnosticRules.UsePropertySyntaxNodeSpanStart; - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.UsePropertySyntaxNodeSpanStart)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.UsePropertySyntaxNodeSpanStart)] public async Task Test() { await VerifyDiagnosticAndFixAsync(@" diff --git a/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9003UnnecessaryConditionalAccessTests.cs b/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9003UnnecessaryConditionalAccessTests.cs index ec81a502c6..933da42faa 100644 --- a/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9003UnnecessaryConditionalAccessTests.cs +++ b/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9003UnnecessaryConditionalAccessTests.cs @@ -2,17 +2,16 @@ using System.Threading.Tasks; using Microsoft.CodeAnalysis; -using Roslynator.CodeAnalysis.CSharp; using Roslynator.Testing.CSharp; using Xunit; -namespace Roslynator.CSharp.Analysis.Tests; +namespace Roslynator.CodeAnalysis.CSharp.Tests; public class RCS9003UnnecessaryConditionalAccessTests : AbstractCSharpDiagnosticVerifier { - public override DiagnosticDescriptor Descriptor { get; } = DiagnosticRules.UnnecessaryConditionalAccess; + public override DiagnosticDescriptor Descriptor { get; } = CodeAnalysisDiagnosticRules.UnnecessaryConditionalAccess; - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.UnnecessaryConditionalAccess)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.UnnecessaryConditionalAccess)] public async Task Test() { await VerifyDiagnosticAndFixAsync(@" diff --git a/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9004CallAnyInsteadOfAccessingCountTests.cs b/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9004CallAnyInsteadOfAccessingCountTests.cs index 1df987c698..21a7cd1ab0 100644 --- a/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9004CallAnyInsteadOfAccessingCountTests.cs +++ b/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9004CallAnyInsteadOfAccessingCountTests.cs @@ -2,17 +2,16 @@ using System.Threading.Tasks; using Microsoft.CodeAnalysis; -using Roslynator.CodeAnalysis.CSharp; using Roslynator.Testing.CSharp; using Xunit; -namespace Roslynator.CSharp.Analysis.Tests; +namespace Roslynator.CodeAnalysis.CSharp.Tests; public class RCS9004CallAnyInsteadOfAccessingCountTests : AbstractCSharpDiagnosticVerifier { - public override DiagnosticDescriptor Descriptor { get; } = DiagnosticRules.CallAnyInsteadOfAccessingCount; + public override DiagnosticDescriptor Descriptor { get; } = CodeAnalysisDiagnosticRules.CallAnyInsteadOfAccessingCount; - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.CallAnyInsteadOfAccessingCount)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.CallAnyInsteadOfAccessingCount)] public async Task Test_SyntaxList_Equals() { await VerifyDiagnosticAndFixAsync(@" @@ -42,7 +41,7 @@ void M() "); } - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.CallAnyInsteadOfAccessingCount)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.CallAnyInsteadOfAccessingCount)] public async Task Test_SyntaxList_Equals2() { await VerifyDiagnosticAndFixAsync(@" @@ -72,7 +71,7 @@ void M() "); } - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.CallAnyInsteadOfAccessingCount)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.CallAnyInsteadOfAccessingCount)] public async Task Test_SyntaxList_NotEquals() { await VerifyDiagnosticAndFixAsync(@" @@ -102,7 +101,7 @@ void M() "); } - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.CallAnyInsteadOfAccessingCount)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.CallAnyInsteadOfAccessingCount)] public async Task Test_SyntaxList_GreaterThan() { await VerifyDiagnosticAndFixAsync(@" @@ -132,7 +131,7 @@ void M() "); } - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.CallAnyInsteadOfAccessingCount)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.CallAnyInsteadOfAccessingCount)] public async Task Test_SeparatedSyntaxList_GreaterThan() { await VerifyDiagnosticAndFixAsync(@" @@ -162,7 +161,7 @@ void M() "); } - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.CallAnyInsteadOfAccessingCount)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.CallAnyInsteadOfAccessingCount)] public async Task Test_SyntaxTokenList_GreaterThan() { await VerifyDiagnosticAndFixAsync(@" @@ -192,7 +191,7 @@ void M() "); } - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.CallAnyInsteadOfAccessingCount)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.CallAnyInsteadOfAccessingCount)] public async Task Test_SyntaxTriviaList_GreaterThan() { await VerifyDiagnosticAndFixAsync(@" @@ -222,7 +221,7 @@ void M() "); } - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.CallAnyInsteadOfAccessingCount)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.CallAnyInsteadOfAccessingCount)] public async Task Test_ChildSyntaxList_GreaterThan() { await VerifyDiagnosticAndFixAsync(@" @@ -252,7 +251,7 @@ void M() "); } - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.CallAnyInsteadOfAccessingCount)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.CallAnyInsteadOfAccessingCount)] public async Task Test_SyntaxNodeOrTokenList_GreaterThan() { await VerifyDiagnosticAndFixAsync(@" @@ -282,7 +281,7 @@ void M() "); } - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.CallAnyInsteadOfAccessingCount)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.CallAnyInsteadOfAccessingCount)] public async Task TestNoDiagnostic_LessThanExpression() { await VerifyNoDiagnosticAsync(@" @@ -300,7 +299,7 @@ void M() "); } - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.CallAnyInsteadOfAccessingCount)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.CallAnyInsteadOfAccessingCount)] public async Task TestNoDiagnostic_NotNumericLiteralExpression() { await VerifyNoDiagnosticAsync(@" @@ -319,7 +318,7 @@ void M() "); } - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.CallAnyInsteadOfAccessingCount)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.CallAnyInsteadOfAccessingCount)] public async Task TestNoDiagnostic_NotZeroNumericLiteralExpression() { await VerifyNoDiagnosticAsync(@" @@ -337,7 +336,7 @@ void M() "); } - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.CallAnyInsteadOfAccessingCount)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.CallAnyInsteadOfAccessingCount)] public async Task TestNoDiagnostic_NotSyntaxList() { await VerifyNoDiagnosticAsync(@" diff --git a/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9005UnnecessaryNullCheckTests.cs b/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9005UnnecessaryNullCheckTests.cs index e36595048f..72a778a283 100644 --- a/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9005UnnecessaryNullCheckTests.cs +++ b/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9005UnnecessaryNullCheckTests.cs @@ -2,17 +2,16 @@ using System.Threading.Tasks; using Microsoft.CodeAnalysis; -using Roslynator.CodeAnalysis.CSharp; using Roslynator.Testing.CSharp; using Xunit; -namespace Roslynator.CSharp.Analysis.Tests; +namespace Roslynator.CodeAnalysis.CSharp.Tests; public class RCS9005UnnecessaryNullCheckTests : AbstractCSharpDiagnosticVerifier { - public override DiagnosticDescriptor Descriptor { get; } = DiagnosticRules.UnnecessaryNullCheck; + public override DiagnosticDescriptor Descriptor { get; } = CodeAnalysisDiagnosticRules.UnnecessaryNullCheck; - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.UnnecessaryNullCheck)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.UnnecessaryNullCheck)] public async Task Test() { await VerifyDiagnosticAndFixAsync(@" @@ -44,7 +43,7 @@ void M() "); } - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.UnnecessaryNullCheck)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.UnnecessaryNullCheck)] public async Task TestNoDiagnostic_ExpressionsAreNotEquivalent() { await VerifyNoDiagnosticAsync(@" diff --git a/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9006UseElementAccessTests.cs b/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9006UseElementAccessTests.cs index a6a9cfdb46..1d3c9aa72d 100644 --- a/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9006UseElementAccessTests.cs +++ b/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9006UseElementAccessTests.cs @@ -2,17 +2,16 @@ using System.Threading.Tasks; using Microsoft.CodeAnalysis; -using Roslynator.CodeAnalysis.CSharp; using Roslynator.Testing.CSharp; using Xunit; -namespace Roslynator.CSharp.Analysis.Tests; +namespace Roslynator.CodeAnalysis.CSharp.Tests; public class RCS9006UseElementAccessTests : AbstractCSharpDiagnosticVerifier { - public override DiagnosticDescriptor Descriptor { get; } = DiagnosticRules.UseElementAccess; + public override DiagnosticDescriptor Descriptor { get; } = CodeAnalysisDiagnosticRules.UseElementAccess; - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.UseElementAccess)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.UseElementAccess)] public async Task Test_SyntaxList_First() { await VerifyDiagnosticAndFixAsync(@" @@ -42,7 +41,7 @@ void M() "); } - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.UseElementAccess)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.UseElementAccess)] public async Task Test_SyntaxList_First_Multiline() { await VerifyDiagnosticAndFixAsync(@" @@ -73,7 +72,7 @@ void M() "); } - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.UseElementAccess)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.UseElementAccess)] public async Task Test_SyntaxTriviaList_ElementAt() { await VerifyDiagnosticAndFixAsync(@" @@ -103,7 +102,7 @@ void M() "); } - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.UseElementAccess)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.UseElementAccess)] public async Task TestNoDiagnostic_FirstWithPredicate() { await VerifyNoDiagnosticAsync(@" @@ -122,7 +121,7 @@ void M() "); } - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.UseElementAccess)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.UseElementAccess)] public async Task TestNoDiagnostic_NotSyntaxList() { await VerifyNoDiagnosticAsync(@" @@ -142,7 +141,7 @@ void M() "); } - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.UseElementAccess)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.UseElementAccess)] public async Task TestNoDiagnostic_TrailingTrivia() { await VerifyNoDiagnosticAsync(@" diff --git a/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9007UseReturnValueTests.cs b/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9007UseReturnValueTests.cs index f8801f9ea9..925424a2f3 100644 --- a/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9007UseReturnValueTests.cs +++ b/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9007UseReturnValueTests.cs @@ -2,17 +2,16 @@ using System.Threading.Tasks; using Microsoft.CodeAnalysis; -using Roslynator.CodeAnalysis.CSharp; using Roslynator.Testing.CSharp; using Xunit; -namespace Roslynator.CSharp.Analysis.Tests; +namespace Roslynator.CodeAnalysis.CSharp.Tests; public class RCS9007UseReturnValueTests : AbstractCSharpDiagnosticVerifier { - public override DiagnosticDescriptor Descriptor { get; } = DiagnosticRules.UseReturnValue; + public override DiagnosticDescriptor Descriptor { get; } = CodeAnalysisDiagnosticRules.UseReturnValue; - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.UseReturnValue)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.UseReturnValue)] public async Task Test() { await VerifyDiagnosticAndFixAsync(@" diff --git a/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9008CallLastInsteadOfUsingElementAccessTests.cs b/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9008CallLastInsteadOfUsingElementAccessTests.cs index 24e1a3fbb9..7f604d6a42 100644 --- a/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9008CallLastInsteadOfUsingElementAccessTests.cs +++ b/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9008CallLastInsteadOfUsingElementAccessTests.cs @@ -2,17 +2,16 @@ using System.Threading.Tasks; using Microsoft.CodeAnalysis; -using Roslynator.CodeAnalysis.CSharp; using Roslynator.Testing.CSharp; using Xunit; -namespace Roslynator.CSharp.Analysis.Tests; +namespace Roslynator.CodeAnalysis.CSharp.Tests; public class RCS9008CallLastInsteadOfUsingElementAccessTests : AbstractCSharpDiagnosticVerifier { - public override DiagnosticDescriptor Descriptor { get; } = DiagnosticRules.CallLastInsteadOfUsingElementAccess; + public override DiagnosticDescriptor Descriptor { get; } = CodeAnalysisDiagnosticRules.CallLastInsteadOfUsingElementAccess; - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.CallLastInsteadOfUsingElementAccess)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.CallLastInsteadOfUsingElementAccess)] public async Task Test_SyntaxList() { await VerifyDiagnosticAndFixAsync(@" @@ -42,7 +41,7 @@ void M() "); } - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.CallLastInsteadOfUsingElementAccess)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.CallLastInsteadOfUsingElementAccess)] public async Task Test_SeparatedSyntaxList() { await VerifyDiagnosticAndFixAsync(@" @@ -72,7 +71,7 @@ void M() "); } - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.CallLastInsteadOfUsingElementAccess)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.CallLastInsteadOfUsingElementAccess)] public async Task Test_SyntaxTokenList() { await VerifyDiagnosticAndFixAsync(@" @@ -102,7 +101,7 @@ void M() "); } - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.CallLastInsteadOfUsingElementAccess)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.CallLastInsteadOfUsingElementAccess)] public async Task Test_SyntaxTriviaList() { await VerifyDiagnosticAndFixAsync(@" @@ -132,7 +131,7 @@ void M() "); } - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.CallLastInsteadOfUsingElementAccess)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.CallLastInsteadOfUsingElementAccess)] public async Task Test_ChildSyntaxList() { await VerifyDiagnosticAndFixAsync(@" @@ -162,7 +161,7 @@ void M() "); } - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.CallLastInsteadOfUsingElementAccess)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.CallLastInsteadOfUsingElementAccess)] public async Task Test_SyntaxNodeOrTokenList() { await VerifyDiagnosticAndFixAsync(@" @@ -192,7 +191,7 @@ void M() "); } - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.CallLastInsteadOfUsingElementAccess)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.CallLastInsteadOfUsingElementAccess)] public async Task TestNoDiagnostic_NotLastElement() { await VerifyNoDiagnosticAsync(@" @@ -210,7 +209,7 @@ void M() "); } - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.CallLastInsteadOfUsingElementAccess)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.CallLastInsteadOfUsingElementAccess)] public async Task TestNoDiagnostic_ExpressionsAreNotEquivalent() { await VerifyNoDiagnosticAsync(@" diff --git a/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9009UnknownLanguageNameTests.cs b/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9009UnknownLanguageNameTests.cs index 6c599b5606..ad123a0360 100644 --- a/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9009UnknownLanguageNameTests.cs +++ b/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9009UnknownLanguageNameTests.cs @@ -2,17 +2,16 @@ using System.Threading.Tasks; using Microsoft.CodeAnalysis; -using Roslynator.CodeAnalysis.CSharp; using Roslynator.Testing.CSharp; using Xunit; -namespace Roslynator.CSharp.Analysis.Tests; +namespace Roslynator.CodeAnalysis.CSharp.Tests; public class RCS9009UnknownLanguageNameTests : AbstractCSharpDiagnosticVerifier { - public override DiagnosticDescriptor Descriptor { get; } = DiagnosticRules.UnknownLanguageName; + public override DiagnosticDescriptor Descriptor { get; } = CodeAnalysisDiagnosticRules.UnknownLanguageName; - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.UnknownLanguageName)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.UnknownLanguageName)] public async Task Test_DiagnosticAnalyzer() { await VerifyDiagnosticAndFixAsync(""" @@ -31,10 +30,10 @@ abstract class C : DiagnosticAnalyzer abstract class C : DiagnosticAnalyzer { } -""", equivalenceKey: EquivalenceKey.Create(DiagnosticIdentifiers.UnknownLanguageName, "C#")); +""", equivalenceKey: EquivalenceKey.Create(CodeAnalysisDiagnosticIdentifiers.UnknownLanguageName, "C#")); } - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.UnknownLanguageName)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.UnknownLanguageName)] public async Task Test_DiagnosticAnalyzer_ParamArray() { await VerifyDiagnosticAndFixAsync(""" @@ -53,10 +52,10 @@ abstract class C : DiagnosticAnalyzer abstract class C : DiagnosticAnalyzer { } -""", equivalenceKey: EquivalenceKey.Create(DiagnosticIdentifiers.UnknownLanguageName, "C#")); +""", equivalenceKey: EquivalenceKey.Create(CodeAnalysisDiagnosticIdentifiers.UnknownLanguageName, "C#")); } - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.UnknownLanguageName)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.UnknownLanguageName)] public async Task Test_CodeFixProvider() { await VerifyDiagnosticAndFixAsync(""" @@ -75,10 +74,10 @@ abstract class C : CodeFixProvider abstract class C : CodeFixProvider { } -""", equivalenceKey: EquivalenceKey.Create(DiagnosticIdentifiers.UnknownLanguageName, "C#")); +""", equivalenceKey: EquivalenceKey.Create(CodeAnalysisDiagnosticIdentifiers.UnknownLanguageName, "C#")); } - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.UnknownLanguageName)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.UnknownLanguageName)] public async Task Test_CodeRefactoringProvider() { await VerifyDiagnosticAndFixAsync(""" @@ -97,10 +96,10 @@ abstract class C : CodeRefactoringProvider abstract class C : CodeRefactoringProvider { } -""", equivalenceKey: EquivalenceKey.Create(DiagnosticIdentifiers.UnknownLanguageName, "C#")); +""", equivalenceKey: EquivalenceKey.Create(CodeAnalysisDiagnosticIdentifiers.UnknownLanguageName, "C#")); } - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.UnknownLanguageName)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.UnknownLanguageName)] public async Task TestNoDiagnostic() { await VerifyNoDiagnosticAsync(@" diff --git a/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9010SpecifyExportCodeRefactoringProviderAttributeNameTests.cs b/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9010SpecifyExportCodeRefactoringProviderAttributeNameTests.cs index 5073aa7573..21deb688dc 100644 --- a/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9010SpecifyExportCodeRefactoringProviderAttributeNameTests.cs +++ b/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9010SpecifyExportCodeRefactoringProviderAttributeNameTests.cs @@ -2,17 +2,16 @@ using System.Threading.Tasks; using Microsoft.CodeAnalysis; -using Roslynator.CodeAnalysis.CSharp; using Roslynator.Testing.CSharp; using Xunit; -namespace Roslynator.CSharp.Analysis.Tests; +namespace Roslynator.CodeAnalysis.CSharp.Tests; public class RCS9010SpecifyExportCodeRefactoringProviderAttributeNameTests : AbstractCSharpDiagnosticVerifier { - public override DiagnosticDescriptor Descriptor { get; } = DiagnosticRules.SpecifyExportCodeRefactoringProviderAttributeName; + public override DiagnosticDescriptor Descriptor { get; } = CodeAnalysisDiagnosticRules.SpecifyExportCodeRefactoringProviderAttributeName; - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.SpecifyExportCodeRefactoringProviderAttributeName)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.SpecifyExportCodeRefactoringProviderAttributeName)] public async Task Test() { await VerifyDiagnosticAndFixAsync(@" diff --git a/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9011SpecifyExportCodeFixProviderAttributeNameTests.cs b/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9011SpecifyExportCodeFixProviderAttributeNameTests.cs index feaffd7fb9..40fdc9a216 100644 --- a/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9011SpecifyExportCodeFixProviderAttributeNameTests.cs +++ b/src/Tests/CodeAnalysis.Analyzers.Tests/RCS9011SpecifyExportCodeFixProviderAttributeNameTests.cs @@ -2,17 +2,16 @@ using System.Threading.Tasks; using Microsoft.CodeAnalysis; -using Roslynator.CodeAnalysis.CSharp; using Roslynator.Testing.CSharp; using Xunit; -namespace Roslynator.CSharp.Analysis.Tests; +namespace Roslynator.CodeAnalysis.CSharp.Tests; public class RCS9011SpecifyExportCodeFixProviderAttributeNameTests : AbstractCSharpDiagnosticVerifier { - public override DiagnosticDescriptor Descriptor { get; } = DiagnosticRules.SpecifyExportCodeFixProviderAttributeName; + public override DiagnosticDescriptor Descriptor { get; } = CodeAnalysisDiagnosticRules.SpecifyExportCodeFixProviderAttributeName; - [Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.SpecifyExportCodeFixProviderAttributeName)] + [Fact, Trait(Traits.Analyzer, CodeAnalysisDiagnosticIdentifiers.SpecifyExportCodeFixProviderAttributeName)] public async Task Test() { await VerifyDiagnosticAndFixAsync(@" diff --git a/src/Tests/TestConsole/Program.cs b/src/Tests/TestConsole/Program.cs index 268088f903..440390d04e 100644 --- a/src/Tests/TestConsole/Program.cs +++ b/src/Tests/TestConsole/Program.cs @@ -5,13 +5,11 @@ #region usings using System; using System.Collections.Generic; -using System.Collections.Immutable; using System.Linq; using System.Runtime.InteropServices; using System.Threading.Tasks; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; -using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Text; #endregion usings diff --git a/src/Tools/CodeGeneration/CSharp/CompilerDiagnosticIdentifiersGenerator.cs b/src/Tools/CodeGeneration/CSharp/CompilerDiagnosticIdentifiersGenerator.cs index 4580e5ecf2..4198996e4a 100644 --- a/src/Tools/CodeGeneration/CSharp/CompilerDiagnosticIdentifiersGenerator.cs +++ b/src/Tools/CodeGeneration/CSharp/CompilerDiagnosticIdentifiersGenerator.cs @@ -5,7 +5,6 @@ using Microsoft.CodeAnalysis.CSharp.Syntax; using Roslynator.CSharp; using Roslynator.Metadata; -using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory; using static Roslynator.CSharp.CSharpFactory; namespace Roslynator.CodeGeneration.CSharp; diff --git a/src/Tools/CodeGeneration/CSharp/DiagnosticIdentifiersGenerator.cs b/src/Tools/CodeGeneration/CSharp/DiagnosticIdentifiersGenerator.cs index d351670b29..074ab9142e 100644 --- a/src/Tools/CodeGeneration/CSharp/DiagnosticIdentifiersGenerator.cs +++ b/src/Tools/CodeGeneration/CSharp/DiagnosticIdentifiersGenerator.cs @@ -5,7 +5,6 @@ using Microsoft.CodeAnalysis.CSharp.Syntax; using Roslynator.CSharp; using Roslynator.Metadata; -using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory; using static Roslynator.CSharp.CSharpFactory; namespace Roslynator.CodeGeneration.CSharp; diff --git a/src/Tools/CodeGeneration/CSharp/DiagnosticRulesGenerator.cs b/src/Tools/CodeGeneration/CSharp/DiagnosticRulesGenerator.cs index 7b1b131303..4e22766de1 100644 --- a/src/Tools/CodeGeneration/CSharp/DiagnosticRulesGenerator.cs +++ b/src/Tools/CodeGeneration/CSharp/DiagnosticRulesGenerator.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Linq; using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Roslynator.CSharp; using Roslynator.Documentation; @@ -150,7 +149,7 @@ private FieldDeclarationSyntax CreateMember( NameColon("customTags"), (analyzer.SupportsFadeOut) ? SimpleMemberAccessExpression(IdentifierName("WellKnownDiagnosticTags"), IdentifierName(WellKnownDiagnosticTags.Unnecessary)) - : ParseExpression("Array.Empty()")) + : CollectionExpression()) ))) .AddObsoleteAttributeIf(analyzer.Status == AnalyzerStatus.Disabled, error: true); diff --git a/src/Tools/CodeGeneration/CodeGenerationHelpers.cs b/src/Tools/CodeGeneration/CodeGenerationHelpers.cs index 9b42b19279..bf68cceb1c 100644 --- a/src/Tools/CodeGeneration/CodeGenerationHelpers.cs +++ b/src/Tools/CodeGeneration/CodeGenerationHelpers.cs @@ -4,7 +4,6 @@ using System.IO; using System.Text; using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory; diff --git a/src/Tools/CodeGenerator/Program.cs b/src/Tools/CodeGenerator/Program.cs index 08f479e8df..577f574115 100644 --- a/src/Tools/CodeGenerator/Program.cs +++ b/src/Tools/CodeGenerator/Program.cs @@ -6,7 +6,6 @@ using System.IO; using System.Linq; using System.Text; -using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; using Roslynator.CodeGeneration; using Roslynator.CodeGeneration.CSharp; @@ -38,66 +37,64 @@ private static void Main(string[] args) ImmutableArray options = metadata.ConfigOptions; WriteCompilationUnit( - @"Refactorings\CSharp\RefactoringDescriptors.Generated.cs", + "Refactorings/CSharp/RefactoringDescriptors.Generated.cs", RefactoringDescriptorsGenerator.Generate(refactorings.Where(f => !f.IsObsolete), comparer: comparer)); WriteCompilationUnit( - @"Refactorings\CSharp\RefactoringIdentifiers.Generated.cs", + "Refactorings/CSharp/RefactoringIdentifiers.Generated.cs", RefactoringIdentifiersGenerator.Generate(refactorings, obsolete: false, comparer: comparer)); WriteCompilationUnit( - @"VisualStudio\RefactoringsOptionsPage.Generated.cs", + "VisualStudio/RefactoringsOptionsPage.Generated.cs", RefactoringsOptionsPageGenerator.Generate(refactorings.Where(f => !f.IsObsolete), comparer)); - WriteDiagnostics(@"Analyzers\CSharp", metadata.CommonAnalyzers, @namespace: "Roslynator.CSharp", categoryName: nameof(DiagnosticCategories.Roslynator)); + WriteDiagnostics("Common", metadata.CommonAnalyzers.Concat(metadata.FormattingAnalyzers), @namespace: "Roslynator", categoryName: nameof(DiagnosticCategories.Roslynator), descriptorsClassName: "DiagnosticRules", identifiersClassName: "DiagnosticIdentifiers"); - WriteDiagnostics(@"CodeAnalysis.Analyzers\CSharp", metadata.CodeAnalysisAnalyzers, @namespace: "Roslynator.CodeAnalysis.CSharp", categoryName: nameof(DiagnosticCategories.Roslynator)); - - WriteDiagnostics(@"Formatting.Analyzers\CSharp", metadata.FormattingAnalyzers, @namespace: "Roslynator.Formatting.CSharp", categoryName: nameof(DiagnosticCategories.Roslynator)); + WriteDiagnostics("Common/CodeAnalysis", metadata.CodeAnalysisAnalyzers, @namespace: "Roslynator.CodeAnalysis", categoryName: nameof(DiagnosticCategories.Roslynator), descriptorsClassName: "CodeAnalysisDiagnosticRules", identifiersClassName: "CodeAnalysisDiagnosticIdentifiers"); WriteCompilationUnit( - @"CodeFixes\CSharp\CompilerDiagnosticRules.Generated.cs", + "CodeFixes/CSharp/CompilerDiagnosticRules.Generated.cs", CompilerDiagnosticRulesGenerator.Generate(compilerDiagnostics, comparer: comparer, @namespace: "Roslynator.CSharp"), normalizeWhitespace: false); WriteCompilationUnit( - @"CodeFixes\CSharp\CodeFixDescriptors.Generated.cs", + "CodeFixes/CSharp/CodeFixDescriptors.Generated.cs", CodeFixDescriptorsGenerator.Generate(codeFixes.Where(f => !f.IsObsolete), comparer: comparer, @namespace: "Roslynator.CSharp"), normalizeWhitespace: false); WriteCompilationUnit( - @"CodeFixes\CSharp\CodeFixIdentifiers.Generated.cs", + "CodeFixes/CSharp/CodeFixIdentifiers.Generated.cs", CodeFixIdentifiersGenerator.Generate(codeFixes, comparer)); WriteCompilationUnit( - @"VisualStudio\CodeFixesOptionsPage.Generated.cs", + "VisualStudio/CodeFixesOptionsPage.Generated.cs", CodeFixesOptionsPageGenerator.Generate()); WriteCompilationUnit( - @"CSharp\CSharp\CompilerDiagnosticIdentifiers.Generated.cs", + "CSharp/CSharp/CompilerDiagnosticIdentifiers.Generated.cs", CompilerDiagnosticIdentifiersGenerator.Generate(compilerDiagnostics, comparer)); WriteCompilationUnit( - @"Common\ConfigOptions.Generated.cs", + "Common/ConfigOptions.Generated.cs", Roslynator.CodeGeneration.CSharp.CodeGenerator.GenerateConfigOptions(options, metadata.Analyzers), normalizeWhitespace: false); WriteCompilationUnit( - @"Common\LegacyConfigOptions.Generated.cs", + "Common/LegacyConfigOptions.Generated.cs", Roslynator.CodeGeneration.CSharp.CodeGenerator.GenerateLegacyConfigOptions(metadata.Analyzers)); WriteCompilationUnit( - @"Common\ConfigOptionKeys.Generated.cs", + "Common/ConfigOptionKeys.Generated.cs", Roslynator.CodeGeneration.CSharp.CodeGenerator.GenerateConfigOptionKeys(options), normalizeWhitespace: false); WriteCompilationUnit( - @"Common\ConfigOptionValues.Generated.cs", + "Common/ConfigOptionValues.Generated.cs", Roslynator.CodeGeneration.CSharp.CodeGenerator.GenerateConfigOptionValues(options), normalizeWhitespace: false); File.WriteAllText( - Path.Combine(rootPath, @"VisualStudioCode\package\src\configurationFiles.generated.ts"), + Path.Combine(rootPath, "VisualStudioCode/package/src/configurationFiles.generated.ts"), @"export const configurationFileContent = { roslynatorconfig: `" + EditorConfigCodeAnalysisConfig.FileDefaultContent @@ -119,8 +116,8 @@ void WriteDiagnostics( IEnumerable analyzers, string @namespace, string categoryName, - string descriptorsClassName = "DiagnosticRules", - string identifiersClassName = "DiagnosticIdentifiers") + string descriptorsClassName, + string identifiersClassName) { WriteCompilationUnit( Path.Combine(dirPath, $"{descriptorsClassName}.Generated.cs"), diff --git a/src/Tools/MetadataGenerator/Program.cs b/src/Tools/MetadataGenerator/Program.cs index 224da448e9..b58c6cde48 100644 --- a/src/Tools/MetadataGenerator/Program.cs +++ b/src/Tools/MetadataGenerator/Program.cs @@ -6,12 +6,10 @@ using System.Diagnostics; using System.IO; using System.Linq; -using System.Reflection; using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; using DotMarkdown.Docusaurus; -using Microsoft.CodeAnalysis; using Roslynator.CodeGeneration; using Roslynator.CodeGeneration.Markdown; using Roslynator.Metadata; diff --git a/src/Workspaces.Common/CSharp/Refactorings/ConvertInterpolatedStringToStringBuilderMethodRefactoring.cs b/src/Workspaces.Common/CSharp/Refactorings/ConvertInterpolatedStringToStringBuilderMethodRefactoring.cs index 80fe1a8b81..5a5b38d0ec 100644 --- a/src/Workspaces.Common/CSharp/Refactorings/ConvertInterpolatedStringToStringBuilderMethodRefactoring.cs +++ b/src/Workspaces.Common/CSharp/Refactorings/ConvertInterpolatedStringToStringBuilderMethodRefactoring.cs @@ -8,7 +8,6 @@ using Microsoft.CodeAnalysis.CSharp.Syntax; using Roslynator.Text; using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory; -using static Roslynator.CSharp.CSharpFactory; namespace Roslynator.CSharp.Refactorings; diff --git a/src/Workspaces.Core/Extensions/Extensions.cs b/src/Workspaces.Core/Extensions/Extensions.cs index e592468fd7..1b1003a33a 100644 --- a/src/Workspaces.Core/Extensions/Extensions.cs +++ b/src/Workspaces.Core/Extensions/Extensions.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; -using System.Collections.Immutable; using System.Diagnostics; using System.Linq; using System.Threading; diff --git a/src/Workspaces.Core/Host/Mef/MefHostServices.cs b/src/Workspaces.Core/Host/Mef/MefHostServices.cs index bc4e5096c0..3a9fee7d12 100644 --- a/src/Workspaces.Core/Host/Mef/MefHostServices.cs +++ b/src/Workspaces.Core/Host/Mef/MefHostServices.cs @@ -9,7 +9,6 @@ using System.Reflection; using System.Text.RegularExpressions; using System.Threading; -using Microsoft.CodeAnalysis; namespace Roslynator.Host.Mef; diff --git a/src/Workspaces.Core/Logging/LogHelpers.cs b/src/Workspaces.Core/Logging/LogHelpers.cs index 2adfc217a3..09f95f7dd8 100644 --- a/src/Workspaces.Core/Logging/LogHelpers.cs +++ b/src/Workspaces.Core/Logging/LogHelpers.cs @@ -11,7 +11,6 @@ using Microsoft.CodeAnalysis.Diagnostics; using Microsoft.CodeAnalysis.Text; using Roslynator.Spelling; -using Roslynator.Text; using static Roslynator.Logger; namespace Roslynator; diff --git a/src/Workspaces.Core/Spelling/Core/WordCharMap.cs b/src/Workspaces.Core/Spelling/Core/WordCharMap.cs index fcc000b4b7..cb3d19161f 100644 --- a/src/Workspaces.Core/Spelling/Core/WordCharMap.cs +++ b/src/Workspaces.Core/Spelling/Core/WordCharMap.cs @@ -1,6 +1,5 @@ // This code is originally from https://github.com/josefpihrt/orang. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using System; using System.Collections.Immutable; using System.Linq; diff --git a/tools/generate_code.ps1 b/tools/generate_code.ps1 index 6d3ec38b36..a4a219de0c 100644 --- a/tools/generate_code.ps1 +++ b/tools/generate_code.ps1 @@ -3,4 +3,4 @@ dotnet build "$PSScriptRoot/../src/Tools/Tools.sln" --no-restore /p:Configuratio if(!$?) { Read-Host; Exit } -dotnet "$PSScriptRoot/../src/Tools/CodeGenerator/bin/Release/net7.0/Roslynator.CodeGenerator.dll" "../src" +dotnet "$PSScriptRoot/../src/Tools/CodeGenerator/bin/Release/net8.0/Roslynator.CodeGenerator.dll" "../src" diff --git a/tools/generate_configuration_file.ps1 b/tools/generate_configuration_file.ps1 index 8c49c87362..ca16681201 100644 --- a/tools/generate_configuration_file.ps1 +++ b/tools/generate_configuration_file.ps1 @@ -3,7 +3,7 @@ dotnet build "$PSScriptRoot/../src/Tools/ConfigurationFileGenerator/Configuratio if(!$?) { Read-Host; Exit } -dotnet "$PSScriptRoot/../src/Tools/ConfigurationFileGenerator/bin/Release/net7.0/Roslynator.ConfigurationFileGenerator.dll" ` +dotnet "$PSScriptRoot/../src/Tools/ConfigurationFileGenerator/bin/Release/net8.0/Roslynator.ConfigurationFileGenerator.dll" ` "../src" ` "$PSScriptRoot/../src/Tools/ConfigurationFileGenerator/configuration.md" ` "build/configuration.md" diff --git a/tools/generate_metadata.ps1 b/tools/generate_metadata.ps1 index 440e87a602..0a0dc50964 100644 --- a/tools/generate_metadata.ps1 +++ b/tools/generate_metadata.ps1 @@ -3,4 +3,4 @@ dotnet build "$PSScriptRoot/../src/Tools/Tools.sln" --no-restore /p:"Configurati if(!$?) { Read-Host; Exit } -& "$PSScriptRoot/../src/Tools/MetadataGenerator/bin/Release/net7.0/Roslynator.MetadataGenerator" "../src" "build" +& "$PSScriptRoot/../src/Tools/MetadataGenerator/bin/Release/net8.0/Roslynator.MetadataGenerator" "../src" "build"