ReSharper 2020.1 Help

Code Inspections in C#

In C#, ReSharper 2020.1 provides two kinds of code inspections: 824 inspections that detect errors such as broken syntax, unresolved symbols, compiler errors, and so on (you cannot configure or disable any of these inspections), and 665 proprietary code inspections, any of which you can disable or change its severity level.
These code inspections help you detect code issues in design time in all open files, and additionally they allow you to find code issues in specific scope.

Configurable C# inspections are listed below, grouped by their categories.

Code Notification (1 inspection)

This category groups code inspections with minor severity levels.
InspectionIDEditorConfig propertyDefault severity
Method invocation is skippedInvocationIsSkippedresharper_invocation_is_skipped_highlightingHint

Common Practices and Code Improvements (144 inspections)

This category groups inspections that hunt for medium severity issues that mainly affect code readability.
InspectionIDEditorConfig propertyDefault severity
Access to a static member of a type via a derived typeAccessToStaticMemberViaDerivedTyperesharper_access_to_static_member_via_derived_type_highlightingWarning
Annotation duplicate in hierarchyAnnotationRedundancyInHierarchyresharper_annotation_redundancy_in_hierarchy_highlightingWarning
Auto-property can be made get-only (non-private accessibility)AutoPropertyCanBeMadeGetOnly.Globalresharper_auto_property_can_be_made_get_only_global_highlightingSuggestion
Auto-property can be made get-only (private accessibility)AutoPropertyCanBeMadeGetOnly.Localresharper_auto_property_can_be_made_get_only_local_highlightingSuggestion
Base member has 'params' parameter, but overrider hasn'tBaseMemberHasParamsresharper_base_member_has_params_highlightingWarning
Check for reference equality insteadCheckForReferenceEqualityInstead.2resharper_check_for_reference_equality_instead_2_highlightingSuggestion
Check for reference equality insteadCheckForReferenceEqualityInstead.4resharper_check_for_reference_equality_instead_4_highlightingSuggestion
Check for reference equality insteadCheckForReferenceEqualityInstead.1resharper_check_for_reference_equality_instead_1_highlightingSuggestion
Check for reference equality insteadCheckForReferenceEqualityInstead.3resharper_check_for_reference_equality_instead_3_highlightingSuggestion
Class can be made sealed (non-inheritable) (non-private accessibility)ClassCanBeSealed.Globalresharper_class_can_be_sealed_global_highlightingDisabled
Class can be made sealed (non-inheritable) (private accessibility)ClassCanBeSealed.Localresharper_class_can_be_sealed_local_highlightingDisabled
Container nullability attribute usage with declaration of non-container typeContainerAnnotationRedundancyresharper_container_annotation_redundancy_highlightingWarning
Convert 'if do while' to 'whileConvertIfDoToWhileresharper_convert_if_do_to_while_highlightingSuggestion
Convert 'if' to '||'ConvertIfToOrExpressionresharper_convert_if_to_or_expression_highlightingSuggestion
Convert local variable or field to constant (non-private accessibility)ConvertToConstant.Globalresharper_convert_to_constant_global_highlightingHint
Convert local variable or field to constant (private accessibility)ConvertToConstant.Localresharper_convert_to_constant_local_highlightingHint
Declaration nullability inferred (parameter is inferred to be not null)AnnotateNotNullParameterresharper_annotate_not_null_parameter_highlightingDisabled
Declaration nullability inferred (parameter is inferred to be nullable)AnnotateCanBeNullParameterresharper_annotate_can_be_null_parameter_highlightingDisabled
Declaration nullability inferred (type member is inferred to be not null)AnnotateNotNullTypeMemberresharper_annotate_not_null_type_member_highlightingDisabled
Declaration nullability inferred (type member is inferred to be nullable)AnnotateCanBeNullTypeMemberresharper_annotate_can_be_null_type_member_highlightingDisabled
Empty control statement bodyEmptyEmbeddedStatementresharper_empty_embedded_statement_highlightingWarning
Empty statement is redundantEmptyStatementresharper_empty_statement_highlightingWarning
Field can be made readonly (non-private accessibility)FieldCanBeMadeReadOnly.Globalresharper_field_can_be_made_read_only_global_highlightingSuggestion
Field can be made readonly (private accessibility)FieldCanBeMadeReadOnly.Localresharper_field_can_be_made_read_only_local_highlightingSuggestion
Get-only auto-property is never assignedUnassignedGetOnlyAutoPropertyresharper_unassigned_get_only_auto_property_highlightingWarning
Invert conditionInvertCondition.1resharper_invert_condition_1_highlightingHint
Iteration variable can be declared with a more specific typeMoreSpecificForeachVariableTypeAvailableresharper_more_specific_foreach_variable_type_available_highlightingSuggestion
Join local variable declaration and assignmentJoinDeclarationAndInitializerresharper_join_declaration_and_initializer_highlightingSuggestion
Literal's length can be reduced by using verbatim stringUseVerbatimStringresharper_use_verbatim_string_highlightingHint
Local function can be made staticLocalFunctionCanBeMadeStaticresharper_local_function_can_be_made_static_highlightingHint
Local variable has too wide declaration scopeTooWideLocalVariableScoperesharper_too_wide_local_variable_scope_highlightingSuggestion
Make constructor in abstract class protectedPublicConstructorInAbstractClassresharper_public_constructor_in_abstract_class_highlightingSuggestion
Member can be made private (non-private accessibility)MemberCanBePrivate.Globalresharper_member_can_be_private_global_highlightingSuggestion
Member can be made private (private accessibility)MemberCanBePrivate.Localresharper_member_can_be_private_local_highlightingSuggestion
Member can be made protected (non-private accessibility)MemberCanBeProtected.Globalresharper_member_can_be_protected_global_highlightingSuggestion
Member can be made protected (private accessibility)MemberCanBeProtected.Localresharper_member_can_be_protected_local_highlightingSuggestion
Member can be made static(shared) (non-private accessibility)MemberCanBeMadeStatic.Globalresharper_member_can_be_made_static_global_highlightingHint
Member can be made static(shared) (private accessibility)MemberCanBeMadeStatic.Localresharper_member_can_be_made_static_local_highlightingHint
Member or type can be made internal(friend)MemberCanBeInternalresharper_member_can_be_internal_highlightingDisabled
Method has async overloadMethodHasAsyncOverloadresharper_method_has_async_overload_highlightingSuggestion
Method has async overload with cancellation supportMethodHasAsyncOverloadWithCancellationresharper_method_has_async_overload_with_cancellation_highlightingSuggestion
Method supports cancellationMethodSupportsCancellationresharper_method_supports_cancellation_highlightingSuggestion
Missing XML comment for private or internal type or memberInternalOrPrivateMemberNotDocumentedresharper_internal_or_private_member_not_documented_highlightingDisabled
Multiple nullable attributes usageMultipleNullableAttributesUsageresharper_multiple_nullable_attributes_usage_highlightingWarning
Nested string interpolation can be inlinedNestedStringInterpolationresharper_nested_string_interpolation_highlightingSuggestion
Nullability attribute usage with declaration of void or value typeAnnotationRedundancyAtValueTyperesharper_annotation_redundancy_at_value_type_highlightingWarning
Nullability attribute used with declaration that cannot be directly referenced from other codeNotObservableAnnotationRedundancyresharper_not_observable_annotation_redundancy_highlightingWarning
Parameter can be declared with base typeSuggestBaseTypeForParameterresharper_suggest_base_type_for_parameter_highlightingHint
Parameter type can be IEnumerable<T> (non-private accessibility)ParameterTypeCanBeEnumerable.Globalresharper_parameter_type_can_be_enumerable_global_highlightingHint
Parameter type can be IEnumerable<T> (private accessibility)ParameterTypeCanBeEnumerable.Localresharper_parameter_type_can_be_enumerable_local_highlightingHint
Possible mistaken argumentPossibleMistakenArgumentresharper_possible_mistaken_argument_highlightingWarning
Possible mistaken call to GetType()PossibleMistakenCallToGetType.1resharper_possible_mistaken_call_to_get_type_1_highlightingWarning
Possible mistaken call to GetType()PossibleMistakenCallToGetType.2resharper_possible_mistaken_call_to_get_type_2_highlightingWarning
Remove constructor invocationRemoveConstructorInvocationresharper_remove_constructor_invocation_highlightingDisabled
Remove redundant statementRemoveRedundantOrStatement.Trueresharper_remove_redundant_or_statement_true_highlightingSuggestion
Remove redundant statementRemoveRedundantOrStatement.Falseresharper_remove_redundant_or_statement_false_highlightingSuggestion
Remove ToList()RemoveToList.2resharper_remove_to_list_2_highlightingSuggestion
Remove ToList()RemoveToList.1resharper_remove_to_list_1_highlightingSuggestion
Replace with FirstOrDefault($args$)ReplaceWithFirstOrDefault.3resharper_replace_with_first_or_default_3_highlightingSuggestion
Replace with FirstOrDefault($args$)ReplaceWithFirstOrDefault.4resharper_replace_with_first_or_default_4_highlightingSuggestion
Replace with FirstOrDefault($args$)ReplaceWithFirstOrDefault.2resharper_replace_with_first_or_default_2_highlightingSuggestion
Replace with FirstOrDefault($args$)ReplaceWithFirstOrDefault.1resharper_replace_with_first_or_default_1_highlightingSuggestion
Replace with LastOrDefault($args$)ReplaceWithLastOrDefault.3resharper_replace_with_last_or_default_3_highlightingSuggestion
Replace with LastOrDefault($args$)ReplaceWithLastOrDefault.2resharper_replace_with_last_or_default_2_highlightingSuggestion
Replace with LastOrDefault($args$)ReplaceWithLastOrDefault.1resharper_replace_with_last_or_default_1_highlightingSuggestion
Replace with LastOrDefault($args$)ReplaceWithLastOrDefault.4resharper_replace_with_last_or_default_4_highlightingSuggestion
Replace with OfType<T>()ReplaceWithOfType.1resharper_replace_with_of_type_1_highlightingSuggestion
Replace with OfType<T>()ReplaceWithOfType.3resharper_replace_with_of_type_3_highlightingSuggestion
Replace with OfType<T>()ReplaceWithOfType.2resharper_replace_with_of_type_2_highlightingSuggestion
Replace with OfType<T>().Any()ReplaceWithOfType.Any.1resharper_replace_with_of_type_any_1_highlightingSuggestion
Replace with OfType<T>().Any() (replace with OfType<T>().Any(..))ReplaceWithOfType.Any.2resharper_replace_with_of_type_any_2_highlightingSuggestion
Replace with OfType<T>().Count()ReplaceWithOfType.Count.1resharper_replace_with_of_type_count_1_highlightingSuggestion
Replace with OfType<T>().Count() (replace with OfType<T>().Count(..))ReplaceWithOfType.Count.2resharper_replace_with_of_type_count_2_highlightingSuggestion
Replace with OfType<T>().First()ReplaceWithOfType.First.1resharper_replace_with_of_type_first_1_highlightingSuggestion
Replace with OfType<T>().First() (replace with OfType<T>().First(..))ReplaceWithOfType.First.2resharper_replace_with_of_type_first_2_highlightingSuggestion
Replace with OfType<T>().FirstOrDefault()ReplaceWithOfType.FirstOrDefault.1resharper_replace_with_of_type_first_or_default_1_highlightingSuggestion
Replace with OfType<T>().FirstOrDefault() (replace with OfType<T>().FirstOrDefault(..))ReplaceWithOfType.FirstOrDefault.2resharper_replace_with_of_type_first_or_default_2_highlightingSuggestion
Replace with OfType<T>().Last()ReplaceWithOfType.Last.1resharper_replace_with_of_type_last_1_highlightingSuggestion
Replace with OfType<T>().Last() (replace with OfType<T>().Last(..))ReplaceWithOfType.Last.2resharper_replace_with_of_type_last_2_highlightingSuggestion
Replace with OfType<T>().LastOrDefault()ReplaceWithOfType.LastOrDefault.1resharper_replace_with_of_type_last_or_default_1_highlightingSuggestion
Replace with OfType<T>().LastOrDefault() (replace with OfType<T>().LastOrDefault(..))ReplaceWithOfType.LastOrDefault.2resharper_replace_with_of_type_last_or_default_2_highlightingSuggestion
Replace with OfType<T>().LongCount()ReplaceWithOfType.LongCountresharper_replace_with_of_type_long_count_highlightingSuggestion
Replace with OfType<T>().Single()ReplaceWithOfType.Single.1resharper_replace_with_of_type_single_1_highlightingSuggestion
Replace with OfType<T>().Single() (replace with OfType<T>().Single(..))ReplaceWithOfType.Single.2resharper_replace_with_of_type_single_2_highlightingSuggestion
Replace with OfType<T>().SingleOrDefault()ReplaceWithOfType.SingleOrDefault.1resharper_replace_with_of_type_single_or_default_1_highlightingSuggestion
Replace with OfType<T>().SingleOrDefault() (replace with OfType<T>().SingleOrDefault(..))ReplaceWithOfType.SingleOrDefault.2resharper_replace_with_of_type_single_or_default_2_highlightingSuggestion
Replace with OfType<T>().Where() (replace with OfType<T>().Where(..))ReplaceWithOfType.Whereresharper_replace_with_of_type_where_highlightingSuggestion
Replace with simple assignmentReplaceWithSimpleAssignment.Trueresharper_replace_with_simple_assignment_true_highlightingSuggestion
Replace with simple assignmentReplaceWithSimpleAssignment.Falseresharper_replace_with_simple_assignment_false_highlightingSuggestion
Replace with single assignmentReplaceWithSingleAssignment.Falseresharper_replace_with_single_assignment_false_highlightingSuggestion
Replace with single assignmentReplaceWithSingleAssignment.Trueresharper_replace_with_single_assignment_true_highlightingSuggestion
Replace with single call to Any(..)ReplaceWithSingleCallToAnyresharper_replace_with_single_call_to_any_highlightingSuggestion
Replace with single call to Count(..)ReplaceWithSingleCallToCountresharper_replace_with_single_call_to_count_highlightingSuggestion
Replace with single call to First(..)ReplaceWithSingleCallToFirstresharper_replace_with_single_call_to_first_highlightingSuggestion
Replace with single call to FirstOrDefault(..)ReplaceWithSingleCallToFirstOrDefaultresharper_replace_with_single_call_to_first_or_default_highlightingSuggestion
Replace with single call to Last(..)ReplaceWithSingleCallToLastresharper_replace_with_single_call_to_last_highlightingSuggestion
Replace with single call to LastOrDefault(..)ReplaceWithSingleCallToLastOrDefaultresharper_replace_with_single_call_to_last_or_default_highlightingSuggestion
Replace with single call to Single(..)ReplaceWithSingleCallToSingleresharper_replace_with_single_call_to_single_highlightingSuggestion
Replace with single call to SingleOrDefault(..)ReplaceWithSingleCallToSingleOrDefaultresharper_replace_with_single_call_to_single_or_default_highlightingSuggestion
Replace with SingleOrDefault($args$)ReplaceWithSingleOrDefault.2resharper_replace_with_single_or_default_2_highlightingSuggestion
Replace with SingleOrDefault($args$)ReplaceWithSingleOrDefault.4resharper_replace_with_single_or_default_4_highlightingSuggestion
Replace with SingleOrDefault($args$)ReplaceWithSingleOrDefault.3resharper_replace_with_single_or_default_3_highlightingSuggestion
Replace with SingleOrDefault($args$)ReplaceWithSingleOrDefault.1resharper_replace_with_single_or_default_1_highlightingSuggestion
Return type can be IEnumerable<T> (non-private accessibility)ReturnTypeCanBeEnumerable.Globalresharper_return_type_can_be_enumerable_global_highlightingHint
Return type can be IEnumerable<T> (private accessibility)ReturnTypeCanBeEnumerable.Localresharper_return_type_can_be_enumerable_local_highlightingHint
Simplify conditional ternary expressionSimplifyConditionalTernaryExpressionresharper_simplify_conditional_ternary_expression_highlightingSuggestion
Simplify LINQ expressionSimplifyLinqExpressionresharper_simplify_linq_expression_highlightingSuggestion
Simplify negative equality expressionNegativeEqualityExpressionresharper_negative_equality_expression_highlightingSuggestion
Specify string comparison explicitlySpecifyStringComparisonresharper_specify_string_comparison_highlightingHint
Specify string culture explicitlySpecifyACultureInStringConversionExplicitlyresharper_specify_a_culture_in_string_conversion_explicitly_highlightingWarning
String literal can be inlinedStringLiteralAsInterpolationArgumentresharper_string_literal_as_interpolation_argument_highlightingSuggestion
String.Compare is culture-specific (string.Compare(string, int, string, int) is culture-specific)StringCompareIsCultureSpecific.4resharper_string_compare_is_culture_specific_4_highlightingWarning
String.Compare is culture-specific (string.Compare(string, int, string, int, bool) is culture-specific)StringCompareIsCultureSpecific.6resharper_string_compare_is_culture_specific_6_highlightingWarning
String.Compare is culture-specific (string.Compare(string, int, string, int, bool) is culture-specific)StringCompareIsCultureSpecific.5resharper_string_compare_is_culture_specific_5_highlightingWarning
String.Compare is culture-specific (string.Compare(string, string) is culture-specific)StringCompareIsCultureSpecific.1resharper_string_compare_is_culture_specific_1_highlightingWarning
String.Compare is culture-specific (string.Compare(string, string, bool) is culture-specific)StringCompareIsCultureSpecific.3resharper_string_compare_is_culture_specific_3_highlightingWarning
String.Compare is culture-specific (string.Compare(string, string, bool) is culture-specific)StringCompareIsCultureSpecific.2resharper_string_compare_is_culture_specific_2_highlightingWarning
String.CompareTo is culture-specificStringCompareToIsCultureSpecificresharper_string_compare_to_is_culture_specific_highlightingWarning
String.EndsWith is culture-specific (string.EndsWith(string) is culture-specific)StringEndsWithIsCultureSpecificresharper_string_ends_with_is_culture_specific_highlightingDisabled
String.IndexOf is culture-specific (string.IndexOf(string) is culture-specific)StringIndexOfIsCultureSpecific.1resharper_string_index_of_is_culture_specific_1_highlightingWarning
String.IndexOf is culture-specific (string.IndexOf(string, int) is culture-specific)StringIndexOfIsCultureSpecific.2resharper_string_index_of_is_culture_specific_2_highlightingWarning
String.IndexOf is culture-specific (string.IndexOf(string, int) is culture-specific)StringIndexOfIsCultureSpecific.3resharper_string_index_of_is_culture_specific_3_highlightingWarning
String.LastIndexOf is culture-specific (string.LastIndexOf(string) is culture-specific)StringLastIndexOfIsCultureSpecific.1resharper_string_last_index_of_is_culture_specific_1_highlightingWarning
String.LastIndexOf is culture-specific (string.LastIndexOf(string, int) is culture-specific)StringLastIndexOfIsCultureSpecific.3resharper_string_last_index_of_is_culture_specific_3_highlightingWarning
String.LastIndexOf is culture-specific (string.LastIndexOf(string, int) is culture-specific)StringLastIndexOfIsCultureSpecific.2resharper_string_last_index_of_is_culture_specific_2_highlightingWarning
String.StartsWith is culture-specific (string.StartsWith(string) is culture-specific)StringStartsWithIsCultureSpecificresharper_string_starts_with_is_culture_specific_highlightingDisabled
Struct can be made readonlyStructCanBeMadeReadOnlyresharper_struct_can_be_made_read_only_highlightingSuggestion
Struct member can be made readonlyStructMemberCanBeMadeReadOnlyresharper_struct_member_can_be_made_read_only_highlightingDisabled
try-catch and try-finally statements can be mergedTryStatementsCanBeMergedresharper_try_statements_can_be_merged_highlightingHint
Type parameter could be declared as covariant or contravariantTypeParameterCanBeVariantresharper_type_parameter_can_be_variant_highlightingSuggestion
Unreachable code detectedUnreachableCoderesharper_unreachable_code_highlightingWarning
Use array creation expressionUseArrayCreationExpression.1resharper_use_array_creation_expression_1_highlightingSuggestion
Use array creation expressionUseArrayCreationExpression.2resharper_use_array_creation_expression_2_highlightingSuggestion
Use cancellation tokenUseCancellationTokenForIAsyncEnumerableresharper_use_cancellation_token_for_i_async_enumerable_highlightingSuggestion
Use indexed propertyUseIndexedPropertyresharper_use_indexed_property_highlightingSuggestion
Use 'is' operatorUseIsOperator.2resharper_use_is_operator_2_highlightingSuggestion
Use 'is' operatorUseIsOperator.1resharper_use_is_operator_1_highlightingSuggestion
Use method Any()UseMethodAny.4resharper_use_method_any_4_highlightingSuggestion
Use method Any()UseMethodAny.1resharper_use_method_any_1_highlightingSuggestion
Use method Any()UseMethodAny.3resharper_use_method_any_3_highlightingSuggestion
Use method Any()UseMethodAny.0resharper_use_method_any_0_highlightingSuggestion
Use method Any()UseMethodAny.2resharper_use_method_any_2_highlightingSuggestion
Use method IsInstanceOfType(..)UseMethodIsInstanceOfTyperesharper_use_method_is_instance_of_type_highlightingSuggestion
Use 'String.IsNullOrEmpty'ReplaceWithStringIsNullOrEmptyresharper_replace_with_string_is_null_or_empty_highlightingSuggestion

