提交 315c5bf0 编写于 作者: M Manish Vasani

Do not export IDE0079 (remove unnecessary suppressions) analyzer in CodeStyle layer

Fixes #47942
This is a special IDE-only analyzer that should not be exported in the CodeStyle NuGet package. We still want to retain the code in the shared analyzer layer to allow different analyzer hosts to be able to explicitly instantiate it and enforce it on command line from the CodeStyle package.
上级 c9977cdb
......@@ -12,7 +12,9 @@
namespace Microsoft.CodeAnalysis.CSharp.RemoveUnnecessarySuppressions
{
#if !CODE_STYLE // Not exported in CodeStyle layer: https://github.com/dotnet/roslyn/issues/47942
[DiagnosticAnalyzer(LanguageNames.CSharp)]
#endif
internal sealed class CSharpRemoveUnnecessaryInlineSuppressionsDiagnosticAnalyzer
: AbstractRemoveUnnecessaryInlineSuppressionsDiagnosticAnalyzer
{
......
......@@ -21,7 +21,9 @@
namespace Microsoft.CodeAnalysis.RemoveUnnecessarySuppressions
{
#if !CODE_STYLE // Not exported in CodeStyle layer: https://github.com/dotnet/roslyn/issues/47942
[ExportCodeFixProvider(LanguageNames.CSharp, LanguageNames.VisualBasic, Name = PredefinedCodeFixProviderNames.RemoveUnnecessaryPragmaSuppressions), Shared]
#endif
internal sealed class RemoveUnnecessaryInlineSuppressionsCodeFixProvider : SyntaxEditorBasedCodeFixProvider
{
[ImportingConstructor]
......
......@@ -10,8 +10,12 @@ Imports Microsoft.CodeAnalysis.VisualBasic.LanguageServices
Namespace Microsoft.CodeAnalysis.VisualBasic.RemoveUnnecessarySuppressions
#If Not CODE_STYLE Then ' Not exported in CodeStyle layer: https://github.com/dotnet/roslyn/issues/47942
<DiagnosticAnalyzer(LanguageNames.VisualBasic)>
Friend NotInheritable Class VisualBasicRemoveUnnecessaryInlineSuppressionsDiagnosticAnalyzer
#Else
Friend NotInheritable Class VisualBasicRemoveUnnecessaryInlineSuppressionsDiagnosticAnalyzer
#End If
Inherits AbstractRemoveUnnecessaryInlineSuppressionsDiagnosticAnalyzer
Protected Overrides ReadOnly Property CompilerErrorCodePrefix As String = "BC"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册