Skip to content

Commit 195c6f5

Browse files
[Analyzers] Resolve Stylecop SA1516 violations and others to enable fully building on VS 17.12 (#35248)
* [Analyzers][Settings] Fix SA1516 * [Analyzers][Workspaces] Fix SA1516 * [Analyzers][Awake] Fix SA1516 * [Analyzers][Wox] Fix SA1516 * [MWB] Disable CA1716 warning on class name * [Wox] Update ExecuteFilePath property visibility for Json Source Generator * [Analyzers][MWB] Fix CA1716 on NativeMethods. --------- Co-authored-by: Jaime Bernardo <[email protected]>
1 parent d51ca9f commit 195c6f5

File tree

190 files changed

+199
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

190 files changed

+199
-1
lines changed

src/modules/MouseWithoutBorders/App/Class/Extensions.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
using System.Diagnostics;
77
using System.IO;
88

9+
// Disable the warning to preserve original code
10+
#pragma warning disable CA1716
911
namespace MouseWithoutBorders.Class
12+
#pragma warning restore CA1716
1013
{
1114
internal static class Extensions
1215
{

src/modules/MouseWithoutBorders/App/Class/NativeMethods.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@
3636
[module: SuppressMessage("Microsoft.Portability", "CA1901:PInvokeDeclarationsShouldBePortable", Scope = "member", Target = "MouseWithoutBorders.NativeMethods.#GetAsyncKeyState(System.IntPtr)", MessageId = "0", Justification = "Dotnet port with style preservation")]
3737
[module: SuppressMessage("Microsoft.Portability", "CA1901:PInvokeDeclarationsShouldBePortable", Scope = "member", Target = "MouseWithoutBorders.NativeMethods.#GetAsyncKeyState(System.IntPtr)", MessageId = "return", Justification = "Dotnet port with style preservation")]
3838

39+
// Disable the warning to preserve original code
40+
#pragma warning disable CA1716
3941
namespace MouseWithoutBorders.Class
42+
#pragma warning restore CA1716
4043
{
4144
internal partial class NativeMethods
4245
{

src/modules/Workspaces/WorkspacesLauncherUI/App.xaml.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using System.Globalization;
77
using System.Threading;
88
using System.Windows;
9+
910
using Common.UI;
1011
using ManagedCommon;
1112
using PowerToys.Interop;

src/modules/Workspaces/WorkspacesLauncherUI/Data/AppLaunchData.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
// See the LICENSE file in the project root for more information.
44

55
using System.Text.Json.Serialization;
6+
67
using Workspaces.Data;
8+
79
using static WorkspacesLauncherUI.Data.AppLaunchData;
810
using static WorkspacesLauncherUI.Data.AppLaunchInfosData;
911

src/modules/Workspaces/WorkspacesLauncherUI/Data/AppLaunchInfoData.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// See the LICENSE file in the project root for more information.
44

55
using System.Text.Json.Serialization;
6+
67
using Workspaces.Data;
78

89
using static WorkspacesLauncherUI.Data.AppLaunchInfoData;

src/modules/Workspaces/WorkspacesLauncherUI/Models/AppLaunching.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
using System.Text.RegularExpressions;
1414
using System.Windows.Media;
1515
using System.Windows.Media.Imaging;
16+
1617
using ManagedCommon;
1718
using Windows.Management.Deployment;
1819
using WorkspacesLauncherUI.Data;

src/modules/Workspaces/WorkspacesLauncherUI/ViewModels/MainViewModel.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using System.Collections.ObjectModel;
88
using System.ComponentModel;
99
using System.Diagnostics;
10+
1011
using ManagedCommon;
1112
using WorkspacesLauncherUI.Data;
1213
using WorkspacesLauncherUI.Models;

src/modules/awake/Awake/Core/Manager.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
using System.Text;
1515
using System.Text.Json;
1616
using System.Threading;
17+
1718
using Awake.Core.Models;
1819
using Awake.Core.Native;
1920
using Awake.Properties;

src/modules/awake/Awake/Core/Threading/SingleThreadSynchronizationContext.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System;
66
using System.Collections.Generic;
77
using System.Threading;
8+
89
using ManagedCommon;
910

1011
namespace Awake.Core.Threading

src/modules/awake/Awake/Core/TrayHelper.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
using System.Linq;
1010
using System.Runtime.InteropServices;
1111
using System.Threading;
12+
1213
using Awake.Core.Models;
1314
using Awake.Core.Native;
1415
using Awake.Core.Threading;

0 commit comments

Comments
 (0)