Skip to content

Commit ac4e3b7

Browse files
committed
Enable IDE0005 (unneccessary using statements) as error
Due to a quirk in how `msbuild` runs rules, documentation generation must be enabled for this rule (and presumably others) to be respected.
1 parent f19f1b4 commit ac4e3b7

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

PowerShellEditorServices.Common.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
<!-- See: https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/overview -->
1515
<EnableNETAnalyzers>true</EnableNETAnalyzers>
1616
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
17+
<!-- Required to enable IDE0005 as error -->
18+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
1719
<!-- TODO: Enable <AnalysisMode>All</AnalysisMode> -->
1820
<!-- See: https://docs.microsoft.com/en-us/dotnet/core/compatibility/sdk/6.0/implicit-namespaces -->
1921
<DisableImplicitNamespaceImports>true</DisableImplicitNamespaceImports>

src/PowerShellEditorServices/Hosting/EditorServicesServerFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// Licensed under the MIT License.
33

44
using System;
5-
using System.Diagnostics;
65
using System.IO;
76
using Microsoft.Extensions.DependencyInjection;
87
using Microsoft.Extensions.Logging;
@@ -14,6 +13,7 @@
1413
using Microsoft.PowerShell.EditorServices.Services.Extension;
1514

1615
#if DEBUG
16+
using System.Diagnostics;
1717
using Serilog.Debugging;
1818
#endif
1919

0 commit comments

Comments
 (0)