Skip to content

Commit 219bf01

Browse files
committed
Refactor helpers to clearly distinguish Workspace dependencies
* Helper classes which depend on Microsoft.CodeAnalysis.Workspaces are located in the WorkspaceHelpers namespace. * Helper classes which do not depend on Microsoft.CodeAnalysis.Workspaces are located in other namespaces.
1 parent 3938c68 commit 219bf01

83 files changed

Lines changed: 155 additions & 137 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/FileHeaderCodeFixProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ namespace StyleCop.Analyzers.DocumentationRules
66
using System;
77
using System.Collections.Immutable;
88
using System.Composition;
9-
using System.Linq;
109
using System.Text;
1110
using System.Threading;
1211
using System.Threading.Tasks;
@@ -19,6 +18,7 @@ namespace StyleCop.Analyzers.DocumentationRules
1918
using Microsoft.CodeAnalysis.Formatting;
2019
using StyleCop.Analyzers.Helpers;
2120
using StyleCop.Analyzers.Settings.ObjectModel;
21+
using WorkspaceHelpers;
2222

2323
/// <summary>
2424
/// Implements a code fix for file header diagnostics.

StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/InheritdocCodeFixProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace StyleCop.Analyzers.DocumentationRules
1414
using Microsoft.CodeAnalysis.CSharp;
1515
using Microsoft.CodeAnalysis.CSharp.Syntax;
1616
using Microsoft.CodeAnalysis.Formatting;
17-
using SpacingRules;
17+
using WorkspaceHelpers;
1818

1919
/// <summary>
2020
/// Implements a code fix that will generate a documentation comment comprised of an empty

StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1609SA1610CodeFixProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ namespace StyleCop.Analyzers.DocumentationRules
1616
using Microsoft.CodeAnalysis.CSharp.Syntax;
1717
using Microsoft.CodeAnalysis.Formatting;
1818
using StyleCop.Analyzers.Helpers;
19-
using StyleCop.Analyzers.SpacingRules;
19+
using WorkspaceHelpers;
2020

2121
/// <summary>
2222
/// Implements a code fix for <see cref="SA1609PropertyDocumentationMustHaveValue"/> and

StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1615SA1616CodeFixProvider.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ namespace StyleCop.Analyzers.DocumentationRules
1717
using Microsoft.CodeAnalysis.Formatting;
1818
using Microsoft.CodeAnalysis.Simplification;
1919
using StyleCop.Analyzers.Helpers;
20+
using WorkspaceHelpers;
2021

2122
/// <summary>
2223
/// Implements a code fix for <see cref="SA1615ElementReturnValueMustBeDocumented"/> and

StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1617CodeFixProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ namespace StyleCop.Analyzers.DocumentationRules
66
using System.Collections.Generic;
77
using System.Collections.Immutable;
88
using System.Composition;
9-
using System.Linq;
109
using System.Threading;
1110
using System.Threading.Tasks;
1211
using Microsoft.CodeAnalysis;
1312
using Microsoft.CodeAnalysis.CodeActions;
1413
using Microsoft.CodeAnalysis.CodeFixes;
1514
using Microsoft.CodeAnalysis.CSharp.Syntax;
1615
using StyleCop.Analyzers.Helpers;
16+
using WorkspaceHelpers;
1717

1818
/// <summary>
1919
/// Implements a code fix for <see cref="SA1617VoidReturnValueMustNotBeDocumented"/>.

StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1626CodeFixProvider.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ namespace StyleCop.Analyzers.DocumentationRules
1313
using Microsoft.CodeAnalysis.CodeFixes;
1414
using Microsoft.CodeAnalysis.Text;
1515
using StyleCop.Analyzers.Helpers;
16+
using WorkspaceHelpers;
1617

1718
/// <summary>
1819
/// Implements a code fix for <see cref="SA1626CodeFixProvider"/>.

StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1642SA1643CodeFixProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ namespace StyleCop.Analyzers.DocumentationRules
1616
using Microsoft.CodeAnalysis.CSharp;
1717
using Microsoft.CodeAnalysis.CSharp.Syntax;
1818
using Microsoft.CodeAnalysis.Formatting;
19-
using SpacingRules;
19+
using WorkspaceHelpers;
2020

2121
/// <summary>
2222
/// Implements a code fix for <see cref="SA1642ConstructorSummaryDocumentationMustBeginWithStandardText"/>

StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1651CodeFixProvider.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,15 @@
33

44
namespace StyleCop.Analyzers.DocumentationRules
55
{
6-
using System;
76
using System.Collections.Immutable;
87
using System.Composition;
9-
using System.Linq;
108
using System.Threading;
119
using System.Threading.Tasks;
12-
using Helpers;
1310
using Microsoft.CodeAnalysis;
1411
using Microsoft.CodeAnalysis.CodeActions;
1512
using Microsoft.CodeAnalysis.CodeFixes;
1613
using Microsoft.CodeAnalysis.CSharp.Syntax;
14+
using WorkspaceHelpers;
1715

1816
/// <summary>
1917
/// Implements a code fix for <see cref="SA1651DoNotUsePlaceholderElements"/>.

StyleCop.Analyzers/StyleCop.Analyzers/OrderingRules/ElementOrderingChecks.cs renamed to StyleCop.Analyzers/StyleCop.Analyzers/Helpers/ElementOrderingChecks.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
22
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
33

4-
namespace StyleCop.Analyzers.OrderingRules
4+
namespace StyleCop.Analyzers.Helpers
55
{
66
using Microsoft.CodeAnalysis;
7-
using StyleCop.Analyzers.Helpers;
7+
using OrderingRules;
88

99
/// <summary>
1010
/// Contains information about enabled element order rules.

StyleCop.Analyzers/StyleCop.Analyzers/OrderingRules/MemberOrderHelper.cs renamed to StyleCop.Analyzers/StyleCop.Analyzers/Helpers/MemberOrderHelper.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
22
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
33

4-
namespace StyleCop.Analyzers.OrderingRules
4+
namespace StyleCop.Analyzers.Helpers
55
{
66
using System;
77
using System.Collections.Immutable;
88
using Microsoft.CodeAnalysis;
99
using Microsoft.CodeAnalysis.CSharp;
1010
using Microsoft.CodeAnalysis.CSharp.Syntax;
11-
using StyleCop.Analyzers.Helpers;
1211

1312
/// <summary>
1413
/// Helper for dealing with member priority.

0 commit comments

Comments
 (0)