[Analyzers] Resolve StyleCop issues: SA1516 and SA1616 (#34853)

* [Analyzers][AdvancedPaste] Apply fix for SA1516

* [Analyzers][EnvironmentVariables] Apply fix for SA1516

* [Analyzers][RegistryPreview] Apply fix for SA1516

* [Analyzers][Peek] Apply fix for SA1516

* [Analyzers][PreviewPane] Apply fix for SA1516

* [Analyzers][FancyZones] Apply fix for SA1516

* [Analyzers][PT Run][Plugins] Apply fix for SA1516

* [Analyzers][PT Run] Apply fix for SA1516

* [Analyzers][PT Run][Wox] Apply fix for SA1516

* [Analyzers][Common] Apply fix for SA1516

* [Analyzers][ImageResizer] Apply fix for SA1516

* [Analyzers][ColorPicker] Apply fix for SA1516

* [Analyzers][MouseUtils] Apply fix for SA1516

* [Analyzers][DSC Schema Generator] Apply fix for SA1516

* [Analyzers][FileLocksmith] Apply fix for SA1516

* [Analyzers][Hosts] Apply fix for SA1516

* [Analyzers][MeasureTool] Apply fix for SA1516

* [Analyzers][MouseWithoutBorders] Apply fix for SA1516

* [Analyzers][TextExtractor] Apply fix for SA1516

* [Analyzers][Workspaces] Apply fix for SA1516

* [Analyzers][Awake] Apply fix for SA1516

* [Analyzers][PowerAccent] Apply fix for SA1516

* [Analyzers][RegistryPreview] Apply fix for SA1516

* [Analyzers][Settings] Apply fix for SA1516

* [Analyzers][MouseWithoutBorders] Apply fix for SA1616
This commit is contained in:
Jeremy Sinclair
2024-09-16 16:09:43 -04:00
committed by GitHub
parent 0f16951f23
commit 37f2154c86
635 changed files with 690 additions and 1 deletions

View File

@@ -16,6 +16,7 @@ using System.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using Microsoft.PowerToys.Telemetry;
// <summary>
@@ -28,6 +29,7 @@ using Microsoft.PowerToys.Telemetry;
// </history>
using MouseWithoutBorders.Class;
using MouseWithoutBorders.Exceptions;
using SystemClipboard = System.Windows.Forms.Clipboard;
namespace MouseWithoutBorders

View File

@@ -8,6 +8,7 @@ using System.Globalization;
using System.IO;
using System.Threading;
using System.Windows.Forms;
using Microsoft.PowerToys.Telemetry;
// <summary>

View File

@@ -22,6 +22,7 @@ using System.Windows.Forms;
// </history>
using Microsoft.Win32;
using MouseWithoutBorders.Class;
using static System.Windows.Forms.Control;
namespace MouseWithoutBorders

View File

@@ -10,6 +10,7 @@ using System.Globalization;
using System.Linq;
using System.Threading;
using System.Windows.Forms;
using Microsoft.PowerToys.Telemetry;
// <summary>

View File

@@ -4,6 +4,7 @@
using System;
using System.Diagnostics;
using ManagedCommon;
namespace MouseWithoutBorders

View File

@@ -17,6 +17,7 @@ using System.Security.Cryptography;
using System.Text;
using System.Threading;
using System.Windows.Forms;
using Microsoft.PowerToys.Settings.UI.Library;
// <summary>

View File

@@ -16,12 +16,14 @@ using System.Security.Principal;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using Microsoft.VisualStudio.Threading;
using Newtonsoft.Json;
using StreamJsonRpc;
#if !MM_HELPER
using MouseWithoutBorders.Class;
#endif
using SystemClipboard = System.Windows.Forms.Clipboard;

View File

@@ -17,6 +17,7 @@ using System.Globalization;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Windows.Forms;
using Microsoft.PowerToys.Settings.UI.Library;
[module: SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Scope = "member", Target = "MouseWithoutBorders.InputHook.#MouseHookProc(System.Int32,System.Int32,System.IntPtr)", Justification = "Dotnet port with style preservation")]

View File

@@ -15,8 +15,10 @@ using System.Globalization;
using System.Runtime.InteropServices;
using System.ServiceProcess;
using System.Threading.Tasks;
using Microsoft.PowerToys.Settings.UI.Library;
using Windows.UI.Input.Preview.Injection;
using static MouseWithoutBorders.Class.NativeMethods;
[module: SuppressMessage("Microsoft.Portability", "CA1901:PInvokeDeclarationsShouldBePortable", Scope = "member", Target = "MouseWithoutBorders.InputSimulation.#keybd_event(System.Byte,System.Byte,System.UInt32,System.Int32)", MessageId = "3", Justification = "Dotnet port with style preservation")]

View File

