Skip to content
Giovanni Bassi edited this page Jun 13, 2017 · 151 revisions

Diagnostic Ids

After discussions on issue 41 we have decided on the format CC0001 for the diagnostic ids.

Analyzer ID
AlwaysUseVarAnalyzer_NonPrimitives CC0001
ArgumentExceptionAnalyzer CC0002
CatchEmptyAnalyzer CC0003
EmptyCatchBlockAnalyzer CC0004
EmptyObjectInitializerAnalyzer CC0005
ForInArrayAnalyzer CC0006
IfReturnTrueAnalyzer CC0007
ObjectInitializerAnalyzer (local declaration) CC0008
ObjectInitializerAnalyzer (assignment) CC0009
RegexAnalyzer CC0010
RemoveWhereWhenItIsPossibleAnalyzer CC0011
RethrowExceptionAnalyzer CC0012
TernaryOperatorAnalyzer (return) CC0013
TernaryOperatorAnalyzer (assignment) CC0014
UnnecessaryParenthesisAnalyzer CC0015
`` CC0016 (removed, was CopyEventToVariableBeforeFireAnalyzer)
AutoPropertyAnalyzer CC0017
ExistenceOperatorAnalyzer CC0018
ConvertToSwitchAnalyzer CC0019
Convert Lambda to Method Group CC0020 #49
NameOfAnalyzer CC0021
IDisposable not assigned to a field is not being disposed CC0022 #28
SealedAttributeAnalyzer CC0023
StaticConstructorExceptionAnalyzer CC0024
EmptyFinalizerAnalyzer CC0025
CallExtensionMethodAsExtensionAnalyzer CC0026
Implement IEquatable<T> on Value Types CC0027 #60
Change from as operator to direct cast CC0028 #65
DisposablesShouldCallSuppressFinalizeAnalyzer CC0029
MakeLocalVariableConstWhenItIsPossibleAnalyzer CC0030
UseInvokeMethodToFireEventAnalyzer CC0031
DisposableFieldNotDisposedAnalyzer.Info CC0032
DisposableFieldNotDisposedAnalyzer.Warning CC0033
Supress assignment of default value CC0034 #9
Reorder class CC0035 #76
Improve double/float comparisons CC0036 #25
RemoveCommentedCodeAnalyzer CC0037
ConvertToExpressionBodiedMemberAnalyzer CC0038
StringBuilderInLoopAnalyzer CC0039
Warning potential null in fields, variables and arguments CC0040 #96
Align Equals on Variable Assignment statements CC0041 #29
InvertForAnalyzer CC0042
"Not Any" to "All" CC0043 #31
Excess parameters in methods CC0044 #44
StringRepresentationAnalyzer.RegularString CC0045
StringRepresentationAnalyzer.VerbatimString CC0046
PropertyPrivateSetAnalyzer CC0047
StringFormatAnalyzer CC0048
SimplifyRedundantBooleanComparisonsAnalyzer CC0049
Convert loop to linq expression CC0050 #22
Remove async and return task directly CC0051 #151
ReadOnlyField CC0052
ColorTranslator.FromHtml CC0053 #1
JsonConvert.DeserializeObject CC0054 #2
Unreachable code CC0055 #21
Check arguments in String.Format CC0056 #116
Remove unused parameters CC0057 #24
Encapsulate field as read-only or write-only CC0058 #26
Generate Equals() and GetHashCode() for reference types CC0059 #50
Abstract class ctors should not have public constructors CC0060 #164
If method returns a Task it should have the postfix "Async" CC0061 #178
Interfaces should start with an "I" CC0062 #179
Validate Uri from System.Uri CC0063 #182
Validate IPAddress.Parse from System.Net CC0064 #188
Remove trailling whitespace CC0065 #201
Remove trailling end of line CC0066 #202
Virtual method call in constructor CC0067 [#203] (https://github.com/code-cracker/code-cracker/issues/203)
Remove private method is never used in a class CC0068 [#204] (https://github.com/code-cracker/code-cracker/issues/204)
Forward cancellation token to awaited methods CC0069 [#234] (https://github.com/code-cracker/code-cracker/issues/234)
Use ConfigureAwait(false) on awaited task CC0070 [#235] (https://github.com/code-cracker/code-cracker/issues/235)
Introduce field from constructor CC0071 [#241] (https://github.com/code-cracker/code-cracker/issues/241)
If method does not return a Task it shouldn't end with "Async" CC0072 [#245] (https://github.com/code-cracker/code-cracker/issues/245)
Add braces to switch case CC0073 [#252] (https://github.com/code-cracker/code-cracker/issues/252)
ReadonlyFieldAnalyzer CC0074
Merge nested if statements CC0075 [#131] (https://github.com/code-cracker/code-cracker/issues/131)
Split 'if' with '&&' condition into nested 'if'-statements CC0076 [#130] (https://github.com/code-cracker/code-cracker/issues/130)
"async void" should not be used CC0077 [#80] (https://github.com/code-cracker/code-cracker/issues/80)
Verifies if "reference type" parameters are null CC0078 [#132] (https://github.com/code-cracker/code-cracker/issues/132)
Convert numerical literal from decimal to hex and hex to decimal CC0079 [#119] (https://github.com/code-cracker/code-cracker/issues/119)
Change IIF to If to short circuit evaulations CC0080
Use static Regex.IsMatch CC0081 [#297] (https://github.com/code-cracker/code-cracker/issues/297)
Compute Constant Value of an expression CC0082 [#117] (https://github.com/code-cracker/code-cracker/issues/117)
Add property to constructor CC0083 [#307] (https://github.com/code-cracker/code-cracker/issues/307)
Use String.Empty CC0084 [#120] (https://github.com/code-cracker/code-cracker/issues/120)
Convert '==' to 'Equals' CC0085 [#118] (https://github.com/code-cracker/code-cracker/issues/118)
Convert 'Equals' to '==' CC0086 [#118] (https://github.com/code-cracker/code-cracker/issues/118)
Invert if CC0087 [#88] (https://github.com/code-cracker/code-cracker/issues/88)
Use "" instead of String.Empty CC0088 [#354] (https://github.com/code-cracker/code-cracker/issues/354)
Remove Redundant Else Clause CC0089 [#355] (https://github.com/code-cracker/code-cracker/issues/355)
XmlDocumentationAnalyzer - Incorrect params CC0090 [#357] (https://github.com/code-cracker/code-cracker/issues/357)
Make method static if possible CC0091 [#364] (https://github.com/code-cracker/code-cracker/issues/364)
"All" to "Not Any" CC0092 #31
Remove virtual modifier if possible CC0093 #371
Seal member if possible CC0094 #372
ChangeConsoleWriteLineToStringInterpolation CC0095 #380
Extract class to a new file CC0096 #382
XmlDocumentationAnalyzer - Missing params CC0097 #488
Prefer "Count" to "Count()" CC0098 #489
Prefer "Any" to "Count() > 0" CC0099 #490
IEnumerable possibly being enumerated more than once CC0100 #491
Convert abstract class to interface CC0101 #506
Convert Interface to abstract class CC0102 #507
`` CC0103
Convert to block bodied method from expression bodied method CC0104 #509
AlwaysUseVarAnalyzer_Primitives CC0105 #407
Create PropertyChangedEventArgs statically CC0106 #42
Convert anonymous delegate to lambda expression CC0107 #122
NameOfAnalyzer_External CC0108 #518
Implement interface and delegate calls to decorate CC0109 #572
Check consistency of optional parameter default value CC0110 #575
Check arguments in String.Format (Warning) CC0111
Readonly reference field is never assigned and is used CC0112 #647
IsNullOrWhiteSpace or IsNullOrEmpty CC0113 #695
Convert assignment to function name to return statement CC0114 #737
Hoist common sub-expression CC0115 #739
Replace assignment to variable with increment of variable CC0116 #742
Remove @ from variables that are not keywords CC0117 #746
Remove Unnecessary ToString in String Concatenation CC0118 #753
If statement can be replaced by null coalescing operator CC0119#765
Suggest Case Else for Select Case statements CC0120 #767
ReadOnlyField_ComplexValueTypes CC0121 #775
Replace Task.Result with await Task CC0122 #734
Rewrite a call using named arguments CC0123 #786
Replace if statement or operator with call to Math.Max CC0124 #799
Replace getter only properties with backing readonly field with getter-only auto-property CC0125 #881
Left and right side of assignment must not be the same entity CC0126 #746
`` CC0127
`` CC0128
`` CC0129
`` CC0130

Whenever an issue is ready to work and will produce an analyzer we should assign it a diagnostic id.

Clone this wiki locally