提交 feeccd32 编写于 作者: M manishv

Address code review feeedback for changeset 1251270 (Add "CustomTags" property...

Address code review feeedback for changeset 1251270 (Add "CustomTags" property to DiagnosticDescriptor and Diagnostic types) (changeset 1251448)
上级 7de79d9b
......@@ -141,6 +141,7 @@
<Compile Include="Diagnostic\CommonDiagnosticComparer.cs" />
<Compile Include="Diagnostic\CommonMessageProvider.cs" />
<Compile Include="Diagnostic\Diagnostic.cs" />
<Compile Include="Diagnostic\TriggerDiagnosticDescriptor.cs" />
<Compile Include="Diagnostic\DiagnosticInfo.DiagnosticInfoWithOverridenSeverity.cs" />
<Compile Include="Diagnostic\WellKnownDiagnosticTags.cs" />
<Compile Include="Diagnostic\Diagnostic_SimpleDiagnostic.cs" />
......
// 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
{
/// <summary>
/// Provides a description about a <see cref="Diagnostic"/> that is a trigger for some custom behavior for code analyis clients.
/// </summary>
public class TriggerDiagnosticDescriptor : DiagnosticDescriptor
{
public static string TriggerCategory = "TriggerDiagnostic";
/// <summary>
/// Create a TriggerDiagnosticDescriptor, which provides description about a <see cref="Diagnostic"/> that is a trigger for some custom behavior for code analyis clients.
/// </summary>
/// <param name="id">A unique identifier for the diagnostic. For example, code analysis diagnostic ID "CA1001".</param>
/// <param name="customTags">Optional custom tags for the diagnostic. See <see cref="WellKnownDiagnosticTags"/> for some well known tags.</param>
public TriggerDiagnosticDescriptor(string id, params string[] customTags)
: base (id, description: "", messageFormat: "", category: TriggerCategory, defaultSeverity: DiagnosticSeverity.Hidden, isEnabledByDefault: true, customTags: customTags)
{
}
}
}
......@@ -2,14 +2,6 @@
{
public static class WellKnownDiagnosticTags
{
/// <summary>
/// Indicates that the diagnostic cannot be suppressed and its default severity cannot be escalated.
/// </summary>
/// <remarks>
/// Visual Studio Ruleset Editor doesn't display diagnostics with this tag as such diagnostics cannot be configured in the Ruleset Editor.
/// </remarks>
public const string CannotBeSuppressedOrEscalated = "CannotBeSuppressedOrEscalated";
/// <summary>
/// Indicates that the diagnostic is related to some unnecessary source code.
/// </summary>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册