mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 09:46:54 +02:00
[Wox.Plugin] Enable analyzer and fix warnings (#16547)
This commit is contained in:
committed by
GitHub
parent
9cf39654d9
commit
ec3ea5c4ae
@@ -187,7 +187,7 @@ namespace Wox.Plugin.Common
|
||||
|
||||
if (string.IsNullOrEmpty(Path))
|
||||
{
|
||||
throw new Exception("Browser path is null or empty.");
|
||||
throw new ArgumentOutOfRangeException(nameof(Path), "Browser path is null or empty.");
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -217,7 +217,7 @@ namespace Wox.Plugin.Common
|
||||
return stringBuilder.ToString();
|
||||
}
|
||||
|
||||
throw new Exception("Could not load indirect string.");
|
||||
throw new ArgumentNullException(nameof(Path), "Could not load indirect string.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -801,9 +801,9 @@ namespace Wox.Plugin.Common.Win32
|
||||
return !r1.Equals(r2);
|
||||
}
|
||||
|
||||
public bool Equals(RECT r)
|
||||
public bool Equals(RECT other)
|
||||
{
|
||||
return r.Left == Left && r.Top == Top && r.Right == Right && r.Bottom == Bottom;
|
||||
return other.Left == Left && other.Top == Top && other.Right == Right && other.Bottom == Bottom;
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace Wox.Plugin
|
||||
{
|
||||
if (obj == null)
|
||||
{
|
||||
throw new NullReferenceException();
|
||||
throw new ArgumentNullException(nameof(obj));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
|
||||
<Platforms>x64</Platforms>
|
||||
<NeutralLanguage>en-US</NeutralLanguage>
|
||||
<EnableNETAnalyzers>true</EnableNETAnalyzers>
|
||||
<AnalysisMode>Recommended</AnalysisMode>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user