Skip to content

Remove Unnecessary Usings is modifying white space before first type declaration #65114

@drewnoakes

Description

@drewnoakes

Version Used: Version 17.5.0 Preview 1.0 [33027.274.main]

Steps to Reproduce:

  1. Create a file with unnecessary usings, with spaces before the first type declaration
  2. Create a .editorconfig specifying tabs
    [*.cs]
    indent_style = tab
    indent_size = tab
    tab_size = 4
  3. Invoke "Remove Unnecessary Usings"

Expected Behavior:

Only the usings are removed.

Actual Behavior:

Usings are removed, but trivia is also updated.

--- a/src/D2DLibExport/D2DGeometry.cs
+++ b/src/D2DLibExport/D2DGeometry.cs
@@ -22,22 +22,9 @@
  * SOFTWARE.
  */
 
-using System;
-using System.Collections.Generic;
-using System.Runtime.InteropServices;
-using System.Text;
-
-using FLOAT = System.Single;
-using UINT = System.UInt32;
-using UINT32 = System.UInt32;
-using HWND = System.IntPtr;
-using HANDLE = System.IntPtr;
-using HRESULT = System.Int64;
-using BOOL = System.Int32;
-
 namespace unvell.D2DLib
 {
-  public class D2DGeometry : D2DObject
+	public class D2DGeometry : D2DObject
   {
     internal HANDLE DeviceHandle { get; private set; }

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions