From a29348c293e3c71f0bc679c98c25067a85842a51 Mon Sep 17 00:00:00 2001 From: Savpek Date: Mon, 18 Feb 2019 21:00:26 +0200 Subject: [PATCH] Simple version of diagnostic tags. --- .../Models/v1/Diagnostics/DiagnosticLocation.cs | 1 + src/OmniSharp.Roslyn.CSharp/Helpers/DiagnosticExtensions.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/OmniSharp.Abstractions/Models/v1/Diagnostics/DiagnosticLocation.cs b/src/OmniSharp.Abstractions/Models/v1/Diagnostics/DiagnosticLocation.cs index 8ed274166b..b4061747ac 100644 --- a/src/OmniSharp.Abstractions/Models/v1/Diagnostics/DiagnosticLocation.cs +++ b/src/OmniSharp.Abstractions/Models/v1/Diagnostics/DiagnosticLocation.cs @@ -6,6 +6,7 @@ public class DiagnosticLocation : QuickFix { public string LogLevel { get; set; } public string Id { get; set; } + public string[] Tags { get; set; } public override bool Equals(object obj) { diff --git a/src/OmniSharp.Roslyn.CSharp/Helpers/DiagnosticExtensions.cs b/src/OmniSharp.Roslyn.CSharp/Helpers/DiagnosticExtensions.cs index f78467d871..841bffb4ac 100644 --- a/src/OmniSharp.Roslyn.CSharp/Helpers/DiagnosticExtensions.cs +++ b/src/OmniSharp.Roslyn.CSharp/Helpers/DiagnosticExtensions.cs @@ -20,6 +20,7 @@ internal static DiagnosticLocation ToDiagnosticLocation(this Diagnostic diagnost EndColumn = span.EndLinePosition.Character, Text = $"{diagnostic.GetMessage()} ({diagnostic.Id})", LogLevel = diagnostic.Severity.ToString(), + Tags = diagnostic.Descriptor.CustomTags.ToArray(), Id = diagnostic.Id }; }