Compiler Warnings (100 inspections)

Inspections in this category detect compiler warnings before you compile.
InspectionIDEditorConfig propertyDefault severity
'#warning' directiveCSharpWarnings::CS1030resharper_c_sharp_warnings_cs1030_highlightingWarning
A previous catch clause already catches all exceptionsCSharpWarnings::CS1058resharper_c_sharp_warnings_cs1058_highlightingWarning
Access to a member through 'base' keyword from anonymous method, lambda expression, query expression or iterator results in unverifiable codeCSharpWarnings::CS1911resharper_c_sharp_warnings_cs1911_highlightingWarning
Alignment value 'value' has a magnitude greater than 'magnitude limit' and may result in a large formatted string.CSharpWarnings::CS8094resharper_c_sharp_warnings_cs8094_highlightingWarning
Ambiguous reference in XML commentCSharpWarnings::CS1574resharper_c_sharp_warnings_cs1574_highlightingWarning
Argument cannot be used as an output for parameter due to differences in the nullability of reference types.CSharpWarnings::CS8624resharper_c_sharp_warnings_cs8624_highlightingWarning
Argument cannot be used for corresponding parameter due to differences in the nullability of reference types.CSharpWarnings::CS8620resharper_c_sharp_warnings_cs8620_highlightingWarning
Assignment in conditional expressionCSharpWarnings::CS0665resharper_c_sharp_warnings_cs0665_highlightingWarning
Assignment made to same variableCSharpWarnings::CS1717resharper_c_sharp_warnings_cs1717_highlightingWarning
Async function without await expressionCSharpWarnings::CS1998resharper_c_sharp_warnings_cs1998_highlightingWarning
Async method invocation without await expressionCSharpWarnings::CS4014resharper_c_sharp_warnings_cs4014_highlightingWarning
Async-iterator has one or more parameters of type 'CancellationToken' but none of them is annotated with the 'EnumeratorCancellation' attribute.CSharpWarnings::CS8425resharper_c_sharp_warnings_cs8425_highlightingWarning
'attribute modifier' is not a recognized attribute location. All attributes in this block will be ignoredCSharpWarnings::CS0658resharper_c_sharp_warnings_cs0658_highlightingWarning
'attribute modifier' is not a valid attribute location for this declaration. All attributes in this block will be ignoredCSharpWarnings::CS0657resharper_c_sharp_warnings_cs0657_highlightingWarning
Badly formed XML in included comments fileCSharpWarnings::CS1592resharper_c_sharp_warnings_cs1592_highlightingWarning
Call to a non-readonly member from a 'readonly' member results in an implicit copy of 'this'CSharpWarnings::CS8656resharper_c_sharp_warnings_cs8656_highlightingWarning
Cannot convert null literal to non-nullable reference type.CSharpWarnings::CS8625resharper_c_sharp_warnings_cs8625_highlightingWarning
Cannot resolve reference in XML commentCSharpWarnings::CS1574,CS1584,CS1581,CS1580resharper_c_sharp_warnings_cs1574_cs1584_cs1581_cs1580_highlightingWarning
Class overrides Object.Equals(object o) but not Object.GetHashCode()CSharpWarnings::CS0659resharper_c_sharp_warnings_cs0659_highlightingWarning
Code is unreachableCSharpWarnings::CS0162resharper_c_sharp_warnings_cs0162_highlightingWarning
Converting null literal or possible null value to non-nullable type.CSharpWarnings::CS8600resharper_c_sharp_warnings_cs8600_highlightingWarning
Declaring new protected member in sealed class is the same as declaring it as privateCSharpWarnings::CS0628resharper_c_sharp_warnings_cs0628_highlightingWarning
Default value specified for parameter will have no effect because it applies to a member that is used in contexts that do not allow optional argumentsCSharpWarnings::CS1066resharper_c_sharp_warnings_cs1066_highlightingWarning
Dereference of a possibly null reference.CSharpWarnings::CS8602resharper_c_sharp_warnings_cs8602_highlightingWarning
Duplicate param tag in XML commentCSharpWarnings::CS1571resharper_c_sharp_warnings_cs1571_highlightingWarning
Duplicate typeparam tag in XML commentCSharpWarnings::CS1710resharper_c_sharp_warnings_cs1710_highlightingWarning
Empty switch blockCSharpWarnings::CS1522resharper_c_sharp_warnings_cs1522_highlightingWarning
Field is never usedUnusedField.Compilerresharper_unused_field_compiler_highlightingWarning
Filter expression is a constant, consider removing the filterCSharpWarnings::CS7095resharper_c_sharp_warnings_cs7095_highlightingWarning
Given expression is always of the provided typeCSharpWarnings::CS0183resharper_c_sharp_warnings_cs0183_highlightingWarning
Given expression is never of the provided typeCSharpWarnings::CS0184resharper_c_sharp_warnings_cs0184_highlightingWarning
'goto case' value is not implicitly convertible to required typeCSharpWarnings::CS0469resharper_c_sharp_warnings_cs0469_highlightingWarning
Incorrect signature in XML commentCSharpWarnings::CS1580resharper_c_sharp_warnings_cs1580_highlightingWarning
Introducing a 'Finalize' method can interfere with destructor invocationCSharpWarnings::CS0465resharper_c_sharp_warnings_cs0465_highlightingWarning
Invalid XML in XML commentCSharpWarnings::CS1570resharper_c_sharp_warnings_cs1570_highlightingWarning
Invalid XML include elementCSharpWarnings::CS1590resharper_c_sharp_warnings_cs1590_highlightingWarning
Keyword 'new' is redundantCSharpWarnings::CS0109resharper_c_sharp_warnings_cs0109_highlightingWarning
Keyword 'new' is requiredCSharpWarnings::CS0108,CS0114resharper_c_sharp_warnings_cs0108_cs0114_highlightingWarning
Member overrides obsolete memberCSharpWarnings::CS0672resharper_c_sharp_warnings_cs0672_highlightingWarning
Missing XML comment for publicly visible type or memberCSharpWarnings::CS1591resharper_c_sharp_warnings_cs1591_highlightingWarning
Multiple override candidates at run-timeCSharpWarnings::CS1957resharper_c_sharp_warnings_cs1957_highlightingWarning
Namespace should be default namespace of this projectCSharpWarnings::WME006resharper_c_sharp_warnings_wme006_highlightingWarning
Non-accessed fieldNotAccessedField.Compilerresharper_not_accessed_field_compiler_highlightingWarning
Non-accessed local variableNotAccessedVariable.Compilerresharper_not_accessed_variable_compiler_highlightingWarning
Non-nullable member is uninitialized.CSharpWarnings::CS8618resharper_c_sharp_warnings_cs8618_highlightingWarning
Nullability mismatch in constraints for type parameter.CSharpWarnings::CS8633resharper_c_sharp_warnings_cs8633_highlightingWarning
Nullability of reference types in explicit interface specifier doesn't match interface implemented by the type.CSharpWarnings::CS8643resharper_c_sharp_warnings_cs8643_highlightingWarning
Nullability of reference types in interface implemented by the base type doesn't match.CSharpWarnings::CS8644resharper_c_sharp_warnings_cs8644_highlightingWarning
Nullability of reference types in return type doesn't match implemented member.CSharpWarnings::CS8616resharper_c_sharp_warnings_cs8616_highlightingWarning
Nullability of reference types in return type doesn't match implicitly implemented member.CSharpWarnings::CS8613resharper_c_sharp_warnings_cs8613_highlightingWarning
Nullability of reference types in return type doesn't match overridden member.CSharpWarnings::CS8609resharper_c_sharp_warnings_cs8609_highlightingWarning
Nullability of reference types in return type doesn't match the target delegate.CSharpWarnings::CS8621resharper_c_sharp_warnings_cs8621_highlightingWarning
Nullability of reference types in source type doesn't match target type.CSharpWarnings::CS8619resharper_c_sharp_warnings_cs8619_highlightingWarning
Nullability of reference types in type doesn't match implemented member.CSharpWarnings::CS8615resharper_c_sharp_warnings_cs8615_highlightingWarning
Nullability of reference types in type doesn't match implicitly implemented member.CSharpWarnings::CS8612resharper_c_sharp_warnings_cs8612_highlightingWarning
Nullability of reference types in type doesn't match overridden member.CSharpWarnings::CS8608resharper_c_sharp_warnings_cs8608_highlightingWarning
Nullability of reference types in type of a parameter doesn't match the target delegate.CSharpWarnings::CS8622resharper_c_sharp_warnings_cs8622_highlightingWarning
Nullability of reference types in type of parameter doesn't match implemented member.CSharpWarnings::CS8617resharper_c_sharp_warnings_cs8617_highlightingWarning
Nullability of reference types in type of parameter doesn't match implicitly implemented member.CSharpWarnings::CS8614resharper_c_sharp_warnings_cs8614_highlightingWarning
Nullability of reference types in type of parameter doesn't match overridden member.CSharpWarnings::CS8610resharper_c_sharp_warnings_cs8610_highlightingWarning
Nullability of reference types in type of parameter doesn't match partial method declaration.CSharpWarnings::CS8611resharper_c_sharp_warnings_cs8611_highlightingWarning
Nullability of type argument doesn't match 'class' constraint.CSharpWarnings::CS8634resharper_c_sharp_warnings_cs8634_highlightingWarning
Nullability of type argument doesn't match constraint type.CSharpWarnings::CS8631resharper_c_sharp_warnings_cs8631_highlightingWarning
Nullability of type argument doesn't match 'notnull' constraint.CSharpWarnings::CS8714resharper_c_sharp_warnings_cs8714_highlightingWarning
Nullable value type may be null.CSharpWarnings::CS8629resharper_c_sharp_warnings_cs8629_highlightingWarning
Operator '==' or operator '!=' with 'Object.Equals(object o)' and 'Object.GetHashCode()' not overriddenCSharpWarnings::CS0660,CS0661resharper_c_sharp_warnings_cs0660_cs0661_highlightingWarning
Parameter has no matching param tag in the XML commentCSharpWarnings::CS1573resharper_c_sharp_warnings_cs1573_highlightingWarning
Partial method declarations have inconsistent nullability for type parameter.CSharpWarnings::CS8667resharper_c_sharp_warnings_cs8667_highlightingWarning
Possible mistaken empty statementCSharpWarnings::CS0642resharper_c_sharp_warnings_cs0642_highlightingWarning
Possible null reference argument for a parameter.CSharpWarnings::CS8604resharper_c_sharp_warnings_cs8604_highlightingWarning
Possible null reference assignment to iteration variable.CSharpWarnings::CS8606resharper_c_sharp_warnings_cs8606_highlightingWarning
Possible null reference assignment.CSharpWarnings::CS8601resharper_c_sharp_warnings_cs8601_highlightingWarning
Possible null reference return.CSharpWarnings::CS8603resharper_c_sharp_warnings_cs8603_highlightingWarning
Possible unintended reference comparisonCSharpWarnings::CS0252,CS0253resharper_c_sharp_warnings_cs0252_cs0253_highlightingWarning
Reference to a volatile field will not be treated as volatileCSharpWarnings::CS0420resharper_c_sharp_warnings_cs0420_highlightingWarning
Syntax error in XML commentCSharpWarnings::CS1584resharper_c_sharp_warnings_cs1584_highlightingWarning
Taking address of marshal-by-reference class fieldCSharpWarnings::CS0197resharper_c_sharp_warnings_cs0197_highlightingWarning
The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.CSharpWarnings::CS8632resharper_c_sharp_warnings_cs8632_highlightingWarning
The given expression always matches the provided constant.CSharpWarnings::CS8417resharper_c_sharp_warnings_cs8417_highlightingWarning
The given expression never matches the provided pattern.CSharpWarnings::CS8416resharper_c_sharp_warnings_cs8416_highlightingWarning
The 'l' suffix is easily confused with the digit '1'CSharpWarnings::CS0078resharper_c_sharp_warnings_cs0078_highlightingWarning
The switch expression does not handle all possible inputs (it is not exhaustive).CSharpWarnings::CS8509resharper_c_sharp_warnings_cs8509_highlightingWarning
The tuple element name is ignored because a different name or no name is specified by the target type.CSharpWarnings::CS8123resharper_c_sharp_warnings_cs8123_highlightingWarning
The tuple element name is ignored because a different name or no name is specified on the other side of the tuple == or != operator.CSharpWarnings::CS8383resharper_c_sharp_warnings_cs8383_highlightingWarning
Thrown value may be null.CSharpWarnings::CS8597resharper_c_sharp_warnings_cs8597_highlightingWarning
Type is already listed in the interface list with different nullability of reference types.CSharpWarnings::CS8645resharper_c_sharp_warnings_cs8645_highlightingWarning
Type parameter has no matching typeparam tag in the XML commentCSharpWarnings::CS1712resharper_c_sharp_warnings_cs1712_highlightingWarning
Type parameter has the same name as a type parameter from the outer typeCSharpWarnings::CS0693resharper_c_sharp_warnings_cs0693_highlightingWarning
Unable to include XML fragmentCSharpWarnings::CS1589resharper_c_sharp_warnings_cs1589_highlightingWarning
Unassigned fieldUnassignedField.Compilerresharper_unassigned_field_compiler_highlightingWarning
Unassigned readonly fieldUnassignedReadonlyField.Compilerresharper_unassigned_readonly_field_compiler_highlightingWarning
Unboxing a possibly null value.CSharpWarnings::CS8605resharper_c_sharp_warnings_cs8605_highlightingWarning
Unused local variableUnusedVariable.Compilerresharper_unused_variable_compiler_highlightingWarning
Use of obsolete symbolCSharpWarnings::CS0618resharper_c_sharp_warnings_cs0618_highlightingWarning
Use of obsolete symbol (without message)CSharpWarnings::CS0612resharper_c_sharp_warnings_cs0612_highlightingWarning
Using 'is' to test compatibility with 'dynamic' is essentially identical to testing compatibility with 'Object' and will succeed for all non-null valuesCSharpWarnings::CS1981resharper_c_sharp_warnings_cs1981_highlightingWarning
XML comment has a 'param' tag for 'Parameter', but there is no parameter by that nameCSharpWarnings::CS1572resharper_c_sharp_warnings_cs1572_highlightingWarning
XML comment has a 'typeparam' tag for 'TypeParameter', but there is no type parameter by that nameCSharpWarnings::CS1711resharper_c_sharp_warnings_cs1711_highlightingWarning
XML comment has cref attribute that refers to a type parameterCSharpWarnings::CS1723resharper_c_sharp_warnings_cs1723_highlightingWarning
XML comment is not placed on a valid language elementCSharpWarnings::CS1587resharper_c_sharp_warnings_cs1587_highlightingWarning

