-
Notifications
You must be signed in to change notification settings - Fork 0
/
EnforceOnBuildValues.cs
117 lines (110 loc) · 10.5 KB
/
EnforceOnBuildValues.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
// https://github.com/dotnet/roslyn/blob/9f87b444da9c48a4d492b19f8337339056bf2b95/src/Analyzers/Core/Analyzers/EnforceOnBuildValues.cs#L95
using Microsoft.CodeAnalysis.CodeStyle;
namespace Microsoft.CodeAnalysis.Diagnostics
{
internal static class EnforceOnBuildValues
{
/* EnforceOnBuild.HighlyRecommended */
public const EnforceOnBuild RemoveUnnecessaryImports = /*IDE0005*/ EnforceOnBuild.HighlyRecommended;
public const EnforceOnBuild UseImplicitType = /*IDE0007*/ EnforceOnBuild.HighlyRecommended;
public const EnforceOnBuild UseExplicitType = /*IDE0008*/ EnforceOnBuild.HighlyRecommended;
public const EnforceOnBuild AddBraces = /*IDE0011*/ EnforceOnBuild.HighlyRecommended;
public const EnforceOnBuild OrderModifiers = /*IDE0036*/ EnforceOnBuild.HighlyRecommended;
public const EnforceOnBuild AddAccessibilityModifiers = /*IDE0040*/ EnforceOnBuild.HighlyRecommended;
public const EnforceOnBuild ValidateFormatString = /*IDE0043*/ EnforceOnBuild.HighlyRecommended;
public const EnforceOnBuild MakeFieldReadonly = /*IDE0044*/ EnforceOnBuild.HighlyRecommended;
public const EnforceOnBuild RemoveUnusedMembers = /*IDE0051*/ EnforceOnBuild.HighlyRecommended;
public const EnforceOnBuild RemoveUnreadMembers = /*IDE0052*/ EnforceOnBuild.HighlyRecommended;
public const EnforceOnBuild Formatting = /*IDE0055*/ EnforceOnBuild.HighlyRecommended;
public const EnforceOnBuild ValueAssignedIsUnused = /*IDE0059*/ EnforceOnBuild.HighlyRecommended;
public const EnforceOnBuild UnusedParameter = /*IDE0060*/ EnforceOnBuild.HighlyRecommended;
public const EnforceOnBuild FileHeaderMismatch = /*IDE0073*/ EnforceOnBuild.HighlyRecommended;
public const EnforceOnBuild InvalidSuppressMessageAttribute = /*IDE0076*/ EnforceOnBuild.HighlyRecommended;
public const EnforceOnBuild LegacyFormatSuppressMessageAttribute = /*IDE0077*/ EnforceOnBuild.HighlyRecommended;
public const EnforceOnBuild RemoveConfusingSuppressionForIsExpression = /*IDE0080*/ EnforceOnBuild.HighlyRecommended;
/* EnforceOnBuild.Recommended */
public const EnforceOnBuild UseThrowExpression = /*IDE0016*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild UseObjectInitializer = /*IDE0017*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild InlineDeclaration = /*IDE0018*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild InlineAsType = /*IDE0019*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild InlineIsType = /*IDE0020*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild UseExpressionBodyForConstructors = /*IDE0021*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild UseExpressionBodyForMethods = /*IDE0022*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild UseExpressionBodyForConversionOperators = /*IDE0023*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild UseExpressionBodyForOperators = /*IDE0024*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild UseExpressionBodyForProperties = /*IDE0025*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild UseExpressionBodyForIndexers = /*IDE0026*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild UseExpressionBodyForAccessors = /*IDE0027*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild UseCollectionInitializer = /*IDE0028*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild UseCoalesceExpression = /*IDE0029*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild UseCoalesceExpressionForNullable = /*IDE0030*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild UseNullPropagation = /*IDE0031*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild UseAutoProperty = /*IDE0032*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild UseExplicitTupleName = /*IDE0033*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild UseDefaultLiteral = /*IDE0034*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild InlineIsTypeWithoutName = /*IDE0038*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild UseLocalFunction = /*IDE0039*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild UseDeconstruction = /*IDE0042*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild UseConditionalExpressionForAssignment = /*IDE0045*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild UseConditionalExpressionForReturn = /*IDE0046*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild RemoveUnnecessaryParentheses = /*IDE0047*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild ConvertAnonymousTypeToTuple = /*IDE0050*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild UseExpressionBodyForLambdaExpressions = /*IDE0053*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild UseCompoundAssignment = /*IDE0054*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild UseIndexOperator = /*IDE0056*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild UseRangeOperator = /*IDE0057*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild UseExpressionBodyForLocalFunctions = /*IDE0061*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild MakeLocalFunctionStatic = /*IDE0062*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild UseSimpleUsingStatement = /*IDE0063*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild MoveMisplacedUsingDirectives = /*IDE0065*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild UseSystemHashCode = /*IDE0070*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild SimplifyInterpolation = /*IDE0071*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild UseCoalesceCompoundAssignment = /*IDE0074*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild SimplifyConditionalExpression = /*IDE0075*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild UsePatternCombinators = /*IDE0078*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild RemoveUnnecessaryByVal = /*IDE0081*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild ConvertTypeOfToNameOf = /*IDE0082*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild UseNotPattern = /*IDE0083*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild UseIsNotExpression = /*IDE0084*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild UseImplicitObjectCreation = /*IDE0090*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild RemoveRedundantEquality = /*IDE0100*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild RemoveUnnecessaryDiscardDesignation = /*IDE0110*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild InvokeDelegateWithConditionalAccess = /*IDE1005*/ EnforceOnBuild.Recommended;
public const EnforceOnBuild NamingRule = /*IDE1006*/ EnforceOnBuild.Recommended;
/* EnforceOnBuild.WhenExplicitlyEnabled */
public const EnforceOnBuild RemoveUnnecessaryCast = /*IDE0004*/ EnforceOnBuild.WhenExplicitlyEnabled; // TODO: Move to 'Recommended' OR 'HighlyRecommended' bucket once performance problems are addressed: https://github.com/dotnet/roslyn/issues/43304
public const EnforceOnBuild PopulateSwitchStatement = /*IDE0010*/ EnforceOnBuild.WhenExplicitlyEnabled;
public const EnforceOnBuild UseInferredMemberName = /*IDE0037*/ EnforceOnBuild.WhenExplicitlyEnabled;
public const EnforceOnBuild UseIsNullCheck = /*IDE0041*/ EnforceOnBuild.WhenExplicitlyEnabled;
public const EnforceOnBuild AddRequiredParentheses = /*IDE0048*/ EnforceOnBuild.WhenExplicitlyEnabled;
public const EnforceOnBuild ExpressionValueIsUnused = /*IDE0058*/ EnforceOnBuild.WhenExplicitlyEnabled;
public const EnforceOnBuild MakeStructFieldsWritable = /*IDE0064*/ EnforceOnBuild.WhenExplicitlyEnabled;
public const EnforceOnBuild ConvertSwitchStatementToExpression = /*IDE0066*/ EnforceOnBuild.WhenExplicitlyEnabled;
public const EnforceOnBuild DisposeObjectsBeforeLosingScope = /*IDE0067*/ EnforceOnBuild.WhenExplicitlyEnabled;
public const EnforceOnBuild UseRecommendedDisposePattern = /*IDE0068*/ EnforceOnBuild.WhenExplicitlyEnabled;
public const EnforceOnBuild DisposableFieldsShouldBeDisposed = /*IDE0069*/ EnforceOnBuild.WhenExplicitlyEnabled;
public const EnforceOnBuild PopulateSwitchExpression = /*IDE0072*/ EnforceOnBuild.WhenExplicitlyEnabled;
public const EnforceOnBuild Regex = /*RE0001*/ EnforceOnBuild.WhenExplicitlyEnabled;
/* EnforceOnBuild.Never */
// TODO: Allow enforcing simplify names and related diagnostics on build once we validate their performance charactericstics.
// https://github.com/dotnet/roslyn/blob/9f87b444da9c48a4d492b19f8337339056bf2b95/src/Analyzers/Core/Analyzers/EnforceOnBuildValues.cs#L95
public const EnforceOnBuild SimplifyNames = /*IDE0001*/ EnforceOnBuild.Never;
public const EnforceOnBuild SimplifyMemberAccess = /*IDE0002*/ EnforceOnBuild.Never;
public const EnforceOnBuild RemoveQualification = /*IDE0003*/ EnforceOnBuild.Never;
public const EnforceOnBuild AddQualification = /*IDE0009*/ EnforceOnBuild.Never;
public const EnforceOnBuild PreferBuiltInOrFrameworkType = /*IDE0049*/ EnforceOnBuild.Never;
public const EnforceOnBuild RemoveUnreachableCode = /*IDE0035*/ EnforceOnBuild.Never; // Non-configurable fading diagnostic corresponding to CS0162.
public const EnforceOnBuild RemoveUnnecessarySuppression = /*IDE0079*/ EnforceOnBuild.Never; // IDE-only analyzer.
// Analyzer error Ids
public const EnforceOnBuild IntellisenseBuildFailed = /*IDE0006*/ EnforceOnBuild.Never;
public const EnforceOnBuild AnalyzerChanged = /*IDE1001*/ EnforceOnBuild.Never;
public const EnforceOnBuild AnalyzerDependencyConflict = /*IDE1002*/ EnforceOnBuild.Never;
public const EnforceOnBuild MissingAnalyzerReference = /*IDE1003*/ EnforceOnBuild.Never;
public const EnforceOnBuild ErrorReadingRuleset = /*IDE1004*/ EnforceOnBuild.Never;
public const EnforceOnBuild UnboundIdentifier = /*IDE1007*/ EnforceOnBuild.Never;
public const EnforceOnBuild UnboundConstructor = /*IDE1008*/ EnforceOnBuild.Never;
}
}