mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
[PTRun][WebSearch] Enable analyzer and fix warnings (#16938)
This commit is contained in:
committed by
GitHub
parent
3b04cfd267
commit
ffdb5d44d7
@@ -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'">
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ namespace Community.PowerToys.Run.Plugin.WebSearch
|
|||||||
{
|
{
|
||||||
if (input.EndsWith(":", StringComparison.OrdinalIgnoreCase)
|
if (input.EndsWith(":", StringComparison.OrdinalIgnoreCase)
|
||||||
&& !input.StartsWith("http", StringComparison.OrdinalIgnoreCase)
|
&& !input.StartsWith("http", StringComparison.OrdinalIgnoreCase)
|
||||||
&& !input.Contains("/", StringComparison.OrdinalIgnoreCase)
|
&& !input.Contains('/', StringComparison.OrdinalIgnoreCase)
|
||||||
&& !input.All(char.IsDigit)
|
&& !input.All(char.IsDigit)
|
||||||
&& System.Text.RegularExpressions.Regex.IsMatch(input, @"^([a-z][a-z0-9+\-.]*):"))
|
&& System.Text.RegularExpressions.Regex.IsMatch(input, @"^([a-z][a-z0-9+\-.]*):"))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user