Constraints Violations (10 inspections)

This category includes code inspections, mostly with the warning severity level, which detect violations related to symbol attributes, including ReSharper's code annotations, and other similar issues.
InspectionIDEditorConfig propertyDefault severity
Base type is requiredRequiredBaseTypesIsNotInheritedresharper_required_base_types_is_not_inherited_highlightingWarning
BaseTypeRequired attribute supports only classes and interfacesUnsupportedRequiredBaseTyperesharper_unsupported_required_base_type_highlightingWarning
Compare with '==' types marked by 'CannotApplyEqualityOperatorAttribute'CannotApplyEqualityOperatorToTyperesharper_cannot_apply_equality_operator_to_type_highlightingWarning
Inconsistent NamingInconsistentNamingresharper_inconsistent_naming_highlightingWarning
Namespace does not correspond to file locationCheckNamespaceresharper_check_namespace_highlightingWarning
Non-nullable member is not initialized at constructor exitNotNullMemberIsNotInitializedresharper_not_null_member_is_not_initialized_highlightingWarning
Possible 'null' assignment to non-nullable entityAssignNullToNotNullAttributeresharper_assign_null_to_not_null_attribute_highlightingWarning
Problem in contract annotation definitionContractAnnotationNotParsedresharper_contract_annotation_not_parsed_highlightingWarning
Required base type conflicting another typeRequiredBaseTypesConflictresharper_required_base_types_conflict_highlightingWarning
Type specified in '[BaseTypeRequired]' attribute conflicts another typeRequiredBaseTypesDirectConflictresharper_required_base_types_direct_conflict_highlightingWarning