@@ -932,7 +932,7 @@ namespace MouseWithoutBorders.Class
/// <summary>
/// Use this method to figure out if your code is running on a Microsoft computer.
/// </summary>
/// <returns></returns>
/// <returns>True if running on a Microsoft computer, otherwise false.</returns>
internal static bool IsRunningAtMicrosoft()
{
string domain = GetDNSDomain();

View File

@@ -27,6 +27,7 @@ using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml.Linq;
using ManagedCommon;
using Microsoft.PowerToys.Settings.UI.Library.Utilities;
using Microsoft.PowerToys.Telemetry;

View File

@@ -15,6 +15,7 @@ using System.Security.Cryptography;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using System.Windows.Forms;
using global::PowerToys.GPOWrapper;
using Microsoft.PowerToys.Settings.UI.Library;
using Microsoft.PowerToys.Settings.UI.Library.Utilities;

View File

@@ -5,6 +5,7 @@
using System;
using System.Drawing;
using System.Windows.Forms;
using MouseWithoutBorders.Form.Settings;
namespace MouseWithoutBorders

View File

@@ -4,6 +4,7 @@
using System;
using System.Windows.Forms;
using MouseWithoutBorders.Class;
using MouseWithoutBorders.Form.Settings;

View File

@@ -4,6 +4,7 @@
using System.Globalization;
using System.Text.RegularExpressions;
using MouseWithoutBorders.Class;
namespace MouseWithoutBorders

View File

@@ -5,6 +5,7 @@
using System;
using System.Drawing;
using System.Windows.Forms;
using MouseWithoutBorders.Class;
using MouseWithoutBorders.Properties;

View File

@@ -3,6 +3,7 @@
// See the LICENSE file in the project root for more information.
using System;
using MouseWithoutBorders.Class;
namespace MouseWithoutBorders

View File

@@ -9,6 +9,7 @@ using System.Drawing;
using System.Globalization;
using System.Text.RegularExpressions;
using System.Windows.Forms;
using Microsoft.PowerToys.Telemetry;
// <summary>
@@ -20,6 +21,7 @@ using Microsoft.PowerToys.Telemetry;
// 2023- Included in PowerToys.
// </history>
using MouseWithoutBorders.Class;
using Timer = System.Windows.Forms.Timer;
[module: SuppressMessage("Microsoft.Globalization", "CA1300:SpecifyMessageBoxOptions", Scope = "member", Target = "MouseWithoutBorders.frmMatrix.#buttonOK_Click(System.Object,System.EventArgs)", Justification = "Dotnet port with style preservation")]

View File

@@ -4,6 +4,7 @@
using System;
using System.Windows.Forms;
using MouseWithoutBorders.Class;
namespace MouseWithoutBorders

View File

@@ -10,6 +10,7 @@ using System.Drawing;
using System.Globalization;
using System.IO;
using System.Windows.Forms;
using Microsoft.PowerToys.Telemetry;
// <summary>
@@ -22,6 +23,7 @@ using Microsoft.PowerToys.Telemetry;
// </history>
using MouseWithoutBorders.Class;
using MouseWithoutBorders.Properties;
using Timer = System.Windows.Forms.Timer;
[module: SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Scope = "member", Target = "MouseWithoutBorders.frmScreen.#ShowMouseWithoutBordersUiOnWinLogonDesktop(System.Boolean)", Justification = "Dotnet port with style preservation")]

View File

@@ -6,6 +6,7 @@ using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.Windows.Forms;
using static MouseWithoutBorders.NativeMethods;
namespace MouseWithoutBorders

View File

@@ -6,6 +6,7 @@ using System;
using System.Diagnostics;
using System.IO;
using System.Windows.Forms;
using ManagedCommon;
namespace MouseWithoutBorders

View File

@@ -3,6 +3,7 @@
// See the LICENSE file in the project root for more information.
using System.Diagnostics;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;

View File

@@ -10,6 +10,7 @@ using System.ServiceProcess;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;

View File

@@ -3,6 +3,7 @@
// See the LICENSE file in the project root for more information.
using System.Diagnostics.Tracing;
using Microsoft.PowerToys.Telemetry;
using Microsoft.PowerToys.Telemetry.Events;

View File

@@ -3,6 +3,7 @@
// See the LICENSE file in the project root for more information.
using System.Diagnostics.Tracing;
using Microsoft.PowerToys.Telemetry;
using Microsoft.PowerToys.Telemetry.Events;

View File

@@ -3,6 +3,7 @@
// See the LICENSE file in the project root for more information.
using System.Diagnostics.Tracing;
using Microsoft.PowerToys.Telemetry;
using Microsoft.PowerToys.Telemetry.Events;

View File

@@ -3,6 +3,7 @@
// See the LICENSE file in the project root for more information.
using System.Diagnostics.Tracing;
using Microsoft.PowerToys.Telemetry;
using Microsoft.PowerToys.Telemetry.Events;

View File

@@ -3,6 +3,7 @@
// See the LICENSE file in the project root for more information.
using System.Diagnostics.Tracing;
using Microsoft.PowerToys.Telemetry;
using Microsoft.PowerToys.Telemetry.Events;

View File

@@ -3,6 +3,7 @@
// See the LICENSE file in the project root for more information.
using System.Diagnostics.Tracing;
using Microsoft.PowerToys.Telemetry;
using Microsoft.PowerToys.Telemetry.Events;

View File

@@ -3,6 +3,7 @@
// See the LICENSE file in the project root for more information.
using System.Diagnostics.Tracing;
using Microsoft.PowerToys.Telemetry;
using Microsoft.PowerToys.Telemetry.Events;