Make diagnostics visible everywhere

This commit is contained in:
Michael B. Gale
2023-03-02 14:53:53 +00:00
parent a1a2d7c469
commit 6c501d15b6
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;