mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 19:57:57 +01:00
[PTRun][Registry] Enable analyzer and fix warnings (#16941)
This commit is contained in:
committed by
GitHub
parent
b1b1f1ba21
commit
94391775c8
@@ -167,7 +167,7 @@ namespace Microsoft.PowerToys.Run.Plugin.Registry.Helper
|
||||
continue;
|
||||
}
|
||||
|
||||
if (string.Equals(subKey, searchSubKey, StringComparison.InvariantCultureIgnoreCase))
|
||||
if (string.Equals(subKey, searchSubKey, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
var key = parentKey.OpenSubKey(subKey, RegistryKeyPermissionCheck.ReadSubTree);
|
||||
if (key != null)
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace Microsoft.PowerToys.Run.Plugin.Registry.Helper
|
||||
|
||||
if (unformattedValue == null)
|
||||
{
|
||||
throw new NullReferenceException(nameof(unformattedValue));
|
||||
throw new InvalidOperationException($"Cannot proceed when {nameof(unformattedValue)} is null.");
|
||||
}
|
||||
|
||||
var valueData = key.GetValueKind(valueName) switch
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
<NeutralLanguage>en-US</NeutralLanguage>
|
||||
<LangVersion>8.0</LangVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<EnableNETAnalyzers>true</EnableNETAnalyzers>
|
||||
<AnalysisMode>Recommended</AnalysisMode>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
|
||||
Reference in New Issue
Block a user