Code Inspections in VB.NET
In VB.NET, ReSharper 2020.2 provides two kinds of code inspections: 261 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 256 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 VB.NET inspections are listed below, grouped by their categories.
Code Notification (1 inspection)
This category groups code inspections with minor severity levels. Inspection ID EditorConfig property | Default severity |
---|---|
Inactive preprocessor branchInactivePreprocessorBranch resharper_inactive_preprocessor_branch_highlighting | Warning |
Common Practices and Code Improvements (110 inspections)
This category groups inspections that hunt for medium severity issues that mainly affect code readability. Inspection ID EditorConfig property | Default severity |
---|---|
Annotation duplicate in hierarchyAnnotationRedundancyInHierarchy resharper_annotation_redundancy_in_hierarchy_highlighting | Warning |
Auto-property can be made get-only (non-private accessibility)AutoPropertyCanBeMadeGetOnly.Global resharper_auto_property_can_be_made_get_only_global_highlighting | Suggestion |
Auto-property can be made get-only (private accessibility)AutoPropertyCanBeMadeGetOnly.Local resharper_auto_property_can_be_made_get_only_local_highlighting | Suggestion |
Check for reference equality insteadVBCheckForReferenceEqualityInstead.1 resharper_vb_check_for_reference_equality_instead_1_highlighting | Suggestion |
Check for reference equality insteadVBCheckForReferenceEqualityInstead.2 resharper_vb_check_for_reference_equality_instead_2_highlighting | Suggestion |
Class can be made sealed (non-inheritable) (non-private accessibility)ClassCanBeSealed.Global resharper_class_can_be_sealed_global_highlighting | Disabled |
Class can be made sealed (non-inheritable) (private accessibility)ClassCanBeSealed.Local resharper_class_can_be_sealed_local_highlighting | Disabled |
Container nullability attribute usage with declaration of non-container typeContainerAnnotationRedundancy resharper_container_annotation_redundancy_highlighting | Warning |
Convert local variable or field to constant (non-private accessibility)ConvertToConstant.Global resharper_convert_to_constant_global_highlighting | Hint |
Convert local variable or field to constant (private accessibility)ConvertToConstant.Local resharper_convert_to_constant_local_highlighting | Hint |
Convert property to auto-propertyConvertToVbAutoProperty resharper_convert_to_vb_auto_property_highlighting | Suggestion |
Convert property to auto-property when possibleConvertToVbAutoPropertyWhenPossible resharper_convert_to_vb_auto_property_when_possible_highlighting | Hint |
Convert property to auto-property with private setterConvertToVbAutoPropertyWithPrivateSetter resharper_convert_to_vb_auto_property_with_private_setter_highlighting | Hint |
Field can be made readonly (non-private accessibility)FieldCanBeMadeReadOnly.Global resharper_field_can_be_made_read_only_global_highlighting | Suggestion |
Field can be made readonly (private accessibility)FieldCanBeMadeReadOnly.Local resharper_field_can_be_made_read_only_local_highlighting | Suggestion |
Get-only auto-property is never assignedUnassignedGetOnlyAutoProperty resharper_unassigned_get_only_auto_property_highlighting | Warning |
Local function can be made staticLocalFunctionCanBeMadeStatic resharper_local_function_can_be_made_static_highlighting | Hint |
Member can be made private (non-private accessibility)MemberCanBePrivate.Global resharper_member_can_be_private_global_highlighting | Suggestion |
Member can be made private (private accessibility)MemberCanBePrivate.Local resharper_member_can_be_private_local_highlighting | Suggestion |
Member can be made protected (non-private accessibility)MemberCanBeProtected.Global resharper_member_can_be_protected_global_highlighting | Suggestion |
Member can be made protected (private accessibility)MemberCanBeProtected.Local resharper_member_can_be_protected_local_highlighting | Suggestion |
Member can be made static(shared) (non-private accessibility)MemberCanBeMadeStatic.Global resharper_member_can_be_made_static_global_highlighting | Hint |
Member can be made static(shared) (private accessibility)MemberCanBeMadeStatic.Local resharper_member_can_be_made_static_local_highlighting | Hint |
Member or type can be made internal(friend)MemberCanBeInternal resharper_member_can_be_internal_highlighting | Disabled |
Multiple nullable attributes usageMultipleNullableAttributesUsage resharper_multiple_nullable_attributes_usage_highlighting | Warning |
Nullability attribute usage with declaration of void or value typeAnnotationRedundancyAtValueType resharper_annotation_redundancy_at_value_type_highlighting | Warning |
Parameter can be declared with base typeSuggestBaseTypeForParameter resharper_suggest_base_type_for_parameter_highlighting | Hint |
Parameter type can be IEnumerable<T> (non-private accessibility)ParameterTypeCanBeEnumerable.Global resharper_parameter_type_can_be_enumerable_global_highlighting | Hint |
Parameter type can be IEnumerable<T> (private accessibility)ParameterTypeCanBeEnumerable.Local resharper_parameter_type_can_be_enumerable_local_highlighting | Hint |
Possible mistaken argumentVBPossibleMistakenArgument resharper_vb_possible_mistaken_argument_highlighting | Warning |
Possible mistaken call to GetType()VBPossibleMistakenCallToGetType.1 resharper_vb_possible_mistaken_call_to_get_type_1_highlighting | Warning |
Possible mistaken call to GetType()VBPossibleMistakenCallToGetType.2 resharper_vb_possible_mistaken_call_to_get_type_2_highlighting | Warning |
Remove ToList()VBRemoveToList.1 resharper_vb_remove_to_list_1_highlighting | Suggestion |
Remove ToList()VBRemoveToList.2 resharper_vb_remove_to_list_2_highlighting | Suggestion |
Replace with FirstOrDefault($args$)VBReplaceWithFirstOrDefault resharper_vb_replace_with_first_or_default_highlighting | Suggestion |
Replace with LastOrDefault($args$)VBReplaceWithLastOrDefault resharper_vb_replace_with_last_or_default_highlighting | Suggestion |
Replace with OfType<T>() (replace with OfType(Of ..)())VBReplaceWithOfType.1 resharper_vb_replace_with_of_type_1_highlighting | Suggestion |
Replace with OfType<T>() (replace with OfType(Of ..)())VBReplaceWithOfType.2 resharper_vb_replace_with_of_type_2_highlighting | Suggestion |
Replace with OfType<T>().Any() (replace with OfType(Of ..)().Any())VBReplaceWithOfType.Any.1 resharper_vb_replace_with_of_type_any_1_highlighting | Suggestion |
Replace with OfType<T>().Any() (replace with OfType(Of ..)().Any(..))VBReplaceWithOfType.Any.2 resharper_vb_replace_with_of_type_any_2_highlighting | Suggestion |
Replace with OfType<T>().Count() (replace with OfType(Of ..)().Count())VBReplaceWithOfType.Count.1 resharper_vb_replace_with_of_type_count_1_highlighting | Suggestion |
Replace with OfType<T>().Count() (replace with OfType(Of ..)().Count(..))VBReplaceWithOfType.Count.2 resharper_vb_replace_with_of_type_count_2_highlighting | Suggestion |
Replace with OfType<T>().First() (replace with OfType(Of ..)().First())VBReplaceWithOfType.First.1 resharper_vb_replace_with_of_type_first_1_highlighting | Suggestion |
Replace with OfType<T>().First() (replace with OfType(Of ..)().First(..))VBReplaceWithOfType.First.2 resharper_vb_replace_with_of_type_first_2_highlighting | Suggestion |
Replace with OfType<T>().FirstOrDefault() (replace with OfType(Of ..)().FirstOrDefault())VBReplaceWithOfType.FirstOrDefault.1 resharper_vb_replace_with_of_type_first_or_default_1_highlighting | Suggestion |
Replace with OfType<T>().FirstOrDefault() (replace with OfType(Of ..)().FirstOrDefault(..))VBReplaceWithOfType.FirstOrDefault.2 resharper_vb_replace_with_of_type_first_or_default_2_highlighting | Suggestion |
Replace with OfType<T>().Last() (replace with OfType(Of ..)().Last())VBReplaceWithOfType.Last.1 resharper_vb_replace_with_of_type_last_1_highlighting | Suggestion |
Replace with OfType<T>().Last() (replace with OfType(Of ..)().Last(..))VBReplaceWithOfType.Last.2 resharper_vb_replace_with_of_type_last_2_highlighting | Suggestion |
Replace with OfType<T>().LastOrDefault() (replace with OfType(Of ..)().LastOrDefault())VBReplaceWithOfType.LastOrDefault.1 resharper_vb_replace_with_of_type_last_or_default_1_highlighting | Suggestion |
Replace with OfType<T>().LastOrDefault() (replace with OfType(Of ..)().LastOrDefault(..))VBReplaceWithOfType.LastOrDefault.2 resharper_vb_replace_with_of_type_last_or_default_2_highlighting | Suggestion |
Replace with OfType<T>().Single() (replace with OfType(Of ..)().Single())VBReplaceWithOfType.Single.1 resharper_vb_replace_with_of_type_single_1_highlighting | Suggestion |
Replace with OfType<T>().Single() (replace with OfType(Of ..)().Single(..))VBReplaceWithOfType.Single.2 resharper_vb_replace_with_of_type_single_2_highlighting | Suggestion |
Replace with OfType<T>().SingleOrDefault() (replace with OfType(Of ..)().SingleOrDefault())VBReplaceWithOfType.SingleOrDefault.1 resharper_vb_replace_with_of_type_single_or_default_1_highlighting | Suggestion |
Replace with OfType<T>().SingleOrDefault() (replace with OfType(Of ..)().SingleOrDefault(..))VBReplaceWithOfType.SingleOrDefault.2 resharper_vb_replace_with_of_type_single_or_default_2_highlighting | Suggestion |
Replace with OfType<T>().Where() (replace with OfType(Of ..)().Where(..))VBReplaceWithOfType.Where resharper_vb_replace_with_of_type_where_highlighting | Suggestion |
Replace with single assignmentVBReplaceWithSingleAssignment.1 resharper_vb_replace_with_single_assignment_1_highlighting | Suggestion |
Replace with single assignmentVBReplaceWithSingleAssignment.2 resharper_vb_replace_with_single_assignment_2_highlighting | Suggestion |
Replace with single call to Any(..)VBReplaceWithSingleCallToAny resharper_vb_replace_with_single_call_to_any_highlighting | Suggestion |
Replace with single call to Count(..)VBReplaceWithSingleCallToCount resharper_vb_replace_with_single_call_to_count_highlighting | Suggestion |
Replace with single call to First(..)VBReplaceWithSingleCallToFirst resharper_vb_replace_with_single_call_to_first_highlighting | Suggestion |
Replace with single call to FirstOrDefault(..)VBReplaceWithSingleCallToFirstOrDefault resharper_vb_replace_with_single_call_to_first_or_default_highlighting | Suggestion |
Replace with single call to Last(..)VBReplaceWithSingleCallToLast resharper_vb_replace_with_single_call_to_last_highlighting | Suggestion |
Replace with single call to LastOrDefault(..)VBReplaceWithSingleCallToLastOrDefault resharper_vb_replace_with_single_call_to_last_or_default_highlighting | Suggestion |
Replace with single call to Single(..)VBReplaceWithSingleCallToSingle resharper_vb_replace_with_single_call_to_single_highlighting | Suggestion |
Replace with single call to SingleOrDefault(..)VBReplaceWithSingleCallToSingleOrDefault resharper_vb_replace_with_single_call_to_single_or_default_highlighting | Suggestion |
Replace with SingleOrDefault($args$)VBReplaceWithSingleOrDefault resharper_vb_replace_with_single_or_default_highlighting | Suggestion |
Return type can be IEnumerable<T> (non-private accessibility)ReturnTypeCanBeEnumerable.Global resharper_return_type_can_be_enumerable_global_highlighting | Hint |
Return type can be IEnumerable<T> (private accessibility)ReturnTypeCanBeEnumerable.Local resharper_return_type_can_be_enumerable_local_highlighting | Hint |
Simplify conditional operatorSimplifyConditionalOperator resharper_simplify_conditional_operator_highlighting | Suggestion |
Simplify expressionVBSimplifyLinqExpression.1 resharper_vb_simplify_linq_expression_1_highlighting | Suggestion |
Simplify expressionVBSimplifyLinqExpression.2 resharper_vb_simplify_linq_expression_2_highlighting | Suggestion |
Simplify expressionVBSimplifyLinqExpression.3 resharper_vb_simplify_linq_expression_3_highlighting | Suggestion |
Simplify expressionVBSimplifyLinqExpression.4 resharper_vb_simplify_linq_expression_4_highlighting | Suggestion |
Simplify expressionVBSimplifyLinqExpression.5 resharper_vb_simplify_linq_expression_5_highlighting | Suggestion |
Simplify expressionVBSimplifyLinqExpression.6 resharper_vb_simplify_linq_expression_6_highlighting | Suggestion |
Simplify expressionVBSimplifyLinqExpression.7 resharper_vb_simplify_linq_expression_7_highlighting | Hint |
Simplify expressionVBSimplifyLinqExpression.8 resharper_vb_simplify_linq_expression_8_highlighting | Hint |
Simplify expressionVBSimplifyLinqExpression.9 resharper_vb_simplify_linq_expression_9_highlighting | Hint |
Simplify expressionVBSimplifyLinqExpression.10 resharper_vb_simplify_linq_expression_10_highlighting | Hint |
Simplify 'IIf'SimplifyIIf resharper_simplify_i_if_highlighting | Suggestion |
Specify string comparison explicitlySpecifyStringComparison resharper_specify_string_comparison_highlighting | Hint |
String.Compare is culture-specific (string.Compare(string, int, string, int) is culture-specific)VBStringCompareIsCultureSpecific.4 resharper_vb_string_compare_is_culture_specific_4_highlighting | Warning |
String.Compare is culture-specific (string.Compare(string, int, string, int, bool) is culture-specific)VBStringCompareIsCultureSpecific.5 resharper_vb_string_compare_is_culture_specific_5_highlighting | Warning |
String.Compare is culture-specific (string.Compare(string, int, string, int, bool) is culture-specific)VBStringCompareIsCultureSpecific.6 resharper_vb_string_compare_is_culture_specific_6_highlighting | Warning |
String.Compare is culture-specific (string.Compare(string, string) is culture-specific)VBStringCompareIsCultureSpecific.1 resharper_vb_string_compare_is_culture_specific_1_highlighting | Warning |
String.Compare is culture-specific (string.Compare(string, string, bool) is culture-specific)VBStringCompareIsCultureSpecific.2 resharper_vb_string_compare_is_culture_specific_2_highlighting | Warning |
String.Compare is culture-specific (string.Compare(string, string, bool) is culture-specific)VBStringCompareIsCultureSpecific.3 resharper_vb_string_compare_is_culture_specific_3_highlighting | Warning |
String.CompareTo is culture-specificVBStringCompareToIsCultureSpecific resharper_vb_string_compare_to_is_culture_specific_highlighting | Warning |
String.EndsWith is culture-specific (string.EndsWith(string) is culture-specific)VBStringEndsWithIsCultureSpecific resharper_vb_string_ends_with_is_culture_specific_highlighting | Disabled |
String.IndexOf is culture-specific (string.IndexOf(string) is culture-specific)VBStringIndexOfIsCultureSpecific.1 resharper_vb_string_index_of_is_culture_specific_1_highlighting | Warning |
String.IndexOf is culture-specific (string.IndexOf(string, int) is culture-specific)VBStringIndexOfIsCultureSpecific.2 resharper_vb_string_index_of_is_culture_specific_2_highlighting | Warning |
String.IndexOf is culture-specific (string.IndexOf(string, int) is culture-specific)VBStringIndexOfIsCultureSpecific.3 resharper_vb_string_index_of_is_culture_specific_3_highlighting | Warning |
String.LastIndexOf is culture-specific (string.LastIndexOf(string) is culture-specific)VBStringLastIndexOfIsCultureSpecific.1 resharper_vb_string_last_index_of_is_culture_specific_1_highlighting | Warning |
String.LastIndexOf is culture-specific (string.LastIndexOf(string, int) is culture-specific)VBStringLastIndexOfIsCultureSpecific.2 resharper_vb_string_last_index_of_is_culture_specific_2_highlighting | Warning |
String.LastIndexOf is culture-specific (string.LastIndexOf(string, int) is culture-specific)VBStringLastIndexOfIsCultureSpecific.3 resharper_vb_string_last_index_of_is_culture_specific_3_highlighting | Warning |
String.StartsWith is culture-specific (string.StartsWith(string) is culture-specific)VBStringStartsWithIsCultureSpecific resharper_vb_string_starts_with_is_culture_specific_highlighting | Disabled |
Struct can be made readonlyStructCanBeMadeReadOnly resharper_struct_can_be_made_read_only_highlighting | Suggestion |
Struct member can be made readonlyStructMemberCanBeMadeReadOnly resharper_struct_member_can_be_made_read_only_highlighting | Disabled |
try-catch and try-finally statements can be mergedTryStatementsCanBeMerged resharper_try_statements_can_be_merged_highlighting | Hint |
Use array creation expressionVBUseArrayCreationExpression.1 resharper_vb_use_array_creation_expression_1_highlighting | Suggestion |
Use array creation expressionVBUseArrayCreationExpression.2 resharper_vb_use_array_creation_expression_2_highlighting | Suggestion |
Use First() insteadVBUseFirstInstead resharper_vb_use_first_instead_highlighting | Warning |
Use method Any()VBUseMethodAny.1 resharper_vb_use_method_any_1_highlighting | Suggestion |
Use method Any()VBUseMethodAny.2 resharper_vb_use_method_any_2_highlighting | Suggestion |
Use method Any()VBUseMethodAny.3 resharper_vb_use_method_any_3_highlighting | Suggestion |
Use method Any()VBUseMethodAny.4 resharper_vb_use_method_any_4_highlighting | Suggestion |
Use method Any()VBUseMethodAny.5 resharper_vb_use_method_any_5_highlighting | Suggestion |
Use method IsInstanceOfType(..)VBUseMethodIsInstanceOfType resharper_vb_use_method_is_instance_of_type_highlighting | Suggestion |
Use 'TypeOf .. Is ..' operatorVBUseTypeOfIsOperator.1 resharper_vb_use_type_of_is_operator_1_highlighting | Suggestion |
Use 'TypeOf .. Is ..' operatorVBUseTypeOfIsOperator.2 resharper_vb_use_type_of_is_operator_2_highlighting | Suggestion |
Compiler Warnings (22 inspections)
Inspections in this category detect compiler warnings before you compile. Inspection ID EditorConfig property | Default severity |
---|---|
Access of shared member through an instanceVBWarnings::BC42025 resharper_vb_warnings_bc42025_highlighting | Warning |
Async method lacks 'Await' operatorsVBWarnings::BC42356 resharper_vb_warnings_bc42356_highlighting | Warning |
Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'Await' operator to the result of the call.VBWarnings::BC42358 resharper_vb_warnings_bc42358_highlighting | Warning |
Field is never usedUnusedField.Compiler resharper_unused_field_compiler_highlighting | Warning |
Function doesn't return a reference type value on all code pathsVBWarnings::BC42105,BC42106,BC42107 resharper_vb_warnings_bc42105_bc42106_bc42107_highlighting | Warning |
Function doesn't return a struct value on all code pathsVBWarnings::BC42353,BC42354,BC42355 resharper_vb_warnings_bc42353_bc42354_bc42355_highlighting | Warning |
Member shadows an overriable memberVBWarnings::BC400005 resharper_vb_warnings_bc400005_highlighting | Warning |
Namespace or type specified in the Imports 'name' doesn't contain any public member or cannot be foundVBWarnings::BC40056 resharper_vb_warnings_bc40056_highlighting | Warning |
Namespace should be default namespace of this projectVBWarnings::WME006 resharper_vb_warnings_wme006_highlighting | Warning |
Non-accessed fieldNotAccessedField.Compiler resharper_not_accessed_field_compiler_highlighting | Warning |
Non-accessed local variableNotAccessedVariable.Compiler resharper_not_accessed_variable_compiler_highlighting | Warning |
Redundant DirectCast to the equals value typeVBWarnings::BC42349 resharper_vb_warnings_bc42349_highlighting | Warning |
Runtime errors are likely to occur when converting X to YVBWarnings::BC42322 resharper_vb_warnings_bc42322_highlighting | Warning |
Runtime errors might occur when converting X to YVBWarnings::BC42016 resharper_vb_warnings_bc42016_highlighting | Warning |
Syntax error in XML commentVBWarnings::BC42304 resharper_vb_warnings_bc42304_highlighting | Warning |
Unassigned fieldUnassignedField.Compiler resharper_unassigned_field_compiler_highlighting | Warning |
Unassigned readonly fieldUnassignedReadonlyField.Compiler resharper_unassigned_readonly_field_compiler_highlighting | Warning |
Unused local variableUnusedVariable.Compiler resharper_unused_variable_compiler_highlighting | Warning |
Use obsolete memberVBWarnings::BC40000 resharper_vb_warnings_bc40000_highlighting | Warning |
Use obsolete member (without message)VBWarnings::BC40008 resharper_vb_warnings_bc40008_highlighting | Warning |
Variable is used before it has been assigned a valueVBWarnings::BC42104 resharper_vb_warnings_bc42104_highlighting | Warning |
XML comment has a tag with a 'cref' attribute that could not be resolvedVBWarnings::BC42309 resharper_vb_warnings_bc42309_highlighting | Warning |
Constraints Violations (2 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. Inspection ID EditorConfig property | Default severity |
---|---|
Inconsistent NamingInconsistentNaming resharper_inconsistent_naming_highlighting | Warning |
Namespace does not correspond to file locationCheckNamespace resharper_check_namespace_highlighting | Warning |
Language Usage Opportunities (6 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. Inspection ID EditorConfig property | Default severity |
---|---|
Convert static method invocation to extension method callInvokeAsExtensionMethod resharper_invoke_as_extension_method_highlighting | Suggestion |
Foreach loop can be converted into LINQ-expression but another 'GetEnumerator' method will be usedForeachCanBeConvertedToQueryUsingAnotherGetEnumerator resharper_foreach_can_be_converted_to_query_using_another_get_enumerator_highlighting | Hint |
Loop can be converted into LINQ-expressionLoopCanBeConvertedToQuery resharper_loop_can_be_converted_to_query_highlighting | Hint |
Part of foreach loop can be converted into LINQ-expression but another 'GetEnumerator' method will be usedForeachCanBePartlyConvertedToQueryUsingAnotherGetEnumerator resharper_foreach_can_be_partly_converted_to_query_using_another_get_enumerator_highlighting | Hint |
Part of loop's body can be converted into LINQ-expressionLoopCanBePartlyConvertedToQuery resharper_loop_can_be_partly_converted_to_query_highlighting | Disabled |
Use string interpolation expressionUseStringInterpolation resharper_use_string_interpolation_highlighting | Suggestion |
Potential Code Quality Issues (61 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. Inspection ID EditorConfig property | Default severity |
---|---|
'?:' expression has identical true and false branchesConditionalTernaryEqualBranch resharper_conditional_ternary_equal_branch_highlighting | Warning |
[ThreadStatic] doesn't work with instance fieldsThreadStaticAtInstanceField resharper_thread_static_at_instance_field_highlighting | Warning |
Abstract or virtual (overridable) event is never invokedEventNeverInvoked.Global resharper_event_never_invoked_global_highlighting | Suggestion |
Access to disposed captured variableAccessToDisposedClosure resharper_access_to_disposed_closure_highlighting | Warning |
Access to foreach variable in closureAccessToForEachVariableInClosure resharper_access_to_for_each_variable_in_closure_highlighting | Warning |
Access to modified captured variableAccessToModifiedClosure resharper_access_to_modified_closure_highlighting | Warning |
Annotation conflict in hierarchyAnnotationConflictInHierarchy resharper_annotation_conflict_in_hierarchy_highlighting | Warning |
Auto-property accessor is never used (non-private accessibility)UnusedAutoPropertyAccessor.Global resharper_unused_auto_property_accessor_global_highlighting | Warning |
Auto-property accessor is never used (private accessibility)UnusedAutoPropertyAccessor.Local resharper_unused_auto_property_accessor_local_highlighting | Warning |
Call to base member with implicit default parametersBaseMethodCallWithDefaultParameter resharper_base_method_call_with_default_parameter_highlighting | Warning |
Call to 'base.Equals(...)' is reference equalityBaseObjectEqualsIsObjectEquals resharper_base_object_equals_is_object_equals_highlighting | Warning |
Cannot resolve propertyPropertyNotResolved resharper_property_not_resolved_highlighting | Error |
Cannot resolve resourceResourceNotResolved resharper_resource_not_resolved_highlighting | Error |
Cannot resolve resource itemResourceItemNotResolved resharper_resource_item_not_resolved_highlighting | Error |
Cannot resolve symbol in text argumentNotResolvedInText resharper_not_resolved_in_text_highlighting | Warning |
Class is never instantiated (non-private accessibility)ClassNeverInstantiated.Global resharper_class_never_instantiated_global_highlighting | Suggestion |
Class is never instantiated (private accessibility)ClassNeverInstantiated.Local resharper_class_never_instantiated_local_highlighting | Suggestion |
Collection is never updated (non-private accessibility)CollectionNeverUpdated.Global resharper_collection_never_updated_global_highlighting | Warning |
Collection is never updated (private accessibility)CollectionNeverUpdated.Local resharper_collection_never_updated_local_highlighting | Warning |
Collection's content is never queried (non-private accessibility)CollectionNeverQueried.Global resharper_collection_never_queried_global_highlighting | Warning |
Collection's content is never queried (private accessibility)CollectionNeverQueried.Local resharper_collection_never_queried_local_highlighting | Warning |
Element is localizableLocalizableElement resharper_localizable_element_highlighting | Warning |
Equality comparison of floating point numbersCompareOfFloatsByEqualityOperator resharper_compare_of_floats_by_equality_operator_highlighting | Warning |
Event is never subscribed to (non-private accessibility)EventNeverSubscribedTo.Global resharper_event_never_subscribed_to_global_highlighting | Suggestion |
Event is never subscribed to (private accessibility)EventNeverSubscribedTo.Local resharper_event_never_subscribed_to_local_highlighting | Suggestion |
Event never invokedEventNeverInvoked resharper_event_never_invoked_highlighting | Warning |
Exception rethrow possibly intendedPossibleIntendedRethrow resharper_possible_intended_rethrow_highlighting | Warning |
Function never returnsFunctionNeverReturns resharper_function_never_returns_highlighting | Warning |
'GC.SuppressFinalize' is invoked for type without destructorGCSuppressFinalizeForTypeWithoutDestructor resharper_gc_suppress_finalize_for_type_without_destructor_highlighting | Warning |
Iterator never returnsIteratorNeverReturns resharper_iterator_never_returns_highlighting | Warning |
Local variable hides memberLocalVariableHidesMember resharper_local_variable_hides_member_highlighting | Warning |
Non-accessed field (non-private accessibility)NotAccessedField.Global resharper_not_accessed_field_global_highlighting | Suggestion |
Non-accessed field (private accessibility)NotAccessedField.Local resharper_not_accessed_field_local_highlighting | Warning |
Non-readonly type member referenced in 'GetHashCode()'NonReadonlyMemberInGetHashCode resharper_non_readonly_member_in_get_hash_code_highlighting | Warning |
'Object.ReferenceEquals' is always false because it is called with value typeReferenceEqualsWithValueType resharper_reference_equals_with_value_type_highlighting | Warning |
Operator 'is'/'Type Of ... Is ...' can be usedOperatorIsCanBeUsed resharper_operator_is_can_be_used_highlighting | Warning |
'out' parameter is not assigned upon exitNotAssignedOutParameter resharper_not_assigned_out_parameter_highlighting | Warning |
Overridden GetHashCode calls base 'Object.GetHashCode()'BaseObjectGetHashCodeCallInGetHashCode resharper_base_object_get_hash_code_call_in_get_hash_code_highlighting | Warning |
Parameter hides memberParameterHidesMember resharper_parameter_hides_member_highlighting | Warning |
Possible incorrect implementation of Double-Check Locking pattern. Possible multiple write access to checked fieldPossibleMultipleWriteAccessInDoubleCheckLocking resharper_possible_multiple_write_access_in_double_check_locking_highlighting | Warning |
Possible incorrect implementation of Double-Check Locking pattern. Read access to checked fieldReadAccessInDoubleCheckLocking resharper_read_access_in_double_check_locking_highlighting | Warning |
Possible infinite inheritancePossibleInfiniteInheritance resharper_possible_infinite_inheritance_highlighting | Warning |
Possible multiple enumerationPossibleMultipleEnumeration resharper_possible_multiple_enumeration_highlighting | Warning |
Possible write to 'Me'PossibleWriteToMe resharper_possible_write_to_me_highlighting | Warning |
Possibly impure struct method is called on readonly variable: struct value always copied before invocationPossiblyImpureMethodCallOnReadonlyVariable resharper_possibly_impure_method_call_on_readonly_variable_highlighting | Warning |
Return value of pure method is not usedReturnValueOfPureMethodIsNotUsed resharper_return_value_of_pure_method_is_not_used_highlighting | Warning |
Similar expressions comparisonEqualExpressionComparison resharper_equal_expression_comparison_highlighting | Warning |
Static field or auto-property in generic typeStaticMemberInGenericType resharper_static_member_in_generic_type_highlighting | Warning |
Static member initializer refers to static member below or in other partStaticMemberInitializerReferesToMemberBelow resharper_static_member_initializer_referes_to_member_below_highlighting | Warning |
String formatting method problemsFormatStringProblem resharper_format_string_problem_highlighting | Warning |
Suspicious type conversion or checkSuspiciousTypeConversion.Global resharper_suspicious_type_conversion_global_highlighting | Warning |
Symbol from module that might be missing at runtimeSymbolFromNotCopiedLocallyReferenceUsedWarning resharper_symbol_from_not_copied_locally_reference_used_warning_highlighting | Warning |
The 'l' suffix is easily confused with the digit '1'LongLiteralEndingLowerL resharper_long_literal_ending_lower_l_highlighting | Warning |
Thread static field has initializerThreadStaticFieldHasInitializer resharper_thread_static_field_has_initializer_highlighting | Warning |
Type check and casts can be mergedMergeCastWithTypeCheck resharper_merge_cast_with_type_check_highlighting | Suggestion |
Unassigned field (non-private accessibility)UnassignedField.Global resharper_unassigned_field_global_highlighting | Suggestion |
Unassigned field (private accessibility)UnassignedField.Local resharper_unassigned_field_local_highlighting | Warning |
Unassigned readonly fieldUnassignedReadonlyField resharper_unassigned_readonly_field_highlighting | Warning |
Use format specifier in format stringsUseFormatSpecifierInFormatString resharper_use_format_specifier_in_format_string_highlighting | Suggestion |
Value assigned to a property of non-variable qualifier expression can be lostPossibleStructMemberModificationOfNonVariableStruct resharper_possible_struct_member_modification_of_non_variable_struct_highlighting | Warning |
'void' method is annotated by [Pure] attributePureAttributeOnVoidMethod resharper_pure_attribute_on_void_method_highlighting | Warning |
Redundancies in Code (22 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. Inspection ID EditorConfig property | Default severity |
---|---|
Assignment is not usedRedundantAssignment resharper_redundant_assignment_highlighting | Warning |
Explicit 'value' parameter declaration is redundantRedundantSetterValueParameterDeclaration resharper_redundant_setter_value_parameter_declaration_highlighting | Hint |
Expression is always 'true' or always 'false'ConditionIsAlwaysTrueOrFalse resharper_condition_is_always_true_or_false_highlighting | Warning |
Iterator function without 'Yield' statementsRedundantIteratorKeyword resharper_redundant_iterator_keyword_highlighting | Warning |
Keyword 'Then' is redundant in multiline 'If' statementRedundantIfStatementThenKeyword resharper_redundant_if_statement_then_keyword_highlighting | Disabled |
Parameterless property parentheses are redundantRedundantPropertyParentheses resharper_redundant_property_parentheses_highlighting | Hint |
Parentheses are redundant if attribute has no argumentsRedundantAttributeParentheses resharper_redundant_attribute_parentheses_highlighting | Hint |
Redundant array lower bound specificationRedundantArrayLowerBoundSpecification resharper_redundant_array_lower_bound_specification_highlighting | Warning |
Redundant castRedundantCast resharper_redundant_cast_highlighting | Warning |
Redundant empty 'Case Else' statementRedundantEmptyCaseElse resharper_redundant_empty_case_else_highlighting | Warning |
Redundant explicit size specification in array creationRedundantExplicitArraySize resharper_redundant_explicit_array_size_highlighting | Warning |
Redundant 'Me.' qualifierRedundantMeQualifier resharper_redundant_me_qualifier_highlighting | Warning |
Redundant 'MyBase.' qualifierRedundantMyBaseQualifier resharper_redundant_my_base_qualifier_highlighting | Warning |
Redundant 'MyClass.' qualifierRedundantMyClassQualifier resharper_redundant_my_class_qualifier_highlighting | Warning |
Redundant operand in logical conditional expressionRedundantLogicalConditionalExpressionOperand resharper_redundant_logical_conditional_expression_operand_highlighting | Warning |
Redundant qualifierRedundantQualifier resharper_redundant_qualifier_highlighting | Warning |
Remove redundant parenthesesRedundantParentheses resharper_redundant_parentheses_highlighting | Disabled |
Unreachable codeVbUnreachableCode resharper_vb_unreachable_code_highlighting | Warning |
Unused import clauseUnusedImportClause resharper_unused_import_clause_highlighting | Warning |
Use implicit 'ByVal' modifierUseImplicitByValModifier resharper_use_implicit_by_val_modifier_highlighting | Hint |
Use implicitly typed variable declarationUseImplicitlyTypedVariable resharper_use_implicitly_typed_variable_highlighting | Disabled |
Use implicitly typed variable declaration (evident)UseImplicitlyTypedVariableEvident resharper_use_implicitly_typed_variable_evident_highlighting | Hint |
Redundancies in Symbol Declarations (29 inspections)
This category includes code inspections, mostly with the warning severity level, which detect empty and unused symbol declarations. Inspection ID EditorConfig property | Default severity |
---|---|
Class with virtual (overridable) members never inherited (non-private accessibility)ClassWithVirtualMembersNeverInherited.Global resharper_class_with_virtual_members_never_inherited_global_highlighting | Suggestion |
Class with virtual (overridable) members never inherited (private accessibility)ClassWithVirtualMembersNeverInherited.Local resharper_class_with_virtual_members_never_inherited_local_highlighting | Suggestion |
Entity is only used to capture its name (non-private accessibility)EntityNameCapturedOnly.Global resharper_entity_name_captured_only_global_highlighting | Warning |
Entity is only used to capture its name (private accessibility)EntityNameCapturedOnly.Local resharper_entity_name_captured_only_local_highlighting | Warning |
Local function is never usedUnusedLocalFunction resharper_unused_local_function_highlighting | Warning |
Local function is never usedUnusedLocalFunction.Compiler resharper_unused_local_function_compiler_highlighting | Warning |
Local function return value is never usedUnusedLocalFunctionReturnValue resharper_unused_local_function_return_value_highlighting | Warning |
Method return value is never used (non-private accessibility)UnusedMethodReturnValue.Global resharper_unused_method_return_value_global_highlighting | Suggestion |
Method return value is never used (private accessibility)UnusedMethodReturnValue.Local resharper_unused_method_return_value_local_highlighting | Warning |
Non-accessed local variableNotAccessedVariable resharper_not_accessed_variable_highlighting | Warning |
Parameter is only used for precondition check (non-private accessibility)ParameterOnlyUsedForPreconditionCheck.Global resharper_parameter_only_used_for_precondition_check_global_highlighting | Suggestion |
Parameter is only used for precondition check (private accessibility)ParameterOnlyUsedForPreconditionCheck.Local resharper_parameter_only_used_for_precondition_check_local_highlighting | Warning |
Type is never used (non-private accessibility)UnusedType.Global resharper_unused_type_global_highlighting | Suggestion |
Type is never used (private accessibility)UnusedType.Local resharper_unused_type_local_highlighting | Warning |
Type member is never accessed via base type (non-private accessibility)UnusedMemberInSuper.Global resharper_unused_member_in_super_global_highlighting | Suggestion |
Type member is never accessed via base type (private accessibility)UnusedMemberInSuper.Local resharper_unused_member_in_super_local_highlighting | Warning |
Type member is never used (non-private accessibility)UnusedMember.Global resharper_unused_member_global_highlighting | Suggestion |
Type member is never used (private accessibility)UnusedMember.Local resharper_unused_member_local_highlighting | Warning |
Type member is only used in overrides (non-private accessibility)UnusedMemberHierarchy.Global resharper_unused_member_hierarchy_global_highlighting | Suggestion |
Type member is only used in overrides (private accessibility)UnusedMemberHierarchy.Local resharper_unused_member_hierarchy_local_highlighting | Warning |
Unused labelUnusedLabel resharper_unused_label_highlighting | Warning |
Unused local variableUnusedVariable resharper_unused_variable_highlighting | Warning |
Unused parameter (non-private accessibility)UnusedParameter.Global resharper_unused_parameter_global_highlighting | Suggestion |
Unused parameter (private accessibility)UnusedParameter.Local resharper_unused_parameter_local_highlighting | Warning |
Unused parameter in partial methodUnusedParameterInPartialMethod resharper_unused_parameter_in_partial_method_highlighting | Warning |
Unused parameter of local functionUnusedLocalFunctionParameter resharper_unused_local_function_parameter_highlighting | Warning |
Unused type parameterUnusedTypeParameter resharper_unused_type_parameter_highlighting | Warning |
Virtual (overridable) member is never overridden (non-private accessibility)VirtualMemberNeverOverridden.Global resharper_virtual_member_never_overridden_global_highlighting | Suggestion |
Virtual (overridable) member is never overridden (private accessibility)VirtualMemberNeverOverridden.Local resharper_virtual_member_never_overridden_local_highlighting | Suggestion |
Spelling issues (3 inspections)
These inspections detect typos in various contexts. Inspection ID EditorConfig property | Default severity |
---|---|
Typo in commentCommentTypo resharper_comment_typo_highlighting | Suggestion |
Typo in identifierIdentifierTypo resharper_identifier_typo_highlighting | Suggestion |
Typo in string literalStringLiteralTypo resharper_string_literal_typo_highlighting | Suggestion |