From feeccd3201eb1729c53fc336337c24eb519b51c4 Mon Sep 17 00:00:00 2001 From: manishv Date: Tue, 6 May 2014 15:24:48 -0700 Subject: [PATCH] Address code review feeedback for changeset 1251270 (Add "CustomTags" property to DiagnosticDescriptor and Diagnostic types) (changeset 1251448) --- Src/Compilers/Core/Source/CodeAnalysis.csproj | 1 + .../Diagnostic/TriggerDiagnosticDescriptor.cs | 22 +++++++++++++++++++ .../Diagnostic/WellKnownDiagnosticTags.cs | 8 ------- 3 files changed, 23 insertions(+), 8 deletions(-) create mode 100644 Src/Compilers/Core/Source/Diagnostic/TriggerDiagnosticDescriptor.cs diff --git a/Src/Compilers/Core/Source/CodeAnalysis.csproj b/Src/Compilers/Core/Source/CodeAnalysis.csproj index 1881bb7efcb..9181f9344ba 100644 --- a/Src/Compilers/Core/Source/CodeAnalysis.csproj +++ b/Src/Compilers/Core/Source/CodeAnalysis.csproj @@ -141,6 +141,7 @@ + diff --git a/Src/Compilers/Core/Source/Diagnostic/TriggerDiagnosticDescriptor.cs b/Src/Compilers/Core/Source/Diagnostic/TriggerDiagnosticDescriptor.cs new file mode 100644 index 00000000000..ed25d497cb2 --- /dev/null +++ b/Src/Compilers/Core/Source/Diagnostic/TriggerDiagnosticDescriptor.cs @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +namespace Microsoft.CodeAnalysis +{ + /// + /// Provides a description about a that is a trigger for some custom behavior for code analyis clients. + /// + public class TriggerDiagnosticDescriptor : DiagnosticDescriptor + { + public static string TriggerCategory = "TriggerDiagnostic"; + + /// + /// Create a TriggerDiagnosticDescriptor, which provides description about a that is a trigger for some custom behavior for code analyis clients. + /// + /// A unique identifier for the diagnostic. For example, code analysis diagnostic ID "CA1001". + /// Optional custom tags for the diagnostic. See for some well known tags. + public TriggerDiagnosticDescriptor(string id, params string[] customTags) + : base (id, description: "", messageFormat: "", category: TriggerCategory, defaultSeverity: DiagnosticSeverity.Hidden, isEnabledByDefault: true, customTags: customTags) + { + } + } +} diff --git a/Src/Compilers/Core/Source/Diagnostic/WellKnownDiagnosticTags.cs b/Src/Compilers/Core/Source/Diagnostic/WellKnownDiagnosticTags.cs index 4ea27dff13c..47880c8d6ba 100644 --- a/Src/Compilers/Core/Source/Diagnostic/WellKnownDiagnosticTags.cs +++ b/Src/Compilers/Core/Source/Diagnostic/WellKnownDiagnosticTags.cs @@ -2,14 +2,6 @@ { public static class WellKnownDiagnosticTags { - /// - /// Indicates that the diagnostic cannot be suppressed and its default severity cannot be escalated. - /// - /// - /// Visual Studio Ruleset Editor doesn't display diagnostics with this tag as such diagnostics cannot be configured in the Ruleset Editor. - /// - public const string CannotBeSuppressedOrEscalated = "CannotBeSuppressedOrEscalated"; - /// /// Indicates that the diagnostic is related to some unnecessary source code. /// -- GitLab