Skip to content

Commit beb4b9a

Browse files
committed
Enable IDE0065 (Misplaced using directive)
1 parent e771b5d commit beb4b9a

File tree

240 files changed

+1251
-1295
lines changed

Some content is hidden

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

240 files changed

+1251
-1295
lines changed

eng/CodeAnalysis.src.globalconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1492,7 +1492,7 @@ dotnet_diagnostic.IDE0063.severity = silent
14921492
dotnet_diagnostic.IDE0064.severity = silent
14931493

14941494
# IDE0065: Misplaced using directive
1495-
dotnet_diagnostic.IDE0065.severity = suggestion
1495+
dotnet_diagnostic.IDE0065.severity = warning
14961496

14971497
# IDE0066: Convert switch statement to expression
14981498
dotnet_diagnostic.IDE0066.severity = suggestion

src/coreclr/nativeaot/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<NoWarn>$(NoWarn);CS8602;CS8603;CS8604;CS8618;CS8625;CS8632;CS8765</NoWarn>
3535

3636
<!-- we should just fix -->
37-
<NoWarn>$(NoWarn);CA1810;CA1823;CA1825;CA1852;CA2208;SA1129;SA1205;SA1400;SA1517</NoWarn>
37+
<NoWarn>$(NoWarn);CA1810;CA1823;CA1825;CA1852;CA2208;SA1129;SA1205;SA1400;SA1517;IDE0065</NoWarn>
3838

3939
<!-- Arrays as attribute arguments is not CLS-compliant -->
4040
<NoWarn>$(NoWarn);CS3016</NoWarn>

src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/DesignTimeVisibleAttribute.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4+
using System;
5+
using System.Diagnostics.CodeAnalysis;
6+
47
namespace System.ComponentModel
58
{
6-
using System;
7-
using System.Diagnostics.CodeAnalysis;
8-
99
/// <summary>
1010
/// DesignTimeVisibileAttribute marks a component's visibility. If
1111
/// DesignTimeVisibileAttribute.Yes is present, a visual designer can show

src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/ConfigDefinitionUpdates.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4+
using System.Collections;
5+
46
namespace System.Configuration
57
{
6-
using Collections;
7-
88
// Contains all the updates to section definitions across all location sections.
99
internal sealed class ConfigDefinitionUpdates
1010
{

src/libraries/System.Data.OleDb/src/OleDbConnection.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@
99
using System.Globalization;
1010
using System.Runtime.InteropServices;
1111
using System.Text;
12+
using SysTx = System.Transactions;
1213

1314
namespace System.Data.OleDb
1415
{
15-
using SysTx = Transactions;
16-
1716
// wraps the OLEDB IDBInitialize interface which represents a connection
1817
// Notes about connection pooling
1918
// 1. Only happens if we use the IDataInitialize or IDBPromptInitialize interfaces

src/libraries/System.Data.OleDb/src/OleDbConnectionInternal.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@
88
using System.Globalization;
99
using System.Runtime.InteropServices;
1010
using System.Threading;
11+
using SysTx = System.Transactions;
1112

1213
namespace System.Data.OleDb
1314
{
14-
using SysTx = Transactions;
15-
1615
internal sealed class OleDbConnectionInternal : DbConnectionInternal, IDisposable
1716
{
1817
private static volatile OleDbServicesWrapper? idataInitialize;

src/libraries/System.Data.OleDb/src/OleDbStruct.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33

44
using System.Runtime.InteropServices;
5-
6-
namespace System.Data.OleDb
7-
{
85
#if DEBUG
9-
using Globalization;
10-
using Text;
6+
using System.Globalization;
7+
using System.Text;
118
#endif
129

10+
namespace System.Data.OleDb
11+
{
1312
internal enum DBBindStatus
1413
{
1514
OK = 0,

src/libraries/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionHelper.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@
55
using System.Data.ProviderBase;
66
using System.Diagnostics;
77
using System.Threading;
8+
using SysTx = System.Transactions;
89

910
namespace System.Data.OleDb
1011
{
11-
using SysTx = Transactions;
12-
1312
public sealed partial class OleDbConnection : DbConnection
1413
{
1514
private static readonly DbConnectionFactory _connectionFactory = OleDbConnectionFactory.SingletonInstance;

src/libraries/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionPool.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@
1111
using System.Runtime.Versioning;
1212
using System.Threading;
1313
using System.Threading.Tasks;
14+
using SysTx = System.Transactions;
1415

1516
namespace System.Data.ProviderBase
1617
{
17-
using SysTx = Transactions;
18-
1918
internal sealed class DbConnectionPool
2019
{
2120
private enum State

src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/ExtensionCache.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4+
using System;
5+
using System.Collections.Generic;
6+
using System.Collections;
7+
using System.DirectoryServices;
8+
49
namespace System.DirectoryServices.AccountManagement
510
{
6-
using System;
7-
using System.Collections.Generic;
8-
using System.Collections;
9-
using System.DirectoryServices;
10-
1111
internal sealed class ExtensionCacheValue
1212
{
1313
internal ExtensionCacheValue(object[] value)

0 commit comments

Comments
 (0)