Skip to content

Commit f99348c

Browse files
committed
Relax warning severity in developer builds in favor of strict CI validation
1 parent 1f8c520 commit f99348c

7 files changed

Lines changed: 25 additions & 38 deletions

File tree

StyleCop.Analyzers/StyleCop.Analyzers.CodeFixes/StyleCop.Analyzers.CodeFixes.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@
3333
<ErrorReport>prompt</ErrorReport>
3434
<WarningLevel>4</WarningLevel>
3535
</PropertyGroup>
36+
<PropertyGroup Condition="'$(BuildingInsideVisualStudio)' != 'true'">
37+
<!-- Ideally this is always enabled, but that tends to hurt developer productivity -->
38+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
39+
</PropertyGroup>
3640
<PropertyGroup>
3741
<DocumentationFile>$(OutputPath)$(AssemblyName).xml</DocumentationFile>
3842
<CodeAnalysisRuleSet>..\StyleCop.Analyzers.ruleset</CodeAnalysisRuleSet>

StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/StyleCop.Analyzers.Test.CSharp7.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535
<WarningLevel>4</WarningLevel>
3636
<Prefer32Bit>false</Prefer32Bit>
3737
</PropertyGroup>
38+
<PropertyGroup Condition="'$(BuildingInsideVisualStudio)' != 'true'">
39+
<!-- Ideally this is always enabled, but that tends to hurt developer productivity -->
40+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
41+
</PropertyGroup>
3842
<PropertyGroup>
3943
<DocumentationFile>$(OutputPath)$(AssemblyName).xml</DocumentationFile>
4044
<CodeAnalysisRuleSet>..\StyleCop.Analyzers.Internal.ruleset</CodeAnalysisRuleSet>

StyleCop.Analyzers/StyleCop.Analyzers.Test/StyleCop.Analyzers.Test.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535
<WarningLevel>4</WarningLevel>
3636
<Prefer32Bit>false</Prefer32Bit>
3737
</PropertyGroup>
38+
<PropertyGroup Condition="'$(BuildingInsideVisualStudio)' != 'true'">
39+
<!-- Ideally this is always enabled, but that tends to hurt developer productivity -->
40+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
41+
</PropertyGroup>
3842
<PropertyGroup>
3943
<DocumentationFile>$(OutputPath)$(AssemblyName).xml</DocumentationFile>
4044
<CodeAnalysisRuleSet>..\StyleCop.Analyzers.Internal.ruleset</CodeAnalysisRuleSet>

StyleCop.Analyzers/StyleCop.Analyzers.Vsix/StyleCop.Analyzers.Vsix.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@
4545
<ErrorReport>prompt</ErrorReport>
4646
<WarningLevel>4</WarningLevel>
4747
</PropertyGroup>
48+
<PropertyGroup Condition="'$(BuildingInsideVisualStudio)' != 'true'">
49+
<!-- Ideally this is always enabled, but that tends to hurt developer productivity -->
50+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
51+
</PropertyGroup>
4852
<PropertyGroup>
4953
<DocumentationFile>$(OutputPath)$(AssemblyName).xml</DocumentationFile>
5054
<CodeAnalysisRuleSet>..\StyleCop.Analyzers.Internal.ruleset</CodeAnalysisRuleSet>

