Skip to content

Commit

Permalink
Remove unneccary pragmas to disable warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
axunonb committed Sep 28, 2024
1 parent 10bd904 commit b53c4b6
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 17 deletions.
8 changes: 0 additions & 8 deletions League/Caching/HtmlToPdfConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@

namespace League.Caching;

#pragma warning disable S2083 // reason: False positive due to CancellationToken in GetPdfDataBrowser
#pragma warning disable S2076 // reason: False positive due to CancellationToken in GetPdfDataBrowser
#pragma warning disable CA3003 // reason: False positive due to CancellationToken in GetPdfDataBrowser

/// <summary>
/// The class to create PDF files from HTML content.
/// For converting HTML to PDF, it uses either a Browser command line or <see cref="PuppeteerSharp"/>.
Expand Down Expand Up @@ -195,7 +191,3 @@ public void Dispose()
GC.SuppressFinalize(this);
}
}

#pragma warning restore S2083 // reason: False positive due to CancellationToken in GetPdfDataBrowser
#pragma warning restore S2076 // reason: False positive due to CancellationToken in GetPdfDataBrowser
#pragma warning restore CA3003 // reason: False positive due to CancellationToken in GetPdfDataBrowser
8 changes: 1 addition & 7 deletions League/Caching/ReportSheetCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@

namespace League.Caching;

#pragma warning disable S2083 // reason: False positive due to CancellationToken in GetOrCreatePdf
#pragma warning disable S2076 // reason: False positive due to CancellationToken in GetOrCreatePdf
#pragma warning disable CA3003 // reason: False positive due to CancellationToken in GetOrCreatePdf

/// <summary>
/// Represents a cache for report sheets.
/// </summary>
Expand Down Expand Up @@ -125,6 +121,4 @@ private static string CreateTempPathFolder()
return tempFolder;
}
}
#pragma warning restore CA3003
#pragma warning disable S2076
#pragma warning restore S2083

2 changes: 0 additions & 2 deletions League/Controllers/Match.cs
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,6 @@ private async Task<EnterResultViewModel> GetEnterResultViewModel(MatchEntity mat
: throw new InvalidOperationException($"{nameof(EnterResultViewModel)} could not be initiated");
}

#pragma warning disable S2076 // reason: False positive ReportSheet cannot be injected with malicious code
/// <summary>
/// Gets a match report sheet suitable for a printout,
/// if the match has not already been played.
Expand Down Expand Up @@ -746,7 +745,6 @@ public async Task<IActionResult> ReportSheet(long id, IServiceProvider services,
Response.Clear();
return View(ViewNames.Match.ReportSheet, model);
}
#pragma warning restore S2076 // reason: False positive ReportSheet cannot be injected with malicious code

private void SendFixtureNotification(long matchId)
{
Expand Down

0 comments on commit b53c4b6

Please sign in to comment.