Formatting (41 inspections)

Inspections in this category detect code code formatting problems.
InspectionIDEditorConfig propertyDefault severity
Incorrect blank lines (blank lines are missing elsewhere)MissingBlankLinesresharper_missing_blank_lines_highlightingDisabled
Incorrect blank lines (blank lines are redundant elsewhere)RedundantBlankLinesresharper_redundant_blank_lines_highlightingDisabled
Incorrect blank lines (incorrect number of blank lines near braces)IncorrectBlankLinesNearBracesresharper_incorrect_blank_lines_near_braces_highlightingDisabled
Incorrect indent (around child statement)BadChildStatementIndentresharper_bad_child_statement_indent_highlightingWarning
Incorrect indent (around declaration braces)BadDeclarationBracesIndentresharper_bad_declaration_braces_indent_highlightingDisabled
Incorrect indent (around expression braces)BadExpressionBracesIndentresharper_bad_expression_braces_indent_highlightingDisabled
Incorrect indent (around namespace braces)BadNamespaceBracesIndentresharper_bad_namespace_braces_indent_highlightingDisabled
Incorrect indent (around preprocessor directive)BadPreprocessorIndentresharper_bad_preprocessor_indent_highlightingDisabled
Incorrect indent (around statement braces)BadControlBracesIndentresharper_bad_control_braces_indent_highlightingSuggestion
Incorrect indent (around switch statement)BadSwitchBracesIndentresharper_bad_switch_braces_indent_highlightingDisabled
Incorrect indent (incorrect indent size)WrongIndentSizeresharper_wrong_indent_size_highlightingDisabled
Incorrect indent (line indent should be restored to the previous level elsewhere)OutdentIsOffPrevLevelresharper_outdent_is_off_prev_level_highlightingDisabled
Incorrect indent (line indent should not be changed relative to the previous line elsewhere)BadIndentresharper_bad_indent_highlightingDisabled
Incorrect indent (line should be indented or outdented elsewhere)MissingIndentresharper_missing_indent_highlightingDisabled
Incorrect indent (tabs/spaces mismatch)TabsAndSpacesMismatchresharper_tabs_and_spaces_mismatch_highlightingDisabled
Incorrect line breaks (around comma in lists)BadListLineBreaksresharper_bad_list_line_breaks_highlightingDisabled
Incorrect line breaks (around declaration braces)BadDeclarationBracesLineBreaksresharper_bad_declaration_braces_line_breaks_highlightingDisabled
Incorrect line breaks (around empty braces)BadEmptyBracesLineBreaksresharper_bad_empty_braces_line_breaks_highlightingDisabled
Incorrect line breaks (around expression braces)BadExpressionBracesLineBreaksresharper_bad_expression_braces_line_breaks_highlightingDisabled
Incorrect line breaks (around LINQ queries)BadLinqLineBreaksresharper_bad_linq_line_breaks_highlightingDisabled
Incorrect line breaks (around parenthesis)BadParensLineBreaksresharper_bad_parens_line_breaks_highlightingDisabled
Incorrect line breaks (around statement braces)BadControlBracesLineBreaksresharper_bad_control_braces_line_breaks_highlightingDisabled
Incorrect line breaks (line break is missing elsewhere)MissingLinebreakresharper_missing_linebreak_highlightingDisabled
Incorrect line breaks (line break is redundant elsewhere)RedundantLinebreakresharper_redundant_linebreak_highlightingDisabled
Incorrect line breaks (multiple statements on one line)MultipleStatementsOnOneLineresharper_multiple_statements_on_one_line_highlightingDisabled
Incorrect line breaks (multiple type members on one line)MultipleTypeMembersOnOneLineresharper_multiple_type_members_on_one_line_highlightingDisabled
Incorrect spacing (around attributes)BadAttributeBracketsSpacesresharper_bad_attribute_brackets_spaces_highlightingDisabled
Incorrect spacing (around braces)BadBracesSpacesresharper_bad_braces_spaces_highlightingDisabled
Incorrect spacing (around colon)BadColonSpacesresharper_bad_colon_spaces_highlightingDisabled
Incorrect spacing (around comma)BadCommaSpacesresharper_bad_comma_spaces_highlightingDisabled
Incorrect spacing (around generic brackets)BadGenericBracketsSpacesresharper_bad_generic_brackets_spaces_highlightingDisabled
Incorrect spacing (around member access symbols)BadMemberAccessSpacesresharper_bad_member_access_spaces_highlightingDisabled
Incorrect spacing (around operator symbols)BadSymbolSpacesresharper_bad_symbol_spaces_highlightingDisabled
Incorrect spacing (around parenthesis)BadParensSpacesresharper_bad_parens_spaces_highlightingDisabled
Incorrect spacing (around semicolon)BadSemicolonSpacesresharper_bad_semicolon_spaces_highlightingDisabled
Incorrect spacing (around square brackets within a statement)BadSquareBracketsSpacesresharper_bad_square_brackets_spaces_highlightingDisabled
Incorrect spacing (between keyword and parenthesis)BadSpacesAfterKeywordresharper_bad_spaces_after_keyword_highlightingDisabled
Incorrect spacing (multiple spaces are prohibited)MultipleSpacesresharper_multiple_spaces_highlightingDisabled
Incorrect spacing (space is missing elsewhere)MissingSpaceresharper_missing_space_highlightingDisabled
Incorrect spacing (space is redundant elsewhere)RedundantSpaceresharper_redundant_space_highlightingDisabled
Incorrect spacing (tabs are prohibited here)TabsOutsideIndentresharper_tabs_outside_indent_highlightingDisabled

Language Usage Opportunities (49 inspections)

This category includes code inspections, mostly with the suggestion severity level, which notify you when more advanced language constructs can be used. These inspections detect syntax of outdated language versions and suggest using features from more modern language versions. For most of the supported languages, language version can be detected automatically or set manually.
InspectionIDEditorConfig propertyDefault severity
Class cannot be instantiatedClassCannotBeInstantiatedresharper_class_cannot_be_instantiated_highlightingWarning
Convert 'as' expression type check and the following null check into negated pattern matchingUseNegatedPatternMatchingresharper_use_negated_pattern_matching_highlightingHint
Convert 'as' expression type check and the following null check into pattern matchingUsePatternMatchingresharper_use_pattern_matching_highlightingSuggestion
Convert delegate variable to local functionConvertToLocalFunctionresharper_convert_to_local_function_highlightingSuggestion
Convert 'if' statement to 'switch' expressionConvertIfStatementToSwitchExpressionresharper_convert_if_statement_to_switch_expression_highlightingHint
Convert 'if' statement to 'switch' statementConvertIfStatementToSwitchStatementresharper_convert_if_statement_to_switch_statement_highlightingHint
Convert lambda expression to method groupConvertClosureToMethodGroupresharper_convert_closure_to_method_group_highlightingSuggestion
Convert 'Nullable<T>' to 'T?'ConvertNullableToShortFormresharper_convert_nullable_to_short_form_highlightingSuggestion
Convert property to auto-propertyConvertToAutoPropertyresharper_convert_to_auto_property_highlightingSuggestion
Convert property to auto-property (when possible)ConvertToAutoPropertyWhenPossibleresharper_convert_to_auto_property_when_possible_highlightingHint
Convert property to auto-property with private setterConvertToAutoPropertyWithPrivateSetterresharper_convert_to_auto_property_with_private_setter_highlightingHint
Convert static method invocation to extension method callInvokeAsExtensionMethodresharper_invoke_as_extension_method_highlightingSuggestion
Convert to 'await using' statement or declarationUseAwaitUsingresharper_use_await_using_highlightingSuggestion
Convert to lambda expressionConvertToLambdaExpressionresharper_convert_to_lambda_expression_highlightingSuggestion
Convert to lambda expression (when possible)ConvertToLambdaExpressionWhenPossibleresharper_convert_to_lambda_expression_when_possible_highlightingDisabled
Convert to static classConvertToStaticClassresharper_convert_to_static_class_highlightingSuggestion
Convert to 'using' declarationConvertToUsingDeclarationresharper_convert_to_using_declaration_highlightingSuggestion
Foreach loop can be converted into LINQ-expression but another 'GetEnumerator' method will be usedForeachCanBeConvertedToQueryUsingAnotherGetEnumeratorresharper_foreach_can_be_converted_to_query_using_another_get_enumerator_highlightingHint
For-loop can be converted into foreach-loopForCanBeConvertedToForeachresharper_for_can_be_converted_to_foreach_highlightingSuggestion
'if' statement can be re-written as '?:' expressionConvertIfStatementToConditionalTernaryExpressionresharper_convert_if_statement_to_conditional_ternary_expression_highlightingSuggestion
'if' statement can be re-written as '??' expressionConvertIfStatementToNullCoalescingExpressionresharper_convert_if_statement_to_null_coalescing_expression_highlightingSuggestion
'if' statement can be re-written as '??=' assignmentConvertIfStatementToNullCoalescingAssignmentresharper_convert_if_statement_to_null_coalescing_assignment_highlightingSuggestion
'if-return' statement can be re-written as 'return' statementConvertIfStatementToReturnStatementresharper_convert_if_statement_to_return_statement_highlightingHint
Inline 'out' variable declarationInlineOutVariableDeclarationresharper_inline_out_variable_declaration_highlightingSuggestion
Introduce optional parameters (non-private accessibility)IntroduceOptionalParameters.Globalresharper_introduce_optional_parameters_global_highlightingSuggestion
Introduce optional parameters (private accessibility)IntroduceOptionalParameters.Localresharper_introduce_optional_parameters_local_highlightingSuggestion
Invert 'if' statement to reduce nestingInvertIfresharper_invert_if_highlightingHint
Join null check with assignmentJoinNullCheckWithUsageresharper_join_null_check_with_usage_highlightingSuggestion
Join null check with assignment (when possible)JoinNullCheckWithUsageWhenPossibleresharper_join_null_check_with_usage_when_possible_highlightingDisabled
Loop can be converted into LINQ-expressionLoopCanBeConvertedToQueryresharper_loop_can_be_converted_to_query_highlightingHint
Merge conditional ?: expression into conditional accessMergeConditionalExpressionresharper_merge_conditional_expression_highlightingSuggestion
Merge conditional ?: expression into conditional access (when possible)MergeConditionalExpressionWhenPossibleresharper_merge_conditional_expression_when_possible_highlightingDisabled
Merge sequential checks in && or || expressionsMergeSequentialChecksresharper_merge_sequential_checks_highlightingSuggestion
Merge sequential checks in && or || expressions (when possible)MergeSequentialChecksWhenPossibleresharper_merge_sequential_checks_when_possible_highlightingDisabled
Part of foreach loop can be converted into LINQ-expression but another 'GetEnumerator' method will be usedForeachCanBePartlyConvertedToQueryUsingAnotherGetEnumeratorresharper_foreach_can_be_partly_converted_to_query_using_another_get_enumerator_highlightingHint
Part of loop's body can be converted into LINQ-expressionLoopCanBePartlyConvertedToQueryresharper_loop_can_be_partly_converted_to_query_highlightingDisabled
Replace if statement with null-propagating codeUseNullPropagationresharper_use_null_propagation_highlightingSuggestion
Replace if statement with null-propagating code (when possible)UseNullPropagationWhenPossibleresharper_use_null_propagation_when_possible_highlightingDisabled
Use compound assignmentConvertToNullCoalescingCompoundAssignmentresharper_convert_to_null_coalescing_compound_assignment_highlightingSuggestion
Use compound assignmentConvertToCompoundAssignmentresharper_convert_to_compound_assignment_highlightingHint
Use deconstructionUseDeconstructionresharper_use_deconstruction_highlightingHint
Use deconstruction (on parameter declaration)UseDeconstructionOnParameterresharper_use_deconstruction_on_parameter_highlightingHint
Use index from end expressionUseIndexFromEndExpressionresharper_use_index_from_end_expression_highlightingSuggestion
Use 'nameof' expression to reference nameUseNameofExpressionresharper_use_nameof_expression_highlightingSuggestion
Use 'nameof' expression to reference type's nameUseNameOfInsteadOfTypeOfresharper_use_name_of_instead_of_type_of_highlightingSuggestion
Use object or collection initializer when possibleUseObjectOrCollectionInitializerresharper_use_object_or_collection_initializer_highlightingSuggestion
Use string interpolation expressionUseStringInterpolationresharper_use_string_interpolation_highlightingSuggestion
Use switch expressionConvertSwitchStatementToSwitchExpressionresharper_convert_switch_statement_to_switch_expression_highlightingHint
Use switch expressionConvertConditionalTernaryExpressionToSwitchExpressionresharper_convert_conditional_ternary_expression_to_switch_expression_highlightingHint

