[NetAnalyzers]CA1031 suppressions cleanup (#18706)

This commit is contained in:
Davide Giacometti
2022-06-12 15:11:52 +02:00
committed by GitHub
parent 33072c7ee3
commit b33bc2ecd0
54 changed files with 0 additions and 143 deletions

View File

@@ -37,7 +37,6 @@ namespace PowerLauncher.Plugin
return PluginMetadatas;
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "Suppressing this to enable FxCop. We are logging the exception, and going forward general exceptions should not be caught")]
private static void ParsePluginConfigs(IEnumerable<string> directories)
{
// todo use linq when diable plugin is implemented since parallel.foreach + list is not thread saft
@@ -65,7 +64,6 @@ namespace PowerLauncher.Plugin
}
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "Suppressing this to enable FxCop. We are logging the exception, and going forward general exceptions should not be caught")]
private static PluginMetadata GetPluginMetadata(string pluginDirectory)
{
string configPath = Path.Combine(pluginDirectory, PluginConfigName);

View File

@@ -12,7 +12,6 @@ using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using PowerLauncher.Properties;
using Wox.Infrastructure;
using Wox.Infrastructure.Storage;
using Wox.Plugin;
using Wox.Plugin.Logger;
@@ -135,7 +134,6 @@ namespace PowerLauncher.Plugin
/// <summary>
/// Call initialize for all plugins
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "Suppressing this to enable FxCop. We are logging the exception, and going forward general exceptions should not be caught")]
public static void InitializePlugins(IPublicAPI api)
{
API = api ?? throw new ArgumentNullException(nameof(api));
@@ -165,7 +163,6 @@ namespace PowerLauncher.Plugin
}
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "Suppressing this to enable FxCop. We are logging the exception, and going forward general exceptions should not be caught")]
public static List<Result> QueryForPlugin(PluginPair pair, Query query, bool delayedExecution = false)
{
if (pair == null)
@@ -272,7 +269,6 @@ namespace PowerLauncher.Plugin
return AllPlugins.Where(p => p.Plugin is T);
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "Suppressing this to enable FxCop. We are logging the exception, and going forward general exceptions should not be caught")]
public static List<ContextMenuResult> GetContextMenusForPlugin(Result result)
{
var pluginPair = _contextMenuPlugins.FirstOrDefault(o => o.Metadata.ID == result.PluginID);