Skip to content

Commit 7099328

Browse files
committed
Enforce Code Style in Build and Suppress Existing Warnings for Cleaner Build/CI Output
1 parent 3c5a7ae commit 7099328

File tree

7 files changed

+21
-1
lines changed

7 files changed

+21
-1
lines changed

.editorconfig

+15-1
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,23 @@ dotnet_diagnostic.CA2016.severity = error
3535
# All maintainability issues (dead code etc.)
3636
# See: https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/maintainability-warnings
3737
dotnet_analyzer_diagnostic.category-Maintainability.severity = error
38-
# VSTHRD002: Synchronously waiting on tasks or awaiters may cause deadlocks
38+
39+
3940
# TODO: Fix all of these issues and explicitly ignore the intentional ones.
4041
dotnet_diagnostic.VSTHRD002.severity = silent
42+
dotnet_diagnostic.VSTHRD003.severity = silent
43+
dotnet_diagnostic.VSTHRD105.severity = silent
44+
dotnet_diagnostic.VSTHRD100.severity = silent
45+
dotnet_diagnostic.VSTHRD103.severity = silent
46+
dotnet_diagnostic.VSTHRD110.severity = silent
47+
dotnet_diagnostic.VSTHRD114.severity = silent
48+
dotnet_diagnostic.CS0649.severity = silent
49+
dotnet_diagnostic.CS0618.severity = silent
50+
dotnet_diagnostic.CS1998.severity = silent
51+
dotnet_diagnostic.CS4014.severity = silent
52+
dotnet_diagnostic.xUnit2013.severity = silent
53+
54+
4155
# VSTHRD200: Use "Async" suffix for awaitable methods
4256
dotnet_diagnostic.VSTHRD200.severity = silent
4357
# IDE0003: this and Me preferences

src/PowerShellEditorServices.Hosting/PowerShellEditorServices.Hosting.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<PropertyGroup>
55
<TargetFrameworks>netcoreapp3.1;net461</TargetFrameworks>
66
<AssemblyName>Microsoft.PowerShell.EditorServices.Hosting</AssemblyName>
7+
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
78
</PropertyGroup>
89

910
<!-- HACK: This is a temporary workaround of `dotnet publish` -->

src/PowerShellEditorServices.VSCode/PowerShellEditorServices.VSCode.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<TargetFrameworks>netstandard2.0</TargetFrameworks>
88
<AssemblyName>Microsoft.PowerShell.EditorServices.VSCode</AssemblyName>
99
<Configurations>Debug;Release;CoreCLR</Configurations>
10+
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
1011
</PropertyGroup>
1112

1213
<!-- Fail the release build if there are missing public API documentation comments -->

src/PowerShellEditorServices/PowerShellEditorServices.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<TargetFrameworks>netstandard2.0</TargetFrameworks>
88
<AssemblyName>Microsoft.PowerShell.EditorServices</AssemblyName>
99
<Configurations>Debug;Release</Configurations>
10+
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
1011
</PropertyGroup>
1112

1213
<ItemGroup>

test/PowerShellEditorServices.Test.E2E/PowerShellEditorServices.Test.E2E.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<PropertyGroup>
55
<TargetFrameworks>net6.0;netcoreapp3.1</TargetFrameworks>
66
<IsPackable>false</IsPackable>
7+
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
78
</PropertyGroup>
89

910
<ItemGroup>

test/PowerShellEditorServices.Test.Shared/PowerShellEditorServices.Test.Shared.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<VersionPrefix>0.9.0-beta</VersionPrefix>
55
<TargetFrameworks>netstandard2.0</TargetFrameworks>
66
<AssemblyName>Microsoft.PowerShell.EditorServices.Test.Shared</AssemblyName>
7+
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
78
</PropertyGroup>
89
<ItemGroup>
910
<ProjectReference Include="..\..\src\PowerShellEditorServices\PowerShellEditorServices.csproj" />

test/PowerShellEditorServices.Test/PowerShellEditorServices.Test.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<TargetFrameworks>net6.0;netcoreapp3.1;net461</TargetFrameworks>
66
<AssemblyName>Microsoft.PowerShell.EditorServices.Test</AssemblyName>
77
<TargetPlatform>x64</TargetPlatform>
8+
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
89
</PropertyGroup>
910

1011
<PropertyGroup>

0 commit comments

Comments
 (0)