NUnit (16 inspections)

These inspections detect code issues related to NUnit tests.
InspectionIDEditorConfig propertyDefault severity
NUnit. Async test method must return Task or Task<T>NUnit.AsyncMethodMustBeTaskresharper_n_unit_async_method_must_be_task_highlightingWarning
NUnit. Cannot resolve symbol in TestCaseSource or ValueSource attributeNUnit.TestCaseSourceCannotBeResolvedresharper_n_unit_test_case_source_cannot_be_resolved_highlightingWarning
NUnit. Incompatible argument type or incorrect argument valueNUnit.IncorrectArgumentTyperesharper_n_unit_incorrect_argument_type_highlightingWarning
NUnit. Incompatible expected result type or incorrect valueNUnit.IncorrectExpectedResultTyperesharper_n_unit_incorrect_expected_result_type_highlightingWarning
NUnit. Missing arguments in TestCase attributeNUnit.MissingArgumentsInTestCaseAttributeresharper_n_unit_missing_arguments_in_test_case_attribute_highlightingWarning
NUnit. Missing expected result for non-void test methodNUnit.TestCaseAttributeRequiresExpectedResultresharper_n_unit_test_case_attribute_requires_expected_result_highlightingWarning
NUnit. Non-public test methodNUnit.NonPublicMethodWithTestAttributeresharper_n_unit_non_public_method_with_test_attribute_highlightingWarning
NUnit. Redundant argument in TestCase attributeNUnit.RedundantArgumentInTestCaseAttributeresharper_n_unit_redundant_argument_in_test_case_attribute_highlightingWarning
NUnit. Redundant argument instead of ExpectedResultNUnit.RedundantArgumentInsteadOfExpectedResultresharper_n_unit_redundant_argument_instead_of_expected_result_highlightingWarning
NUnit. Redundant expected result for void test methodNUnit.RedundantExpectedResultInTestCaseAttributeresharper_n_unit_redundant_expected_result_in_test_case_attribute_highlightingWarning
NUnit. Test case Result property duplicates ExpectedResultNUnit.TestCaseResultPropertyDuplicatesExpectedResultresharper_n_unit_test_case_result_property_duplicates_expected_result_highlightingWarning
NUnit. Test case Result property is obsoleteNUnit.TestCaseResultPropertyIsObsoleteresharper_n_unit_test_case_result_property_is_obsolete_highlightingWarning
NUnit. Test case source must be field, property, or methodNUnit.TestCaseSourceMustBeFieldPropertyMethodresharper_n_unit_test_case_source_must_be_field_property_method_highlightingWarning
NUnit. Test case source must be non-abstract and implement IEnumerableNUnit.TestCaseSourceShouldImplementIEnumerableresharper_n_unit_test_case_source_should_implement_i_enumerable_highlightingWarning
NUnit. Test case source must be staticNUnit.TestCaseSourceMustBeStaticresharper_n_unit_test_case_source_must_be_static_highlightingWarning
NUnit. Values for test method parameters are not providedNUnit.MethodWithParametersAndTestAttributeresharper_n_unit_method_with_parameters_and_test_attribute_highlightingWarning

Potential Code Quality Issues (147 inspections)

