Merge pull request #12371 from github/mbg/csharp/increase-diagnostic-visibility

C#: Make diagnostics visible everywhere
This commit is contained in:
Michael B. Gale
2023-03-07 12:13:09 +00:00
committed by GitHub
8 changed files with 52 additions and 16 deletions

View File

@@ -57,6 +57,12 @@ namespace Semmle.Util
/// </summary>
public class TspVisibility
{
/// <summary>
/// A read-only instance of <see cref="TspVisibility" /> which indicates that the
/// diagnostic should be used in all supported locations.
/// </summary>
public static readonly TspVisibility All = new(true, true, true);
/// <summary>
/// True if the message should be displayed on the status page (defaults to false).
/// </summary>
@@ -166,7 +172,7 @@ namespace Semmle.Util
this.HelpLinks = new List<string>();
this.Attributes = new Dictionary<string, object>();
this.Severity = severity;
this.Visibility = visibility ?? new TspVisibility(statusPage: true);
this.Visibility = visibility ?? TspVisibility.All;
this.Location = location ?? new TspLocation();
this.Internal = intrnl ?? false;
this.MarkdownMessage = markdownMessage;