StyleCop.Analyzers/StyleCop.Analyzers.ruleset

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<RuleSet Name="Rules for StyleCop.Analyzers" Description="Code analysis rules for StyleCop.Analyzers.csproj." ToolsVersion="14.0">
33
<Rules AnalyzerId="AsyncUsageAnalyzers" RuleNamespace="AsyncUsageAnalyzers">
4-
<Rule Id="AvoidAsyncSuffix" Action="Error" />
5-
<Rule Id="AvoidAsyncVoid" Action="Error" />
6-
<Rule Id="UseAsyncSuffix" Action="Error" />
7-
<Rule Id="UseConfigureAwait" Action="Error" />
4+
<Rule Id="UseConfigureAwait" Action="Warning" />
85
</Rules>
96
<Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed">
107
<Rule Id="CA1001" Action="Warning" />
@@ -74,44 +71,10 @@
7471
<Rule Id="IDE0003" Action="None" />
7572
</Rules>
7673
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
77-
<Rule Id="SA1000" Action="Error" />
78-
<Rule Id="SA1001" Action="Error" />
79-
<Rule Id="SA1021" Action="Error" />
80-
<Rule Id="SA1022" Action="Error" />
81-
<Rule Id="SA1100" Action="Error" />
82-
<Rule Id="SA1101" Action="Error" />
83-
<Rule Id="SA1106" Action="Error" />
84-
<Rule Id="SA1111" Action="Error" />
85-
<Rule Id="SA1112" Action="Error" />
86-
<Rule Id="SA1119" Action="Error" />
87-
<Rule Id="SA1121" Action="Error" />
88-
<Rule Id="SA1122" Action="Error" />
89-
<Rule Id="SA1133" Action="Error" />
90-
<Rule Id="SA1300" Action="Error" />
91-
<Rule Id="SA1302" Action="Error" />
92-
<Rule Id="SA1303" Action="Error" />
93-
<Rule Id="SA1304" Action="Error" />
9474
<Rule Id="SA1305" Action="Warning" />
95-
<Rule Id="SA1309" Action="Error" />
96-
<Rule Id="SA1311" Action="Error" />
97-
<Rule Id="SA1400" Action="Error" />
98-
<Rule Id="SA1401" Action="Error" />
99-
<Rule Id="SA1402" Action="Error" />
100-
<Rule Id="SA1403" Action="Error" />
101-
<Rule Id="SA1404" Action="Error" />
102-
<Rule Id="SA1405" Action="Error" />
103-
<Rule Id="SA1406" Action="Error" />
104-
<Rule Id="SA1407" Action="Error" />
105-
<Rule Id="SA1408" Action="Error" />
106-
<Rule Id="SA1410" Action="Error" />
107-
<Rule Id="SA1411" Action="Error" />
10875
<Rule Id="SA1412" Action="Warning" />
10976
<Rule Id="SA1600" Action="None" />
11077
<Rule Id="SA1603" Action="Error" />
11178
<Rule Id="SA1609" Action="Warning" />
112-
<Rule Id="SA1633" Action="Error" />
113-
<Rule Id="SA1636" Action="Error" />
114-
<Rule Id="SA1642" Action="Error" />
115-
<Rule Id="SA1643" Action="Error" />
11679
</Rules>
11780
</RuleSet>

StyleCop.Analyzers/StyleCop.Analyzers/StyleCop.Analyzers.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@
3333
<ErrorReport>prompt</ErrorReport>
3434
<WarningLevel>4</WarningLevel>
3535
</PropertyGroup>
36+
<PropertyGroup Condition="'$(BuildingInsideVisualStudio)' != 'true'">
37+
<!-- Ideally this is always enabled, but that tends to hurt developer productivity -->
38+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
39+
</PropertyGroup>
3640
<PropertyGroup>
3741
<DocumentationFile>$(OutputPath)$(AssemblyName).xml</DocumentationFile>
3842
<CodeAnalysisRuleSet>..\StyleCop.Analyzers.ruleset</CodeAnalysisRuleSet>

StyleCop.Analyzers/StyleCopTester/StyleCopTester.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@
3232
<ErrorReport>prompt</ErrorReport>
3333
<WarningLevel>4</WarningLevel>
3434
</PropertyGroup>
35+
<PropertyGroup Condition="'$(BuildingInsideVisualStudio)' != 'true'">
36+
<!-- Ideally this is always enabled, but that tends to hurt developer productivity -->
37+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
38+
</PropertyGroup>
3539
<PropertyGroup>
3640
<DocumentationFile>$(OutputPath)$(AssemblyName).xml</DocumentationFile>
3741
<CodeAnalysisRuleSet>..\StyleCop.Analyzers.Internal.ruleset</CodeAnalysisRuleSet>

0 commit comments

Comments
 (0)