[PowerToys Run] Plugins StyleCop and warnings fix (#12623)

This commit is contained in:
Davide Giacometti
2021-08-11 17:22:30 +02:00
committed by GitHub
parent 7ea1f26209
commit 1791246a79
25 changed files with 251 additions and 128 deletions

View File

@@ -26,7 +26,7 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<WarningLevel>4</WarningLevel>
<Optimize>false</Optimize>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -39,6 +39,7 @@
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>

View File

@@ -1,5 +1,7 @@
using System;
using System.Collections.Generic;
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Globalization;
using System.Linq;
using System.Text.RegularExpressions;

View File

@@ -1,13 +1,15 @@
using System;
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading;
using System.Windows;
using System.Windows.Input;
using ManagedCommon;
using UnitsNet;
using Wox.Plugin;
namespace Community.PowerToys.Run.Plugin.UnitConverter
@@ -142,7 +144,7 @@ namespace Community.PowerToys.Run.Plugin.UnitConverter
return Properties.Resources.plugin_description;
}
private void OnThemeChanged(Theme _, Theme newTheme)
private void OnThemeChanged(Theme currentTheme, Theme newTheme)
{
UpdateIconPath(newTheme);
}

View File

@@ -1,4 +1,8 @@
using UnitsNet;
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using UnitsNet;
namespace Community.PowerToys.Run.Plugin.UnitConverter
{

View File

@@ -1,4 +1,8 @@
using System;
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;