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;

View File

@@ -11,7 +11,9 @@
"name": "Some projects are incompatible with .NET Core"
},
"visibility": {
"statusPage": true
"cliSummaryTable": true,
"statusPage": true,
"telemetry": true
}
}
{
@@ -27,6 +29,8 @@
"name": "Some projects or solutions failed to build using MSBuild"
},
"visibility": {
"statusPage": true
"cliSummaryTable": true,
"statusPage": true,
"telemetry": true
}
}

View File

@@ -11,7 +11,9 @@
"name": "Some projects or solutions failed to build using MSBuild"
},
"visibility": {
"statusPage": true
"cliSummaryTable": true,
"statusPage": true,
"telemetry": true
}
}
{
@@ -27,6 +29,8 @@
"name": "Missing project files"
},
"visibility": {
"statusPage": true
"cliSummaryTable": true,
"statusPage": true,
"telemetry": true
}
}

View File

@@ -11,7 +11,9 @@
"name": "Some projects or solutions failed to build using .NET Core"
},
"visibility": {
"statusPage": true
"cliSummaryTable": true,
"statusPage": true,
"telemetry": true
}
}
{
@@ -27,7 +29,9 @@
"name": "Some projects or solutions failed to build using MSBuild"
},
"visibility": {
"statusPage": true
"cliSummaryTable": true,
"statusPage": true,
"telemetry": true
}
}
{
@@ -43,6 +47,8 @@
"name": "Missing Xamarin SDK for iOS"
},
"visibility": {
"statusPage": true
"cliSummaryTable": true,
"statusPage": true,
"telemetry": true
}
}

View File

@@ -11,7 +11,9 @@
"name": "Unable to build project using build script"
},
"visibility": {
"statusPage": true
"cliSummaryTable": true,
"statusPage": true,
"telemetry": true
}
}
{
@@ -27,6 +29,8 @@
"name": "No project or solutions files found"
},
"visibility": {
"statusPage": true
"cliSummaryTable": true,
"statusPage": true,
"telemetry": true
}
}

View File

@@ -11,7 +11,9 @@
"name": "No project or solutions files found"
},
"visibility": {
"statusPage": true
"cliSummaryTable": true,
"statusPage": true,
"telemetry": true
}
}
{
@@ -27,6 +29,8 @@
"name": "There are multiple potential build scripts"
},
"visibility": {
"statusPage": true
"cliSummaryTable": true,
"statusPage": true,
"telemetry": true
}
}

View File

@@ -11,7 +11,9 @@
"name": "Unable to build project using build script"
},
"visibility": {
"statusPage": true
"cliSummaryTable": true,
"statusPage": true,
"telemetry": true
}
}
{
@@ -27,6 +29,8 @@
"name": "No project or solutions files found"
},
"visibility": {
"statusPage": true
"cliSummaryTable": true,
"statusPage": true,
"telemetry": true
}
}

View File

@@ -11,7 +11,9 @@
"name": "No project or solutions files found"
},
"visibility": {
"statusPage": true
"cliSummaryTable": true,
"statusPage": true,
"telemetry": true
}
}
{
@@ -27,6 +29,8 @@
"name": "There are multiple potential build scripts"
},
"visibility": {
"statusPage": true
"cliSummaryTable": true,
"statusPage": true,
"telemetry": true
}
}