Skip to content

Commit

Permalink
Supress regex warning
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrstenke committed Jan 4, 2025
1 parent 0deed52 commit 811a3b8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/GenerateAnalyzerReleases/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

internal static class Program
{
#pragma warning disable SYSLIB1045 // Convert to 'GeneratedRegexAttribute'.
private static readonly Regex _categoryRegex = new(@"category\s*:\s*""\s*([\w.]+)\s*""", RegexOptions.Singleline);
private static readonly Regex _diagnosticAttributeRegex = new(@"\[assembly\s*:\s*DiagnosticFiles\s*\(\s*(.*?)\]", RegexOptions.Singleline);
private static readonly Regex _diagnosticAttributeValueRegex = new(@"\s*(?:nameof\s*\(\s*(\w+)\s*\)|"".*?"")", RegexOptions.Singleline);
Expand All @@ -15,6 +16,7 @@ internal static class Program
private static readonly Regex _packageRegex = new(@"DurianPackage\s*\.\s*(\w+)\s*,", RegexOptions.Singleline);
private static readonly Regex _severityRegex = new(@"defaultSeverity\s*:\s*DiagnosticSeverity\s*.\s*(\w+)", RegexOptions.Singleline);
private static readonly Regex _titleRegex = new(@"title\s*:\s*""\s*(.*?)\s*""", RegexOptions.Singleline);
#pragma warning restore SYSLIB1045 // Convert to 'GeneratedRegexAttribute'.

internal static void Main(string[] args)
{
Expand Down

0 comments on commit 811a3b8

Please sign in to comment.