This category includes inspections that detect critical issues (code smells), mostly with Error or Warning level. This category also includes inspections that ensure localization assistance.
InspectionIDEditorConfig propertyDefault severity
'?:' expression has identical true and false branchesConditionalTernaryEqualBranchresharper_conditional_ternary_equal_branch_highlightingWarning
[ThreadStatic] doesn't work with instance fieldsThreadStaticAtInstanceFieldresharper_thread_static_at_instance_field_highlightingWarning
Abstract or virtual (overridable) event is never invokedEventNeverInvoked.Globalresharper_event_never_invoked_global_highlightingSuggestion
Access to disposed captured variableAccessToDisposedClosureresharper_access_to_disposed_closure_highlightingWarning
Access to foreach variable in closureAccessToForEachVariableInClosureresharper_access_to_for_each_variable_in_closure_highlightingWarning
Access to modified captured variableAccessToModifiedClosureresharper_access_to_modified_closure_highlightingWarning
According to values of the bit masks, expression result will always be the same.NonConstantEqualityExpressionHasConstantResultresharper_non_constant_equality_expression_has_constant_result_highlightingWarning
Actual shift count equals zero.ShiftExpressionRealShiftCountIsZeroresharper_shift_expression_real_shift_count_is_zero_highlightingWarning
Ambiguous symbols in text argumentMultipleResolveCandidatesInTextresharper_multiple_resolve_candidates_in_text_highlightingWarning
Annotation conflict in hierarchyAnnotationConflictInHierarchyresharper_annotation_conflict_in_hierarchy_highlightingWarning
Assignment in conditional expressionAssignmentInConditionalExpressionresharper_assignment_in_conditional_expression_highlightingWarning
Async iterator invocation without 'await foreach'AsyncIteratorInvocationWithoutAwaitForeachresharper_async_iterator_invocation_without_await_foreach_highlightingWarning
Auto-property accessor is never used (non-private accessibility)UnusedAutoPropertyAccessor.Globalresharper_unused_auto_property_accessor_global_highlightingWarning
Auto-property accessor is never used (private accessibility)UnusedAutoPropertyAccessor.Localresharper_unused_auto_property_accessor_local_highlightingWarning
Bitwise operation on enum which is not marked by [Flags] attributeBitwiseOperatorOnEnumWithoutFlagsresharper_bitwise_operator_on_enum_without_flags_highlightingWarning
Call to base member with implicit default parametersBaseMethodCallWithDefaultParameterresharper_base_method_call_with_default_parameter_highlightingWarning
Call to 'base.Equals(...)' is reference equalityBaseObjectEqualsIsObjectEqualsresharper_base_object_equals_is_object_equals_highlightingWarning
Cannot access static symbol in text argumentStaticProblemInTextresharper_static_problem_in_text_highlightingWarning
Cannot access symbol in text argumentAccessRightsInTextresharper_access_rights_in_text_highlightingWarning
Cannot resolve propertyPropertyNotResolvedresharper_property_not_resolved_highlightingError
Cannot resolve resourceResourceNotResolvedresharper_resource_not_resolved_highlightingError
Cannot resolve resource itemResourceItemNotResolvedresharper_resource_item_not_resolved_highlightingError
Cannot resolve symbol in text argumentNotResolvedInTextresharper_not_resolved_in_text_highlightingWarning
Captured field reference of a marshal-by-reference class may cause a runtime exceptionAddressOfMarshalByRefObjectresharper_address_of_marshal_by_ref_object_highlightingWarning
Captured reference to 'volatile' field will not be treated as 'volatile'ByRefArgumentIsVolatileFieldresharper_by_ref_argument_is_volatile_field_highlightingWarning
Char is possibly unintentionally used as integerConfusingCharAsIntegerInConstructorresharper_confusing_char_as_integer_in_constructor_highlightingWarning
Class is never instantiated (non-private accessibility)ClassNeverInstantiated.Globalresharper_class_never_instantiated_global_highlightingSuggestion
Class is never instantiated (private accessibility)ClassNeverInstantiated.Localresharper_class_never_instantiated_local_highlightingSuggestion
Collection is never updated (non-private accessibility)CollectionNeverUpdated.Globalresharper_collection_never_updated_global_highlightingWarning
Collection is never updated (private accessibility)CollectionNeverUpdated.Localresharper_collection_never_updated_local_highlightingWarning
Collection's content is never queried (non-private accessibility)CollectionNeverQueried.Globalresharper_collection_never_queried_global_highlightingWarning
Collection's content is never queried (private accessibility)CollectionNeverQueried.Localresharper_collection_never_queried_local_highlightingWarning
Constant shift expression with non-zero operands results in zero value.ShiftExpressionResultEqualsZeroresharper_shift_expression_result_equals_zero_highlightingWarning
Co-variant array conversionCoVariantArrayConversionresharper_co_variant_array_conversion_highlightingWarning
Delegate subtractionsDelegateSubtractionresharper_delegate_subtraction_highlightingWarning
Division by zero in at least one execution path.IntDivisionByZeroresharper_int_division_by_zero_highlightingWarning
Element is localizableLocalizableElementresharper_localizable_element_highlightingWarning
Empty general catch clauseEmptyGeneralCatchClauseresharper_empty_general_catch_clause_highlightingWarning
'Enumerable.Sum' invocation in explicit unchecked contextEnumerableSumInExplicitUncheckedContextresharper_enumerable_sum_in_explicit_unchecked_context_highlightingWarning
Equality comparison of floating point numbersCompareOfFloatsByEqualityOperatorresharper_compare_of_floats_by_equality_operator_highlightingWarning
Event is never subscribed to (non-private accessibility)EventNeverSubscribedTo.Globalresharper_event_never_subscribed_to_global_highlightingSuggestion
Event is never subscribed to (private accessibility)EventNeverSubscribedTo.Localresharper_event_never_subscribed_to_local_highlightingSuggestion
Event never invokedEventNeverInvokedresharper_event_never_invoked_highlightingWarning
Event unsubscription via anonymous delegateEventUnsubscriptionViaAnonymousDelegateresharper_event_unsubscription_via_anonymous_delegate_highlightingWarning
Exception rethrow possibly intendedPossibleIntendedRethrowresharper_possible_intended_rethrow_highlightingWarning
Explicit argument passed to parameter with caller info attributeExplicitCallerInfoArgumentresharper_explicit_caller_info_argument_highlightingWarning
Expression always gives the same result.IntRelationalOrEqualityExpressionAlwaysSameValueresharper_int_relational_or_equality_expression_always_same_value_highlightingWarning
Formatting is specified, but interpolated string expression is not IFormattableInterpolatedStringExpressionIsNotIFormattableresharper_interpolated_string_expression_is_not_i_formattable_highlightingWarning
Function body is too complex to analyzeFunctionComplexityOverflowresharper_function_complexity_overflow_highlightingDisabled
Function is recursive on all execution pathsFunctionRecursiveOnAllPathsresharper_function_recursive_on_all_paths_highlightingWarning
Function never returnsFunctionNeverReturnsresharper_function_never_returns_highlightingWarning
'GC.SuppressFinalize' is invoked for type without destructorGCSuppressFinalizeForTypeWithoutDestructorresharper_gc_suppress_finalize_for_type_without_destructor_highlightingWarning
Heuristically unreachable case due to integer analysis.UnreachableSwitchCaseDueToIntegerAnalysisresharper_unreachable_switch_case_due_to_integer_analysis_highlightingWarning
Heuristically unreachable case due to integer analysis.UnreachableSwitchArmDueToIntegerAnalysisresharper_unreachable_switch_arm_due_to_integer_analysis_highlightingWarning
Inconsistent synchronization on fieldInconsistentlySynchronizedFieldresharper_inconsistently_synchronized_field_highlightingWarning
Instance of IEnumerator is never disposedGenericEnumeratorNotDisposedresharper_generic_enumerator_not_disposed_highlightingWarning
Interfaces marked as ServiceContract should declare at least one OperationContractServiceContractWithoutOperationsresharper_service_contract_without_operations_highlightingWarning
Invalid XML documentation commentInvalidXmlDocCommentresharper_invalid_xml_doc_comment_highlightingWarning
Invocation of polymorphic field-like eventPolymorphicFieldLikeEventInvocationresharper_polymorphic_field_like_event_invocation_highlightingWarning
IQueryable is possibly unintentionally used as IEnumerablePossibleUnintendedQueryableAsEnumerableresharper_possible_unintended_queryable_as_enumerable_highlightingSuggestion
Iterator never returnsIteratorNeverReturnsresharper_iterator_never_returns_highlightingWarning
Local variable hides memberLocalVariableHidesMemberresharper_local_variable_hides_member_highlightingWarning
Loop control variable is never changed inside loopLoopVariableIsNeverChangedInsideLoopresharper_loop_variable_is_never_changed_inside_loop_highlightingWarning
Member hides static member from outer classMemberHidesStaticFromOuterClassresharper_member_hides_static_from_outer_class_highlightingWarning
Member initialized value ignoredMemberInitializerValueIgnoredresharper_member_initializer_value_ignored_highlightingWarning
Method is marked as OperationContract but containing type isn't marked as ServiceContractOperationContractWithoutServiceContractresharper_operation_contract_without_service_contract_highlightingWarning
Method with optional or 'params' parameter is hidden by overloadMethodOverloadWithOptionalParameterresharper_method_overload_with_optional_parameter_highlightingWarning
Method with 'params' is invoked while more specific method is availablePossiblyMistakenUseOfParamsMethodresharper_possibly_mistaken_use_of_params_method_highlightingWarning
Mismatch of optional parameter value in overridden methodOptionalParameterHierarchyMismatchresharper_optional_parameter_hierarchy_mismatch_highlightingWarning
Multiple sequential 'OrderBy' invocationMultipleOrderByresharper_multiple_order_by_highlightingWarning
Non-accessed field (non-private accessibility)NotAccessedField.Globalresharper_not_accessed_field_global_highlightingSuggestion
Non-accessed field (private accessibility)NotAccessedField.Localresharper_not_accessed_field_local_highlightingWarning
Non-readonly type member referenced in 'GetHashCode()'NonReadonlyMemberInGetHashCoderesharper_non_readonly_member_in_get_hash_code_highlightingWarning
'Object.ReferenceEquals' is always false because it is called with value typeReferenceEqualsWithValueTyperesharper_reference_equals_with_value_type_highlightingWarning
One way operations must not return valuesOneWayOperationContractWithReturnTyperesharper_one_way_operation_contract_with_return_type_highlightingWarning
Operator 'is'/'Type Of ... Is ...' can be usedOperatorIsCanBeUsedresharper_operator_is_can_be_used_highlightingWarning
Overridden GetHashCode calls base 'Object.GetHashCode()'BaseObjectGetHashCodeCallInGetHashCoderesharper_base_object_get_hash_code_call_in_get_hash_code_highlightingWarning
Parameter hides memberParameterHidesMemberresharper_parameter_hides_member_highlightingWarning
Parameter name differs in partial method declarationPartialMethodParameterNameMismatchresharper_partial_method_parameter_name_mismatch_highlightingWarning
Possible ambiguity while accessing member by interfacePossibleInterfaceMemberAmbiguityresharper_possible_interface_member_ambiguity_highlightingWarning
Possible comparison of value type with 'null'CompareNonConstrainedGenericWithNullresharper_compare_non_constrained_generic_with_null_highlightingDisabled
Possible cyclic constructor callConstructorInitializerLoopresharper_constructor_initializer_loop_highlightingWarning
Possible incorrect implementation of Double-Check Locking pattern. Possible multiple write access to checked fieldPossibleMultipleWriteAccessInDoubleCheckLockingresharper_possible_multiple_write_access_in_double_check_locking_highlightingWarning
Possible incorrect implementation of Double-Check Locking pattern. Read access to checked fieldReadAccessInDoubleCheckLockingresharper_read_access_in_double_check_locking_highlightingWarning
Possible infinite inheritancePossibleInfiniteInheritanceresharper_possible_infinite_inheritance_highlightingWarning
Possible loss of fractionPossibleLossOfFractionresharper_possible_loss_of_fraction_highlightingWarning
Possible multiple enumerationPossibleMultipleEnumerationresharper_possible_multiple_enumeration_highlightingWarning
Possible overflow in checked context.IntVariableOverflowInCheckedContextresharper_int_variable_overflow_in_checked_context_highlightingWarning
Possible overflow in unchecked context.IntVariableOverflowInUncheckedContextresharper_int_variable_overflow_in_unchecked_context_highlightingWarning
Possible overflow.IntVariableOverflowresharper_int_variable_overflow_highlightingWarning
Possible 'System.ArgumentOutOfRangeException'. Index must be a non-negative integerNegativeIndexresharper_negative_index_highlightingWarning
Possible 'System.ArgumentOutOfRangeException'. Start index should be less than or equal to end indexIndexingByInvalidRangeresharper_indexing_by_invalid_range_highlightingWarning
Possible 'System.InvalidCastException'PossibleInvalidCastExceptionresharper_possible_invalid_cast_exception_highlightingWarning
Possible 'System.InvalidCastException' in foreach loopPossibleInvalidCastExceptionInForeachLoopresharper_possible_invalid_cast_exception_in_foreach_loop_highlightingWarning
Possible 'System.InvalidOperationException'PossibleInvalidOperationExceptionresharper_possible_invalid_operation_exception_highlightingWarning
Possible 'System.NullReferenceException'PossibleNullReferenceExceptionresharper_possible_null_reference_exception_highlightingWarning
Possible unassigned object created by 'new' expressionObjectCreationAsStatementresharper_object_creation_as_statement_highlightingWarning
Possible unintended reference comparisonPossibleUnintendedReferenceComparisonresharper_possible_unintended_reference_comparison_highlightingWarning
Possibly impure struct method is called on readonly variable: struct value always copied before invocationPossiblyImpureMethodCallOnReadonlyVariableresharper_possibly_impure_method_call_on_readonly_variable_highlightingWarning
Possibly misleading 'DefaultValueAttribute' usage to define optional parameter valueDefaultValueAttributeForOptionalParameterresharper_default_value_attribute_for_optional_parameter_highlightingWarning
Possibly missing comma before indexer initializerPossiblyMissingIndexerInitializerCommaresharper_possibly_missing_indexer_initializer_comma_highlightingWarning
Possibly unintended linear search in setPossibleUnintendedLinearSearchInSetresharper_possible_unintended_linear_search_in_set_highlightingWarning
Possibly unintended string interpolation instead of format string template.PossiblyMistakenUseOfInterpolatedStringInsertresharper_possibly_mistaken_use_of_interpolated_string_insert_highlightingWarning
'ref' or 'out' parameter with [Optional] attributeOptionalParameterRefOutresharper_optional_parameter_ref_out_highlightingWarning
Return value of [MustUseReturnValue] annotated method is not usedMustUseReturnValueresharper_must_use_return_value_highlightingWarning
Return value of iterator is not usedIteratorMethodResultIsIgnoredresharper_iterator_method_result_is_ignored_highlightingWarning
Return value of pure method is not usedReturnValueOfPureMethodIsNotUsedresharper_return_value_of_pure_method_is_not_used_highlightingWarning
Right operand of dynamic shift operation should be convertible to 'int'DynamicShiftRightOpIsNotIntresharper_dynamic_shift_right_op_is_not_int_highlightingWarning
Safe cast expression always succeedsTryCastAlwaysSucceedsresharper_try_cast_always_succeeds_highlightingSuggestion
Shift expression with zero left operand equals zero.ShiftExpressionZeroLeftOperandresharper_shift_expression_zero_left_operand_highlightingWarning
Similar anonymous type detected nearbySimilarAnonymousTypeNearbyresharper_similar_anonymous_type_nearby_highlightingHint
Similar expressions comparisonEqualExpressionComparisonresharper_equal_expression_comparison_highlightingWarning
Some values of the enum are not processed inside switch expression and are handled via exception in default armSwitchExpressionHandlesSomeKnownEnumValuesWithExceptionInDefaultresharper_switch_expression_handles_some_known_enum_values_with_exception_in_default_highlightingHint
Some values of the enum are not processed inside switch statementSwitchStatementMissingSomeEnumCasesNoDefaultresharper_switch_statement_missing_some_enum_cases_no_default_highlightingHint
Some values of the enum are not processed inside switch statement and are handled via default sectionSwitchStatementHandlesSomeKnownEnumValuesWithDefaultresharper_switch_statement_handles_some_known_enum_values_with_default_highlightingHint
Static field or auto-property in generic typeStaticMemberInGenericTyperesharper_static_member_in_generic_type_highlightingWarning
Static member initializer refers to static member below or in other partStaticMemberInitializerReferesToMemberBelowresharper_static_member_initializer_referes_to_member_below_highlightingWarning
String formatting method problemsFormatStringProblemresharper_format_string_problem_highlightingWarning
Suspicious shift count for this type of left operand.ShiftExpressionRightOperandNotEqualRealCountresharper_shift_expression_right_operand_not_equal_real_count_highlightingWarning
Suspicious type conversion or checkSuspiciousTypeConversion.Globalresharper_suspicious_type_conversion_global_highlightingWarning
Symbol from module that might be missing at runtimeSymbolFromNotCopiedLocallyReferenceUsedWarningresharper_symbol_from_not_copied_locally_reference_used_warning_highlightingWarning
Tail recursive call can be replaced with loopTailRecursiveCallresharper_tail_recursive_call_highlightingHint
The given expression of 'is' operator is always of the provided typeIsExpressionAlwaysTrueresharper_is_expression_always_true_highlightingWarning
The given expression of 'is' operator is never of the provided typeIsExpressionAlwaysFalseresharper_is_expression_always_false_highlightingWarning
The source expression always matches the provided patternPatternAlwaysMatchesresharper_pattern_always_matches_highlightingWarning
The source expression is always of pattern's typePatternAlwaysOfTyperesharper_pattern_always_of_type_highlightingWarning
The source expression never matches the provided patternPatternNeverMatchesresharper_pattern_never_matches_highlightingWarning
Thread static field has initializerThreadStaticFieldHasInitializerresharper_thread_static_field_has_initializer_highlightingWarning
Try cast and check for null can be replaced with a type checkSafeCastIsUsedAsTypeCheckresharper_safe_cast_is_used_as_type_check_highlightingSuggestion
Type check and casts can be mergedMergeCastWithTypeCheckresharper_merge_cast_with_type_check_highlightingSuggestion
Type pattern and casts can be mergedUseSwitchCasePatternVariableresharper_use_switch_case_pattern_variable_highlightingSuggestion
Unassigned field (non-private accessibility)UnassignedField.Globalresharper_unassigned_field_global_highlightingSuggestion
Unassigned field (private accessibility)UnassignedField.Localresharper_unassigned_field_local_highlightingWarning
Unassigned readonly fieldUnassignedReadonlyFieldresharper_unassigned_readonly_field_highlightingWarning
Usage of <inheritdoc /> is invalid.InheritdocInvalidUsageresharper_inheritdoc_invalid_usage_highlightingWarning
Use <inheritdoc /> on root level to inherit documentation from base candidate.InheritdocConsiderUsageresharper_inheritdoc_consider_usage_highlightingDisabled
Use collection's count propertyUseCollectionCountPropertyresharper_use_collection_count_property_highlightingSuggestion
Use format specifier in format stringsUseFormatSpecifierInFormatStringresharper_use_format_specifier_in_format_string_highlightingSuggestion
Use format specifier in interpolated stringsUseFormatSpecifierInInterpolationresharper_use_format_specifier_in_interpolation_highlightingSuggestion
Useless arithmetical operation.UselessBinaryOperationresharper_useless_binary_operation_highlightingWarning
Using stackalloc inside loopStackAllocInsideLoopresharper_stack_alloc_inside_loop_highlightingWarning
Value assigned to a property of non-variable qualifier expression can be lostPossibleStructMemberModificationOfNonVariableStructresharper_possible_struct_member_modification_of_non_variable_struct_highlightingWarning
'value' parameter is not usedValueParameterNotUsedresharper_value_parameter_not_used_highlightingWarning
Variable in local function hides variable from outer scopeVariableHidesOuterVariableresharper_variable_hides_outer_variable_highlightingWarning
Virtual member call in constructorVirtualMemberCallInConstructorresharper_virtual_member_call_in_constructor_highlightingWarning
'void' method is annotated by [MustUseReturnValue] attributeVoidMethodWithMustUseReturnValueAttributeresharper_void_method_with_must_use_return_value_attribute_highlightingWarning
'void' method is annotated by [Pure] attributePureAttributeOnVoidMethodresharper_pure_attribute_on_void_method_highlightingWarning

