Skip to content

Commit 64699c8

Browse files
benjirotoddbaert
andauthored
chore: Enforce coding styles on build (#242)
## This PR A follow on from the previous PR that removed unused using, this will make sure it won't occur in the future. #240 (comment) - Enforce code styles on build - Error on unused usings - Apply workaround for IDE0005 rule ### Related Issues Fixes #240 (comment) Signed-off-by: Benjamin Evenson <[email protected]> Co-authored-by: Todd Baert <[email protected]>
1 parent fa25ece commit 64699c8

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.editorconfig

+2-3
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,13 @@ dotnet_diagnostic.IDE0001.severity = warning
140140
dotnet_diagnostic.IDE0002.severity = warning
141141

142142
# IDE0005: Remove unnecessary import
143-
# Workaround for https://github.com/dotnet/roslyn/issues/41640
144-
dotnet_diagnostic.IDE0005.severity = none
143+
dotnet_diagnostic.IDE0005.severity = error
145144

146145
# RS0041: Public members should not use oblivious types
147146
dotnet_diagnostic.RS0041.severity = suggestion
148147

149148
# CA2007: Do not directly await a Task
150-
dotnet_diagnostic.CA2007.severity = error
149+
dotnet_diagnostic.CA2007.severity = errorgit
151150

152151
[obj/**.cs]
153152
generated_code = true

build/Common.props

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
<LangVersion>latest</LangVersion>
44
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
55
<EnableNETAnalyzers>true</EnableNETAnalyzers>
6+
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
7+
<!-- Workaround for IDE0005 (Remove unnecessary usings/imports); see https://github.com/dotnet/roslyn/issues/41640 -->
8+
<NoWarn>EnableGenerateDocumentationFile</NoWarn>
69
</PropertyGroup>
710

811
<PropertyGroup Condition="'$(Configuration)'=='Debug'">

0 commit comments

Comments
 (0)