Skip to content

Commit 7855779

Browse files
committed
Move CA1031 from global to local suppression
1 parent 0d1004a commit 7855779

File tree

9 files changed

+8
-1
lines changed

9 files changed

+8
-1
lines changed

.editorconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,6 @@ dotnet_diagnostic.S1135.severity = suggestion # https://github.com/atc-net
505505

506506
dotnet_diagnostic.IDE0057.severity = none # Substring can be simplified
507507

508-
dotnet_diagnostic.CA1031.severity = none # Do not catch general exception types
509508
dotnet_diagnostic.CA1054.severity = none # URI parameters should not be strings
510509
dotnet_diagnostic.CA1848.severity = none # For improved performance, use the LoggerMessage delegates instead of calling 'LoggerExtensions.LogTrace(ILogger, string, params object[])'
511510
dotnet_diagnostic.CA2007.severity = none # Consider calling ConfigureAwait on the awaited task

src/Atc.CodingRules.Updater.CLI/Commands/AnalyzerProvidersCacheCleanupCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
namespace Atc.CodingRules.Updater.CLI.Commands;
22

3+
[SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "OK.")]
34
public class AnalyzerProvidersCacheCleanupCommand : Command
45
{
56
private readonly ILogger<AnalyzerProvidersCacheCleanupCommand> logger;

src/Atc.CodingRules.Updater.CLI/Commands/AnalyzerProvidersCollectCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ public override Task<int> ExecuteAsync(
1717
return ExecuteInternalAsync(settings);
1818
}
1919

20+
[SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "OK.")]
2021
private async Task<int> ExecuteInternalAsync(
2122
AnalyzerProvidersCollectCommandSettings settings)
2223
{

src/Atc.CodingRules.Updater.CLI/Commands/OptionsFileCreateCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ public override Task<int> ExecuteAsync(
1414
return ExecuteInternalAsync(settings);
1515
}
1616

17+
[SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "OK.")]
1718
private async Task<int> ExecuteInternalAsync(
1819
ProjectCommandSettings settings)
1920
{

src/Atc.CodingRules.Updater.CLI/Commands/OptionsFileValidateCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public override Task<int> ExecuteAsync(
1515
return ExecuteInternalAsync(settings);
1616
}
1717

18+
[SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "OK.")]
1819
private async Task<int> ExecuteInternalAsync(
1920
ProjectBaseCommandSettings settings)
2021
{

src/Atc.CodingRules.Updater.CLI/Commands/RootCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
namespace Atc.CodingRules.Updater.CLI.Commands;
22

3+
[SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "OK.")]
34
[SuppressMessage("Globalization", "CA1303:Do not pass literals as localized parameters", Justification = "OK.")]
45
public class RootCommand : AsyncCommand<RootCommandSettings>
56
{

src/Atc.CodingRules.Updater.CLI/Commands/RunCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ public override Task<int> ExecuteAsync(
1717
return ExecuteInternalAsync(settings);
1818
}
1919

20+
[SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "OK.")]
2021
private async Task<int> ExecuteInternalAsync(
2122
RunCommandSettings settings)
2223
{

src/Atc.CodingRules.Updater.CLI/Commands/SanityCheckCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ public override Task<int> ExecuteAsync(
1717
return ExecuteInternalAsync(settings);
1818
}
1919

20+
[SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "OK.")]
2021
private async Task<int> ExecuteInternalAsync(
2122
ProjectCommandSettings settings)
2223
{

src/Atc.CodingRules/AtcApiNugetClientHelper.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ public static class AtcApiNugetClientHelper
55
private const string BaseAddress = "https://atc-api.azurewebsites.net/nuget-search";
66
private static readonly ConcurrentDictionary<string, Version> Cache = new (StringComparer.Ordinal);
77

8+
[SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "OK.")]
89
public static Version? GetLatestVersionForPackageId(
910
string packageId,
1011
CancellationToken cancellationToken = default)

0 commit comments

Comments
 (0)