Redundancies in Code (70 inspections)

Code inspections in this category look for redundancies and dead code, which affect code readability and style, and could be safely removed. Some code redundancies cannot be fixed automatically, and quick-fixes for them are performed in the interactive mode, requiring the user input. But the majority of the redundancies can be fixed without user interaction, using either fix in scope or code cleanup.
InspectionIDEditorConfig propertyDefault severity
'??' condition is known to be null or not nullConstantNullCoalescingConditionresharper_constant_null_coalescing_condition_highlightingWarning
Anonymous method signature is not necessaryUnusedAnonymousMethodSignatureresharper_unused_anonymous_method_signature_highlightingWarning
Array creation can be replaced with array initializerRedundantArrayCreationExpressionresharper_redundant_array_creation_expression_highlightingHint
Assignment is not usedRedundantAssignmentresharper_redundant_assignment_highlightingWarning
Assignment results are fully discardedAssignmentIsFullyDiscardedresharper_assignment_is_fully_discarded_highlightingWarning
Conditional access qualifier expression is known to be null or not nullConstantConditionalAccessQualifierresharper_constant_conditional_access_qualifier_highlightingWarning
Double negation operatorDoubleNegationOperatorresharper_double_negation_operator_highlightingSuggestion
Empty 'for' loop is redundantEmptyForStatementresharper_empty_for_statement_highlightingWarning
Explicit delegate creation expression is redundantRedundantDelegateCreationresharper_redundant_delegate_creation_highlightingWarning
Expression is always 'null'ExpressionIsAlwaysNullresharper_expression_is_always_null_highlightingWarning
Expression is always 'true' or always 'false'ConditionIsAlwaysTrueOrFalseresharper_condition_is_always_true_or_false_highlightingWarning
Heuristically unreachable codeHeuristicUnreachableCoderesharper_heuristic_unreachable_code_highlightingWarning
Immediate delegate invocationRedundantImmediateDelegateInvocationresharper_redundant_immediate_delegate_invocation_highlightingSuggestion
Parentheses are redundant if attribute has no argumentsRedundantAttributeParenthesesresharper_redundant_attribute_parentheses_highlightingHint
Private field can be converted to local variablePrivateFieldCanBeConvertedToLocalVariableresharper_private_field_can_be_converted_to_local_variable_highlightingWarning
Redundant [AttributeUsage] attribute property assignmentRedundantAttributeUsagePropertyresharper_redundant_attribute_usage_property_highlightingSuggestion
Redundant 'abstract' modifierRedundantAbstractModifierresharper_redundant_abstract_modifier_highlightingWarning
Redundant anonymous type property explicit nameRedundantAnonymousTypePropertyNameresharper_redundant_anonymous_type_property_name_highlightingWarning
Redundant argument with default valueRedundantArgumentDefaultValueresharper_redundant_argument_default_value_highlightingWarning
Redundant arithmetic overflow checking contextRedundantOverflowCheckingContextresharper_redundant_overflow_checking_context_highlightingWarning
Redundant 'base.' qualifierRedundantBaseQualifierresharper_redundant_base_qualifier_highlightingWarning
Redundant boolean comparisonRedundantBoolCompareresharper_redundant_bool_compare_highlightingWarning
Redundant braces in collection initializerRedundantCollectionInitializerElementBracesresharper_redundant_collection_initializer_element_braces_highlightingHint
Redundant 'case' labelRedundantCaseLabelresharper_redundant_case_label_highlightingWarning
Redundant castRedundantCastresharper_redundant_cast_highlightingWarning
Redundant cast to 'object'RedundantCast.0resharper_redundant_cast_0_highlightingWarning
Redundant catch clauseRedundantCatchClauseresharper_redundant_catch_clause_highlightingWarning
Redundant condition check before assignmentsRedundantCheckBeforeAssignmentresharper_redundant_check_before_assignment_highlightingWarning
Redundant conditional ternary expression usageRedundantTernaryExpressionresharper_redundant_ternary_expression_highlightingWarning
Redundant control flow jump statementRedundantJumpStatementresharper_redundant_jump_statement_highlightingWarning
Redundant discard designationRedundantDiscardDesignationresharper_redundant_discard_designation_highlightingSuggestion
Redundant discarded property patternRedundantDiscardedPatternresharper_redundant_discarded_pattern_highlightingSuggestion
Redundant 'else' keywordRedundantIfElseBlockresharper_redundant_if_else_block_highlightingHint
Redundant empty argument list on object creation expressionRedundantEmptyObjectCreationArgumentListresharper_redundant_empty_object_creation_argument_list_highlightingHint
Redundant empty finally blockRedundantEmptyFinallyBlockresharper_redundant_empty_finally_block_highlightingWarning
Redundant empty object or collection initializerRedundantEmptyObjectOrCollectionInitializerresharper_redundant_empty_object_or_collection_initializer_highlightingWarning
Redundant empty switch sectionRedundantEmptySwitchSectionresharper_redundant_empty_switch_section_highlightingWarning
Redundant explicit array creation in argument of 'params' parameterRedundantExplicitParamsArrayCreationresharper_redundant_explicit_params_array_creation_highlightingSuggestion
Redundant explicit nullable type creationRedundantExplicitNullableCreationresharper_redundant_explicit_nullable_creation_highlightingWarning
Redundant explicit size specification in array creationRedundantExplicitArraySizeresharper_redundant_explicit_array_size_highlightingWarning
Redundant explicit tuple component nameRedundantExplicitTupleComponentNameresharper_redundant_explicit_tuple_component_name_highlightingWarning
Redundant explicit type in array creationRedundantExplicitArrayCreationresharper_redundant_explicit_array_creation_highlightingWarning
Redundant fixed pointer declarationRedundantFixedPointerDeclarationresharper_redundant_fixed_pointer_declaration_highlightingSuggestion
Redundant 'IEnumerable.Cast<T>' or 'IEnumerable.OfType<T>' callRedundantEnumerableCastCallresharper_redundant_enumerable_cast_call_highlightingWarning
Redundant lambda expression parameter type specificationRedundantLambdaParameterTyperesharper_redundant_lambda_parameter_type_highlightingWarning
Redundant lambda signature parenthesesRedundantLambdaSignatureParenthesesresharper_redundant_lambda_signature_parentheses_highlightingHint
Redundant name qualifierRedundantNameQualifierresharper_redundant_name_qualifier_highlightingWarning
Redundant 'notnull' constraint on type parameter constrained by non-nullable base type.RedundantNotNullConstraintresharper_redundant_not_null_constraint_highlightingWarning
Redundant nullable annotation on base type constraint of type parameter constrained by another non-nullable base type.RedundantNullableAnnotationOnTypeConstraintHasNonNullableBaseTyperesharper_redundant_nullable_annotation_on_type_constraint_has_non_nullable_base_type_highlightingWarning
Redundant nullable annotation on base type constraint of type parameter having non-nullable type kind.RedundantNullableAnnotationOnTypeConstraintHasNonNullableTypeKindresharper_redundant_nullable_annotation_on_type_constraint_has_non_nullable_type_kind_highlightingWarning
Redundant nullable annotation on 'class?' constraint of type parameter constrained by non-nullable base type.RedundantNullableAnnotationOnReferenceTypeConstraintresharper_redundant_nullable_annotation_on_reference_type_constraint_highlightingWarning
Redundant 'object.ToString()' callRedundantToStringCallresharper_redundant_to_string_call_highlightingWarning
Redundant 'object.ToString()' call for value typesRedundantToStringCallForValueTyperesharper_redundant_to_string_call_for_value_type_highlightingHint
Redundant operand in logical conditional expressionRedundantLogicalConditionalExpressionOperandresharper_redundant_logical_conditional_expression_operand_highlightingWarning
Redundant 'orderby' clause 'ascending' keywordRedundantQueryOrderByAscendingKeywordresharper_redundant_query_order_by_ascending_keyword_highlightingHint
Redundant property pattern clauseRedundantPropertyPatternClauseresharper_redundant_property_pattern_clause_highlightingSuggestion
Redundant range boundRedundantRangeBoundresharper_redundant_range_bound_highlightingSuggestion
Redundant 'readonly' modifierRedundantReadonlyModifierresharper_redundant_readonly_modifier_highlightingSuggestion
Redundant semicolon after type or namespace declarationRedundantDeclarationSemicolonresharper_redundant_declaration_semicolon_highlightingHint
Redundant string interpolationRedundantStringInterpolationresharper_redundant_string_interpolation_highlightingSuggestion
Redundant 'string.Format()' callRedundantStringFormatCallresharper_redundant_string_format_call_highlightingWarning
Redundant 'string.ToCharArray()' callRedundantStringToCharArrayCallresharper_redundant_string_to_char_array_call_highlightingWarning
Redundant type arguments of methodRedundantTypeArgumentsOfMethodresharper_redundant_type_arguments_of_method_highlightingWarning
Redundant type specification in default expressionRedundantTypeSpecificationInDefaultExpressionresharper_redundant_type_specification_in_default_expression_highlightingSuggestion
Redundant using directiveRedundantUsingDirectiveresharper_redundant_using_directive_highlightingWarning
Redundant verbatim prefixRedundantVerbatimPrefixresharper_redundant_verbatim_prefix_highlightingSuggestion
Redundant verbatim string prefixRedundantVerbatimStringPrefixresharper_redundant_verbatim_string_prefix_highlightingSuggestion
'true' is redundant as 'for'-statement conditionForStatementConditionIsTrueresharper_for_statement_condition_is_true_highlightingWarning
Type check for nullable type is equal to underlying type checkRedundantNullableTypeMarkresharper_redundant_nullable_type_mark_highlightingWarning
Unsafe context declaration is redundantRedundantUnsafeContextresharper_redundant_unsafe_context_highlightingWarning

Redundancies in Symbol Declarations (44 inspections)

