Unintelligible

Monday, May 24, 2010

Resharper 4.5 inspection severity list

For some reason, I couldn’t find a list of the different Resharper code inspections and their severity anywhere on the web (not even in Jetbrains’ site); this is useful to go through the available inspections with team members to decide which we should enable across our team.

So, for convenience, I’m posting one here; this is for Resharper 4.5. Click to expand the table.

Settings entry name Section Definition Default severity
ClassCanBeSealed.Global Code Redundancies Class can be made sealed - Non-private accessibility DO_NOT_SHOW
ClassCanBeSealed.Local Code Redundancies Class can be made sealed - Private accessibility DO_NOT_SHOW
MemberCanBeInternal Code Redundancies Member or type can be made internal DO_NOT_SHOW
ConvertIfStatementToReturnStatement Code Redundancies ‘if-return’ statement can be re-written as ‘return’ statement HINT
ConvertIfStatementToSwitchStatement Code Redundancies Convert ‘if’ statement to ’switch’ statement HINT
ConvertToAutoPropertyWithPrivateSetter Code Redundancies Convert property to auto-property with private setter HINT
InvertIf Code Redundancies Invert ‘if’ statement to reduce nesting HINT
SimilarAnonymousTypeNearby Code Redundancies Similar anonymous type detected nearby HINT
SuggestUseVarKeywordEverywhere Code Redundancies Use ‘var’ keyword when possible HINT
ClassNeverInstantiated.Global Code Redundancies Class is never instantiated - Non-private accessibility SUGGESTION
ClassNeverInstantiated.Local Code Redundancies Class is never instantiated - Private accessibility SUGGESTION
ClassWithVirtualMembersNeverInherited.Global Code Redundancies Class with virtual members never inherited - Non-private accessibility SUGGESTION
ClassWithVirtualMembersNeverInherited.Local Code Redundancies Class with virtual members never inherited - Private accessibility SUGGESTION
ConverClosureToMethodGroup Code Redundancies Convert anonymous method to method group SUGGESTION
ConvertConditionalTernaryToNullCoalescing Code Redundancies ‘?:’ expression can be re-written as ‘??’ expression SUGGESTION
ConvertIfStatementToConditionalTernaryExpression Code Redundancies ‘if’ statement can be re-written as ‘?:’ expression SUGGESTION
ConvertIfStatementToNullCoalescingExpression Code Redundancies ‘if’ statement can be re-written as ‘??’ expression SUGGESTION
ConvertNullableToShortForm Code Redundancies Convert ‘Nullable‘ to ‘T?’ SUGGESTION
ConvertToAutoProperty Code Redundancies Convert property to auto-property SUGGESTION
ConvertToConstant.Global Code Redundancies Convert local variable or field to constant - Non-private accessibility SUGGESTION
ConvertToConstant.Local Code Redundancies Convert local variable or field to constant - Private accessibility SUGGESTION
ConvertToLambdaExpression Code Redundancies Convert to lambda expression SUGGESTION
ConvertToStaticClass Code Redundancies Convert to static class SUGGESTION
EventNeverInvoked.Global Potential Errors & Bad Practices Abstract or virtual event is never invoked SUGGESTION
EventNeverSubscribedTo.Global Code Redundancies Event is never subscribed to - Non-private accessibility SUGGESTION
EventNeverSubscribedTo.Local Code Redundancies Event is never subscribed to - Private accessibility SUGGESTION
FieldCanBeMadeReadOnly.Global Code Redundancies Field can be made readonly - Non-private accessibility SUGGESTION
FieldCanBeMadeReadOnly.Local Code Redundancies Field can be made readonly - Private accessibility SUGGESTION
InvokeAsExtensionMethod Code Redundancies Convert static method invocation to extension method call SUGGESTION
JoinDeclarationAndInitializer Code Redundancies Join local variable declaration and assignment SUGGESTION
MemberCanBeMadeStatic.Global Code Redundancies Member can be made static - Non-private accessibility SUGGESTION
MemberCanBeMadeStatic.Local Code Redundancies Member can be made static - Private accessibility SUGGESTION
MemberCanBePrivate.Global Code Redundancies Member can be made private - Non-private accessibility SUGGESTION
MemberCanBePrivate.Local Code Redundancies Member can be made private - Private accessibility SUGGESTION
MemberCanBeProtected.Global Code Redundancies Member can be made protected - Non-private accessibility SUGGESTION
MemberCanBeProtected.Local Code Redundancies Member can be made protected - Private accessibility SUGGESTION
MoreSpecificForeachVariableTypeAvailable Code Redundancies Iteration variable can be declared with a more specific type SUGGESTION
PublicConstructorInAbstractClass Code Redundancies Make constructor in abstract class protected SUGGESTION
ReplaceWithStringIsNullOrEmpty Code Redundancies Use ‘String.IsNullOrEmpty’ SUGGESTION
SuggestBaseTypeForParameter Code Redundancies Parameter can be declared with base type SUGGESTION
SuggestUseVarKeywordEvident Code Redundancies Use ‘var’ keyword when initializer explicitly declares type SUGGESTION
SuspiciousTypeConversion.Global Potential Errors & Bad Practices Suspicious type conversion or check SUGGESTION
TooWideLocalVariableScope Code Redundancies Local variable has too wide declaration scope SUGGESTION
UnaccessedField.Global Code Redundancies Unaccessed field - Non-private accessibility SUGGESTION
UnassignedField.Global Potential Errors & Bad Practices Unassigned field SUGGESTION
UnusedMember.Global Code Redundancies Unused declaration - Non-private accessibility SUGGESTION
UnusedMethodReturnValue.Global Code Redundancies Method return value is never used - Non-private accessibility SUGGESTION
UnusedParameter.Global Code Redundancies Unused parameter - Non-private accessibility SUGGESTION
UseObjectOrCollectionInitializer Code Redundancies Use object or collection initializer when possible SUGGESTION
VirtualMemberNeverOverriden.Global Code Redundancies Virtual member is never overriden - Non-private accessibility SUGGESTION
VirtualMemberNeverOverriden.Local Code Redundancies Virtual member is never overriden - Private accessibility SUGGESTION
AccessToModifiedClosure Potential Errors & Bad Practices Access to modified closure WARNING
AccessToStaticMemberViaDerivedType Potential Errors & Bad Practices Access to a static member of a type via a derived type WARNING
AssignNullToNotNullAttribute Value Analysis Possible ‘null’ assignment to entity marked with ‘Value cannot be null’ attribute WARNING
BaseMemberHasParams Potential Errors & Bad Practices Base member has ‘params’ parameter, but overrider hasn’t WARNING
BitwiseOperatorOnEnumWihtoutFlags Potential Errors & Bad Practices Bitwise operation on enum which is not marked by [Flags] attribute WARNING
CannotApplyEqualityOperatorToType Potential Errors & Bad Practices Compare with ‘==’ types marked by ‘CannotApplyEqualityOperatorAttribute’ WARNING
CharImplicitlyConvertedToNumeric Potential Errors & Bad Practices Char is implicitly converted to integral numeric type WARNING
CompareNonConstrainedGenericWithNull Potential Errors & Bad Practices Possible compare of value type with ‘null’ WARNING
ConditionIsAlwaysTrueOrFalse Value Analysis Expression is always ‘true’ or always ‘false’ WARNING
ConstantNullColescingCondition Value Analysis ‘??’ condition is known to be null or not null WARNING
ConstructorInitializerLoop Potential Errors & Bad Practices Possible cyclic constructor call WARNING
DoNotCallOverridableMethodsInConstructor Potential Errors & Bad Practices Virtual member call in constructor WARNING
DoubleNegationOperator Code Redundancies Double negation operator WARNING
EmptyConstructor Code Redundancies Empty constructor WARNING
EmptyDestructor Code Redundancies Empty destructor WARNING
EmptyGeneralCatchClause Potential Errors & Bad Practices Empty general catch clause WARNING
EmptyNamespace Code Redundancies Empty namespace declaration WARNING
EnumUnderlyingTypeIsInt Code Redundancies Underlying type of enum is ‘int’ WARNING
FormatStringProblem Potential Errors & Bad Practices Problems in format string WARNING
ForStatementConditionIsTrue Code Redundancies ‘true’ is redundant as ‘for’-statement condition WARNING
FunctionNeverReturns Potential Errors & Bad Practices Function never returns WARNING
InconsistentNaming Potential Errors & Bad Practices Inconsistent Naming WARNING
LocalVariableHidesMember Potential Errors & Bad Practices Local variable hides member WARNING
ParameterHidesMember Potential Errors & Bad Practices Parameter hides member WARNING
PartialMethodWithSinglePart Code Redundancies Redundant ‘partial’ modifier on method declaration WARNING
PartialTypeWithSinglePart Code Redundancies Redundant ‘partial’ modifier on type declaration WARNING
PossibleIntendedRethrow Potential Errors & Bad Practices Exception rethrow possibly intended WARNING
PossibleInterfaceMemberAmbiguity Potential Errors & Bad Practices Possible ambiguity while accessing member by interface WARNING
PossibleLossOfFraction Potential Errors & Bad Practices Possible loss of fraction WARNING
PossibleNullReferenceException Value Analysis Possible ‘System.NullReferenceException’ WARNING
RedundantAnonymousTypePropertyName Code Redundancies Redundant anonymous type property explicit name WARNING
RedundantAssignment Code Redundancies Assignment is not used WARNING
RedundantAttributeParentheses Code Redundancies Parentheses are redundant if attribute has no arguments WARNING
RedundantBaseConstructorCall Code Redundancies Redundant base constructor call WARNING
RedundantBaseQualifier Code Redundancies Redundant ‘base.’ qualifier WARNING
RedundantBoolCompare Code Redundancies Redundant boolean comparison WARNING
RedundantCaseLabel Code Redundancies Redundant ‘case’ label WARNING
RedundantCast Code Redundancies Redundant cast WARNING
RedundantCatchClause Code Redundancies Redundant catch clause WARNING
RedundantCollectionInitializerElementBraces Code Redundancies Redundant braces in collection initializer WARNING
RedundantDefaultFieldInitializer Code Redundancies Redundant field initializer WARNING
RedundantDelegateCreation Code Redundancies Explicit delegate creation expression is redundant WARNING
RedundantEmptyFinallyBlock Code Redundancies Redundant empty finally block WARNING
RedundantEmptyObjectCreationArgumentList Code Redundancies Redundant empty argument list on object creation expression WARNING
RedundantEmptyObjectOrCollectionInitializer Code Redundancies Redundant empty object or collection initializer WARNING
RedundantExplicitArrayCreation Code Redundancies Redundant explicit type in array creation WARNING
RedundantExplicitArraySize Code Redundancies Redundant explicit size specification in array creation WARNING
RedundantExplicitNullableCreation Code Redundancies Redundant explicit nullable type creation WARNING
RedundantExtendsListEntry Code Redundancies Redundant class or interface specification in base types list WARNING
RedundantIfElseBlock Code Redundancies Redundant ‘else’ keyword WARNING
RedundantLambdaParameterType Code Redundancies Redundant lambda parameter explicit type specification WARNING
RedundantLambdaSignatureParentheses Code Redundancies Redundant lambda signature parentheses WARNING
RedundantNameQualifier Code Redundancies Redundant name qualifier WARNING
RedundantOverridenMember Code Redundancies Redundant member override WARNING
RedundantParams Code Redundancies ‘params’ modifier is always ignored on overrides WARNING
RedundantStringToCharArrayCall Code Redundancies Redundant ’string.ToCharArray()’ call WARNING
RedundantThisQualifier Code Redundancies Redundant ‘this.’ qualifier WARNING
RedundantToStringCall Code Redundancies Redundant ‘object.ToString()’ call WARNING
RedundantTypeArgumentsOfMethod Code Redundancies Redundant type arguments of method WARNING
RedundantUnsafeContext Code Redundancies Unsafe context declaration is redundant WARNING
RedundantUsingDirective Code Redundancies Redundant using directive WARNING
ReferenceEqualsWithValueType Potential Errors & Bad Practices ‘Object.ReferenceEquals’ is always false because it is called with value type WARNING
RequiredBaseTypesConflict Potential Errors & Bad Practices Required base type conflicting another type WARNING
RequiredBaseTypesDirectConflict Potential Errors & Bad Practices Type specified in BaseTypeRequired attribute conflicts another type WARNING
RequiredBaseTypesIsNotInherited Potential Errors & Bad Practices Base type is required WARNING
SealedMemberInSealedClass Code Redundancies Sealed member in sealed class WARNING
UnaccessedField.Local Code Redundancies Unaccessed field - Private accessibility WARNING
UnsupportedRequiredBaseType Potential Errors & Bad Practices BaseTypeRequired attribute supports only classes and interfaces WARNING
UnusedAnonymousMethodSignature Code Redundancies Anonymous method signature is not necessary WARNING
UnusedAutoPropertyAccessor.Global Potential Errors & Bad Practices Auto-implemented property accessor is never used - Non-private accessibility WARNING
UnusedAutoPropertyAccessor.Local Potential Errors & Bad Practices Auto-implemented property accessor is never used - Private accessibility WARNING
UnusedMember.Local Code Redundancies “”Unused declaration - Private accessibility WARNING
UnusedMethodReturnValue.Local Code Redundancies Method return value is never used - Private accessibility WARNING
UnusedParameter.Local Code Redundancies Unused parameter - Private accessibility WARNING
UnusedTypeParameter Code Redundancies Unused type parameter WARNING
ValueParameterNotUsed Potential Errors & Bad Practices ‘value’ parameter is not used WARNING

Apologies for the formatting; you can also download the CSV.

posted by Nick at 6:54 pm - filed in .net  

3 Comments »

  1. Alltough quite some time has passed there is still no such list…
    Thanks for providing this!

    Comment by Ralf — August 31, 2011 @ 7:50 am

  2. Thanks for the list, is quite old…. but is the newest about that in internet

    Comment by Javi — January 31, 2012 @ 5:14 pm

  3. Thanks you for sharing list

    Comment by dongth — November 21, 2012 @ 5:44 am

RSS feed for comments on this post. TrackBack URI

Leave a comment