mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
[Microsoft.Plugin.Indexer] Enable analyzer and fix warnings (#16544)
This commit is contained in:
committed by
GitHub
parent
57bc924d8d
commit
efd14d8611
@@ -13,6 +13,8 @@
|
|||||||
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
|
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
|
||||||
<Platforms>x64</Platforms>
|
<Platforms>x64</Platforms>
|
||||||
<NeutralLanguage>en-US</NeutralLanguage>
|
<NeutralLanguage>en-US</NeutralLanguage>
|
||||||
|
<EnableNETAnalyzers>true</EnableNETAnalyzers>
|
||||||
|
<AnalysisMode>Recommended</AnalysisMode>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ namespace Microsoft.Plugin.Indexer.SearchHelper
|
|||||||
pattern = pattern.Replace("*", "%", StringComparison.Ordinal);
|
pattern = pattern.Replace("*", "%", StringComparison.Ordinal);
|
||||||
pattern = pattern.Replace("?", "_", StringComparison.Ordinal);
|
pattern = pattern.Replace("?", "_", StringComparison.Ordinal);
|
||||||
|
|
||||||
if (pattern.Contains("%", StringComparison.Ordinal) || pattern.Contains("_", StringComparison.Ordinal))
|
if (pattern.Contains('%', StringComparison.Ordinal) || pattern.Contains('_', StringComparison.Ordinal))
|
||||||
{
|
{
|
||||||
queryHelper.QueryWhereRestrictions += " AND System.FileName LIKE '" + pattern + "' ";
|
queryHelper.QueryWhereRestrictions += " AND System.FileName LIKE '" + pattern + "' ";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user