This category includes code inspections, mostly with the warning severity level, which detect empty and unused symbol declarations.
InspectionIDEditorConfig propertyDefault severity
Class with virtual (overridable) members never inherited (non-private accessibility)ClassWithVirtualMembersNeverInherited.Globalresharper_class_with_virtual_members_never_inherited_global_highlightingSuggestion
Class with virtual (overridable) members never inherited (private accessibility)ClassWithVirtualMembersNeverInherited.Localresharper_class_with_virtual_members_never_inherited_local_highlightingSuggestion
Component of the tuple is never usedUnusedTupleComponentInReturnValueresharper_unused_tuple_component_in_return_value_highlightingWarning
'DefaultParameterValueAttribute' should be used in conjunction with 'OptionalAttribute'MeaninglessDefaultParameterValueresharper_meaningless_default_parameter_value_highlightingWarning
Empty constructorEmptyConstructorresharper_empty_constructor_highlightingWarning
Empty destructorEmptyDestructorresharper_empty_destructor_highlightingWarning
Empty namespace declarationEmptyNamespaceresharper_empty_namespace_highlightingWarning
Local entity is only used to capture its nameLocalNameCapturedOnlyresharper_local_name_captured_only_highlightingWarning
Local function is never usedUnusedLocalFunction.Compilerresharper_unused_local_function_compiler_highlightingWarning
Local function is never usedUnusedLocalFunctionresharper_unused_local_function_highlightingWarning
Local function return value is never usedUnusedLocalFunctionReturnValueresharper_unused_local_function_return_value_highlightingWarning
Method return value is never used (non-private accessibility)UnusedMethodReturnValue.Globalresharper_unused_method_return_value_global_highlightingSuggestion
Method return value is never used (private accessibility)UnusedMethodReturnValue.Localresharper_unused_method_return_value_local_highlightingWarning
Non-accessed local variableNotAccessedVariableresharper_not_accessed_variable_highlightingWarning
Parameter is only used for precondition check (non-private accessibility)ParameterOnlyUsedForPreconditionCheck.Globalresharper_parameter_only_used_for_precondition_check_global_highlightingSuggestion
Parameter is only used for precondition check (private accessibility)ParameterOnlyUsedForPreconditionCheck.Localresharper_parameter_only_used_for_precondition_check_local_highlightingWarning
'params' modifier is always ignored on overridesRedundantParamsresharper_redundant_params_highlightingWarning
Redundant base constructor callRedundantBaseConstructorCallresharper_redundant_base_constructor_call_highlightingWarning
Redundant class or interface specification in base types listRedundantExtendsListEntryresharper_redundant_extends_list_entry_highlightingWarning
Redundant member initializerRedundantDefaultMemberInitializerresharper_redundant_default_member_initializer_highlightingWarning
Redundant member overrideRedundantOverriddenMemberresharper_redundant_overridden_member_highlightingWarning
Redundant method overload (non-private accessibility)RedundantOverload.Globalresharper_redundant_overload_global_highlightingSuggestion
Redundant method overload (private accessibility)RedundantOverload.Localresharper_redundant_overload_local_highlightingSuggestion
Redundant 'partial' modifier on method declarationPartialMethodWithSinglePartresharper_partial_method_with_single_part_highlightingWarning
Redundant 'partial' modifier on type declarationPartialTypeWithSinglePartresharper_partial_type_with_single_part_highlightingWarning
Sealed member in sealed classSealedMemberInSealedClassresharper_sealed_member_in_sealed_class_highlightingWarning
Type is never used (non-private accessibility)UnusedType.Globalresharper_unused_type_global_highlightingSuggestion
Type is never used (private accessibility)UnusedType.Localresharper_unused_type_local_highlightingWarning
Type member is never accessed via base type (non-private accessibility)UnusedMemberInSuper.Globalresharper_unused_member_in_super_global_highlightingSuggestion
Type member is never accessed via base type (private accessibility)UnusedMemberInSuper.Localresharper_unused_member_in_super_local_highlightingWarning
Type member is never used (non-private accessibility)UnusedMember.Globalresharper_unused_member_global_highlightingSuggestion
Type member is never used (private accessibility)UnusedMember.Localresharper_unused_member_local_highlightingWarning
Type member is only used in overrides (non-private accessibility)UnusedMemberHierarchy.Globalresharper_unused_member_hierarchy_global_highlightingSuggestion
Type member is only used in overrides (private accessibility)UnusedMemberHierarchy.Localresharper_unused_member_hierarchy_local_highlightingWarning
Underlying type of enum is 'int'EnumUnderlyingTypeIsIntresharper_enum_underlying_type_is_int_highlightingWarning
Unused labelUnusedLabelresharper_unused_label_highlightingWarning
Unused local variableUnusedVariableresharper_unused_variable_highlightingWarning
Unused parameter (non-private accessibility)UnusedParameter.Globalresharper_unused_parameter_global_highlightingSuggestion
Unused parameter (private accessibility)UnusedParameter.Localresharper_unused_parameter_local_highlightingWarning
Unused parameter in partial methodUnusedParameterInPartialMethodresharper_unused_parameter_in_partial_method_highlightingWarning
Unused parameter of local functionUnusedLocalFunctionParameterresharper_unused_local_function_parameter_highlightingWarning
Unused type parameterUnusedTypeParameterresharper_unused_type_parameter_highlightingWarning
Virtual (overridable) member is never overridden (non-private accessibility)VirtualMemberNeverOverridden.Globalresharper_virtual_member_never_overridden_global_highlightingSuggestion
Virtual (overridable) member is never overridden (private accessibility)VirtualMemberNeverOverridden.Localresharper_virtual_member_never_overridden_local_highlightingSuggestion

Spelling issues (3 inspections)

These inspections detect typos in various contexts.
InspectionIDEditorConfig propertyDefault severity
Typo in commentCommentTyporesharper_comment_typo_highlightingSuggestion
Typo in identifierIdentifierTyporesharper_identifier_typo_highlightingSuggestion
Typo in string literalStringLiteralTyporesharper_string_literal_typo_highlightingSuggestion

Syntax Style (39 inspections)

Inspections in this category detect violations of code syntax styles. In contrast to most of other code inspections, these inspections can either detect the same code construct as a code issue or not depending on the corresponding code style rule configured on the Code Editing | [Language] | Syntax Style page of ReSharper options (Alt+R O). You can also fix issues that these inspection detect using code cleanup.
InspectionIDEditorConfig propertyDefault severity
Add parentheses to avoid non-obvious precedenceArrangeMissingParenthesesresharper_arrange_missing_parentheses_highlightingDisabled
Add/remove qualifier for static membersArrangeStaticMemberQualifierresharper_arrange_static_member_qualifier_highlightingHint
Add/remove 'this.' qualifierArrangeThisQualifierresharper_arrange_this_qualifier_highlightingHint
Adjust modifiers declaration orderArrangeModifiersOrderresharper_arrange_modifiers_order_highlightingSuggestion
Join or separate attributes is sectionArrangeAttributesresharper_arrange_attributes_highlightingDisabled
Join or separate 'var' in deconstruction declarationsArrangeVarKeywordsInDeconstructingDeclarationresharper_arrange_var_keywords_in_deconstructing_declaration_highlightingSuggestion
Remove redundant parenthesesArrangeRedundantParenthesesresharper_arrange_redundant_parentheses_highlightingHint
Replace built-in type reference with a CLR type name or a keywordBuiltInTypeReferenceStyleresharper_built_in_type_reference_style_highlightingHint
Replace built-in type reference with a CLR type name or a keyword in static member access expressionsBuiltInTypeReferenceStyleForMemberAccessresharper_built_in_type_reference_style_for_member_access_highlightingHint
Separate control transfer statement with blank lineSeparateControlTransferStatementresharper_separate_control_transfer_statement_highlightingDisabled
Unnecessary whitespace at the end of lineUnnecessaryWhitespaceresharper_unnecessary_whitespace_highlightingDisabled
Usage of tabulation character for indentation is prohibitedTabsAreDisallowedresharper_tabs_are_disallowed_highlightingDisabled
Use explicit or implicit modifier definition for type membersArrangeTypeMemberModifiersresharper_arrange_type_member_modifiers_highlightingHint
Use explicit or implicit modifier definition for typesArrangeTypeModifiersresharper_arrange_type_modifiers_highlightingHint
Use preferred argument styleArgumentsStyleOtherresharper_arguments_style_other_highlightingHint
Use preferred argument style for anonymous functionsArgumentsStyleAnonymousFunctionresharper_arguments_style_anonymous_function_highlightingHint
Use preferred argument style for literal valuesArgumentsStyleLiteralresharper_arguments_style_literal_highlightingHint
Use preferred argument style for named expressionsArgumentsStyleNamedExpressionresharper_arguments_style_named_expression_highlightingHint
Use preferred argument style for string literal valuesArgumentsStyleStringLiteralresharper_arguments_style_string_literal_highlightingHint
Use preferred body style (convert to constructor or destructor with preferred body style)ArrangeConstructorOrDestructorBodyresharper_arrange_constructor_or_destructor_body_highlightingDisabled
Use preferred body style (convert to local function with preferred body style)ArrangeLocalFunctionBodyresharper_arrange_local_function_body_highlightingDisabled
Use preferred body style (convert to method or operator with preferred body style)ArrangeMethodOrOperatorBodyresharper_arrange_method_or_operator_body_highlightingDisabled
Use preferred body style (convert to property, indexer or event with preferred body style)ArrangeAccessorOwnerBodyresharper_arrange_accessor_owner_body_highlightingSuggestion
Use preferred braces style (enforce braces in 'do-while' statement)EnforceDoWhileStatementBracesresharper_enforce_do_while_statement_braces_highlightingDisabled
Use preferred braces style (enforce braces in 'fixed' statement)EnforceFixedStatementBracesresharper_enforce_fixed_statement_braces_highlightingDisabled
Use preferred braces style (enforce braces in 'for' statement)EnforceForStatementBracesresharper_enforce_for_statement_braces_highlightingDisabled
Use preferred braces style (enforce braces in 'foreach' statement)EnforceForeachStatementBracesresharper_enforce_foreach_statement_braces_highlightingDisabled
Use preferred braces style (enforce braces in 'if' statement)EnforceIfStatementBracesresharper_enforce_if_statement_braces_highlightingDisabled
Use preferred braces style (enforce braces in 'lock' statement)EnforceLockStatementBracesresharper_enforce_lock_statement_braces_highlightingDisabled
Use preferred braces style (enforce braces in 'using' statement)EnforceUsingStatementBracesresharper_enforce_using_statement_braces_highlightingDisabled
Use preferred braces style (enforce braces in 'while' statement)EnforceWhileStatementBracesresharper_enforce_while_statement_braces_highlightingDisabled
Use preferred braces style (remove redundant braces)RemoveRedundantBracesresharper_remove_redundant_braces_highlightingDisabled
Use preferred style for discard declarationSuggestDiscardDeclarationVarStyleresharper_suggest_discard_declaration_var_style_highlightingHint
Use preferred style for trailing comma before new line in multiline listsArrangeTrailingCommaInMultilineListsresharper_arrange_trailing_comma_in_multiline_lists_highlightingHint
Use preferred style for trailing comma when last element is not followed by a new lineArrangeTrailingCommaInSinglelineListsresharper_arrange_trailing_comma_in_singleline_lists_highlightingHint
Use preferred 'var' style (elsewhere)SuggestVarOrType_Elsewhereresharper_suggest_var_or_type_elsewhere_highlightingHint
Use preferred 'var' style (for built-in types)SuggestVarOrType_BuiltInTypesresharper_suggest_var_or_type_built_in_types_highlightingHint
Use preferred 'var' style (in deconstruction declarations)SuggestVarOrType_DeconstructionDeclarationsresharper_suggest_var_or_type_deconstruction_declarations_highlightingHint
Use preferred 'var' style (when type is simple)SuggestVarOrType_SimpleTypesresharper_suggest_var_or_type_simple_types_highlightingHint

Xunit (1 inspection)

These inspections detect code issues related to xUnit.Net tests.
InspectionIDEditorConfig propertyDefault severity
Console output in Xunit testsXunit.XunitTestWithConsoleOutputresharper_xunit_xunit_test_with_console_output_highlightingWarning
Last modified: 15 July 2020