From 2872f147f8ee028aca9a942703bf9827c4e8cc3b Mon Sep 17 00:00:00 2001 From: pi1024e <49824824+pi1024e@users.noreply.github.com> Date: Mon, 30 Mar 2020 10:33:32 -0400 Subject: [PATCH] Remove unneeded whitespace (#5162) ## Summary of the Pull Request Every single time a PR is run, there are a bunch of warnings about whitespace in the .cs files, so I ran the code format on those files, without changing their contents, so it won't be flagged anymore. ## References ## PR Checklist * [X] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [X] Tests added/passed ## Detailed Description of the Pull Request / Additional comments ## Validation Steps Performed Ran the code-format utility on the .cs files --- src/cascadia/WpfTerminalControl/NativeMethods.cs | 2 +- .../WpfTerminalControl/TerminalContainer.cs | 4 ++-- .../WpfTerminalControl/TerminalControl.xaml.cs | 2 +- src/host/ft_uia/AccessibilityTests.cs | 2 +- src/host/ft_uia/Common/ShortcutHelper.cs | 2 +- src/host/ft_uia/Elements/TabBase.cs | 2 +- src/host/ft_uia/Elements/Tabs.cs | 2 +- src/host/ft_uia/Elements/ViewportArea.cs | 2 +- src/host/ft_uia/MouseWheelTests.cs | 2 +- src/host/ft_uia/VirtualTerminalTests.cs | 8 ++++---- src/host/ft_uia/WinEventTests.cs | 8 ++++---- src/tools/vtapp/Program.cs | 14 +++++++------- 12 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/cascadia/WpfTerminalControl/NativeMethods.cs b/src/cascadia/WpfTerminalControl/NativeMethods.cs index 9273ca031..447ef3f45 100644 --- a/src/cascadia/WpfTerminalControl/NativeMethods.cs +++ b/src/cascadia/WpfTerminalControl/NativeMethods.cs @@ -38,7 +38,7 @@ namespace Microsoft.Terminal.Wpf WM_MOUSEACTIVATE = 0x0021, WM_GETOBJECT = 0x003D, - + /// /// The WM_WINDOWPOSCHANGED message is sent to a window whose size, position, or place in the Z order has changed as a result of a call to the SetWindowPos function or another window-management function. /// diff --git a/src/cascadia/WpfTerminalControl/TerminalContainer.cs b/src/cascadia/WpfTerminalControl/TerminalContainer.cs index e87a66101..c84d844b0 100644 --- a/src/cascadia/WpfTerminalControl/TerminalContainer.cs +++ b/src/cascadia/WpfTerminalControl/TerminalContainer.cs @@ -26,7 +26,7 @@ namespace Microsoft.Terminal.Wpf private DispatcherTimer blinkTimer; private NativeMethods.ScrollCallback scrollCallback; private NativeMethods.WriteCallback writeCallback; - + /// /// Initializes a new instance of the class. /// @@ -35,7 +35,7 @@ namespace Microsoft.Terminal.Wpf this.MessageHook += this.TerminalContainer_MessageHook; this.GotFocus += this.TerminalContainer_GotFocus; this.Focusable = true; - + var blinkTime = NativeMethods.GetCaretBlinkTime(); if (blinkTime != uint.MaxValue) diff --git a/src/cascadia/WpfTerminalControl/TerminalControl.xaml.cs b/src/cascadia/WpfTerminalControl/TerminalControl.xaml.cs index edb01e2e9..f068d0edf 100644 --- a/src/cascadia/WpfTerminalControl/TerminalControl.xaml.cs +++ b/src/cascadia/WpfTerminalControl/TerminalControl.xaml.cs @@ -9,7 +9,7 @@ namespace Microsoft.Terminal.Wpf using System.Windows.Controls; using System.Windows.Input; using System.Windows.Media; - + /// /// A basic terminal control. This control can receive and render standard VT100 sequences. /// diff --git a/src/host/ft_uia/AccessibilityTests.cs b/src/host/ft_uia/AccessibilityTests.cs index 344901e8a..db636f8d1 100644 --- a/src/host/ft_uia/AccessibilityTests.cs +++ b/src/host/ft_uia/AccessibilityTests.cs @@ -481,7 +481,7 @@ namespace Conhost.UIA.Tests TextPatternRange testRange = visibleRanges.First().Clone(); // assumes that range is a line range at the top of the screen buffer - Action testTopBoundary = delegate(TextPatternRange range) + Action testTopBoundary = delegate (TextPatternRange range) { // the first visible range is at the top of the screen // buffer, we shouldn't be able to move the starting endpoint up diff --git a/src/host/ft_uia/Common/ShortcutHelper.cs b/src/host/ft_uia/Common/ShortcutHelper.cs index f844480cf..2b99d53c1 100644 --- a/src/host/ft_uia/Common/ShortcutHelper.cs +++ b/src/host/ft_uia/Common/ShortcutHelper.cs @@ -31,7 +31,7 @@ namespace Conhost.UIA.Tests.Common ~ShortcutHelper() { - this.Dispose(false); + this.Dispose(false); } public void Dispose() diff --git a/src/host/ft_uia/Elements/TabBase.cs b/src/host/ft_uia/Elements/TabBase.cs index f4a1a7f98..90b04d745 100644 --- a/src/host/ft_uia/Elements/TabBase.cs +++ b/src/host/ft_uia/Elements/TabBase.cs @@ -52,7 +52,7 @@ namespace Conhost.UIA.Tests.Elements tab.Click(); Globals.WaitForTimeout(); - + this.PopulateItemsOnNavigate(this.propDialog.PropWindow); } diff --git a/src/host/ft_uia/Elements/Tabs.cs b/src/host/ft_uia/Elements/Tabs.cs index 26e8c6393..88d739393 100644 --- a/src/host/ft_uia/Elements/Tabs.cs +++ b/src/host/ft_uia/Elements/Tabs.cs @@ -33,7 +33,7 @@ namespace Conhost.UIA.Tests.Elements this.tabs.Add(new FontTab(this.propDialog)); this.tabs.Add(new LayoutTab(this.propDialog)); this.tabs.Add(new ColorsTab(this.propDialog)); - + } private Tabs() diff --git a/src/host/ft_uia/Elements/ViewportArea.cs b/src/host/ft_uia/Elements/ViewportArea.cs index 2f659b8c6..9e3e37f89 100644 --- a/src/host/ft_uia/Elements/ViewportArea.cs +++ b/src/host/ft_uia/Elements/ViewportArea.cs @@ -105,7 +105,7 @@ namespace Conhost.UIA.Tests.Elements app.UIRoot.SendKeys(Keys.Escape); this.state = ViewportStates.Normal; } - + public void EnterMode(ViewportStates state) { if (state == ViewportStates.Normal) diff --git a/src/host/ft_uia/MouseWheelTests.cs b/src/host/ft_uia/MouseWheelTests.cs index 44882ce43..2b7e08576 100644 --- a/src/host/ft_uia/MouseWheelTests.cs +++ b/src/host/ft_uia/MouseWheelTests.cs @@ -111,7 +111,7 @@ namespace Conhost.UIA.Tests default: throw new NotSupportedException(); } - + afterScroll = app.GetScreenBufferInfo(); switch (dir) diff --git a/src/host/ft_uia/VirtualTerminalTests.cs b/src/host/ft_uia/VirtualTerminalTests.cs index 9c0c851b9..65fdf71b4 100644 --- a/src/host/ft_uia/VirtualTerminalTests.cs +++ b/src/host/ft_uia/VirtualTerminalTests.cs @@ -57,7 +57,7 @@ namespace Conhost.UIA.Tests reg.BackupRegistry(); // we're going to modify the virtual terminal state for this, so back it up first. VersionSelector.SetConsoleVersion(reg, ConsoleVersion.V2); reg.SetDefaultValue(VIRTUAL_TERMINAL_KEY_NAME, VIRTUAL_TERMINAL_ON_VALUE); - + bool haveVtAppPath = !string.IsNullOrEmpty(vtAppLocation); Verify.IsTrue(haveVtAppPath, "Ensure that we passed in the location to VtApp.exe"); @@ -114,12 +114,12 @@ namespace Conhost.UIA.Tests Log.Comment("Move cursor to the middle-ish"); Point cursorExpected = new Point(); // H is at 5, 1. VT coords are 1-based and buffer is 0-based so adjust. - cursorExpected.Y = 5 - 1; + cursorExpected.Y = 5 - 1; cursorExpected.X = 1 - 1; app.UIRoot.SendKeys("H"); // Move to middle-ish from here. 10 Bs and 10 Cs should about do it. - for (int i=0; i < 10; i++) + for (int i = 0; i < 10; i++) { app.UIRoot.SendKeys("BC"); cursorExpected.Y++; @@ -715,7 +715,7 @@ namespace Conhost.UIA.Tests } delegate char GetExpectedChar(int rowId, int colId, int height, int width); - + private static void ScreenFillHelper(CmdApp app, ViewportArea area, IntPtr hConsole) { Log.Comment("Fill screen with junk"); diff --git a/src/host/ft_uia/WinEventTests.cs b/src/host/ft_uia/WinEventTests.cs index e796c773d..9ebfa664b 100644 --- a/src/host/ft_uia/WinEventTests.cs +++ b/src/host/ft_uia/WinEventTests.cs @@ -212,7 +212,7 @@ namespace Conhost.UIA.Tests [TestMethod] public void TestSelection() { - RunTest(TestSelectionImpl); + RunTest(TestSelectionImpl); } private void TestSelectionImpl(CmdApp app, ViewportArea area, IntPtr hConsole, WinCon.CONSOLE_SCREEN_BUFFER_INFO_EX sbiex, Queue expected, WinCon.CONSOLE_SCREEN_BUFFER_INFO_EX sbiexOriginal) @@ -295,7 +295,7 @@ namespace Conhost.UIA.Tests [TestMethod] public void TestLaunchAndExitChild() { - RunTest(TestLaunchAndExitChildImpl); + RunTest(TestLaunchAndExitChildImpl); } private void TestLaunchAndExitChildImpl(CmdApp app, ViewportArea area, IntPtr hConsole, WinCon.CONSOLE_SCREEN_BUFFER_INFO_EX sbiex, Queue expected, WinCon.CONSOLE_SCREEN_BUFFER_INFO_EX sbiexOriginal) @@ -357,11 +357,11 @@ namespace Conhost.UIA.Tests { RunTest(TestScrollByWheelImpl); } - + private void TestScrollByWheelImpl(CmdApp app, ViewportArea area, IntPtr hConsole, WinCon.CONSOLE_SCREEN_BUFFER_INFO_EX sbiex, Queue expected, WinCon.CONSOLE_SCREEN_BUFFER_INFO_EX sbiexOriginal) { int rowsPerScroll = app.GetRowsPerScroll(); - int scrollDelta; + int scrollDelta; // A. Scroll down. { diff --git a/src/tools/vtapp/Program.cs b/src/tools/vtapp/Program.cs index 6c3818806..20cff98ab 100644 --- a/src/tools/vtapp/Program.cs +++ b/src/tools/vtapp/Program.cs @@ -13,14 +13,14 @@ namespace VTApp { class Program { - static string CSI = ((char)0x1b)+"["; + static string CSI = ((char)0x1b) + "["; static void Main(string[] args) { Console.WindowHeight = 25; Console.BufferHeight = 9000; Console.WindowWidth = 80; Console.BufferWidth = 80; - + Console.WriteLine("VT Tester"); while (true) @@ -271,11 +271,11 @@ namespace VTApp Console.Write("49m"); break; case '<': - Console.Write('\xD'); // carriage return \r - break; + Console.Write('\xD'); // carriage return \r + break; case '>': - Console.Write('\xA'); // line feed/new line \n - break; + Console.Write('\xA'); // line feed/new line \n + break; case '`': Console.Write("z"); break; @@ -385,7 +385,7 @@ namespace VTApp for (int j = 0; j < 80; j++) { if (j == 0) - Console.Write(i%10); + Console.Write(i % 10); else Console.Write("Z"); }