Skip to content

Commit 2f366cd

Browse files
authored
Merge pull request #144 from JSkimming/enforce-var-preferences
Enforce var preferences in the build
2 parents c0083e3 + f34a492 commit 2f366cd

5 files changed

Lines changed: 5 additions & 3 deletions

File tree

.editorconfig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,6 @@ csharp_indent_labels = flush_left
8484

8585
# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-formatting-conventionswrap-options
8686
csharp_preserve_single_line_statements = false
87-
csharp_preserve_single_line_blocks = true
87+
88+
# IDE0008: Use explicit type instead of 'var'
89+
dotnet_diagnostic.IDE0008.severity = error

src/Castle.Core.AsyncInterceptor/Castle.Core.AsyncInterceptor.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<Nullable>enable</Nullable>
1010
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
1111
<CodeAnalysisRuleSet>..\stylecop.ruleset</CodeAnalysisRuleSet>
12+
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
1213
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
1314
<Authors>James Skimming</Authors>
1415
<Description>AsyncInterceptor is an extension to Castle DynamicProxy to simplify the development of interceptors for asynchronous methods.</Description>

src/Castle.Core.AsyncInterceptor/ProcessingAsyncInterceptor.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
namespace Castle.DynamicProxy
55
{
6-
using System.Diagnostics.CodeAnalysis;
76
using System.Threading.Tasks;
87

98
/// <summary>

src/Castle.Core.AsyncInterceptor/ProxyGeneratorExtensions.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ namespace Castle.DynamicProxy
55
{
66
using System;
77
using System.Collections.Generic;
8-
using System.Diagnostics.CodeAnalysis;
98
using System.Linq;
109

1110
/// <summary>

test/Castle.Core.AsyncInterceptor.Tests/Castle.Core.AsyncInterceptor.Tests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<Nullable>enable</Nullable>
1010
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
1111
<CodeAnalysisRuleSet>..\test-stylecop.ruleset</CodeAnalysisRuleSet>
12+
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
1213
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
1314
<NoWarn>$(NoWarn);SA0001</NoWarn>
1415
</PropertyGroup>

0 commit comments

Comments
 (0)