Skip to content
This repository was archived by the owner on Nov 8, 2018. It is now read-only.

Commit fee1652

Browse files
committed
Add AnalyzerConstants
1 parent 09baea2 commit fee1652

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
namespace AsyncUsageAnalyzers
2+
{
3+
using Microsoft.CodeAnalysis;
4+
5+
internal static class AnalyzerConstants
6+
{
7+
static AnalyzerConstants()
8+
{
9+
#if DEBUG
10+
// In DEBUG builds, the tests are enabled to simplify development and testing.
11+
DisabledNoTests = true;
12+
#else
13+
DisabledNoTests = false;
14+
#endif
15+
}
16+
17+
/// <summary>
18+
/// Gets a reference value which can be passed to
19+
/// <see cref="DiagnosticDescriptor(string, string, string, string, DiagnosticSeverity, bool, string, string, string[])"/>
20+
/// to disable a diagnostic which is currently untested.
21+
/// </summary>
22+
/// <value>
23+
/// A reference value which can be passed to
24+
/// <see cref="DiagnosticDescriptor(string, string, string, string, DiagnosticSeverity, bool, string, string, string[])"/>
25+
/// to disable a diagnostic which is currently untested.
26+
/// </value>
27+
internal static bool DisabledNoTests { get; }
28+
}
29+
}

AsyncUsageAnalyzers/AsyncUsageAnalyzers/AsyncUsageAnalyzers.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
<AssemblyOriginatorKeyFile Condition="'$(KeyConfiguration)' != 'Final'">..\..\build\keys\AsyncUsageAnalyzers.dev.snk</AssemblyOriginatorKeyFile>
4343
</PropertyGroup>
4444
<ItemGroup>
45+
<Compile Include="AnalyzerConstants.cs" />
4546
<Compile Include="Properties\AssemblyInfo.cs" />
4647
<Compile Include="Resources.Designer.cs">
4748
<AutoGen>True</AutoGen>

0 commit comments

Comments
 (0)