Code Inspections in VB.NET
In VB.NET, JetBrains Rider 2021.1 provides two kinds of code inspections: 259 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 258 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 branch InactivePreprocessorBranch resharper_inactive_preprocessor_branch_highlighting | Warning |
Common Practices and Code Improvements (112 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 hierarchy AnnotationRedundancyInHierarchy 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 instead VBCheckForReferenceEqualityInstead.1 resharper_vb_check_for_reference_equality_instead_1_highlighting | Suggestion |
Check for reference equality instead VBCheckForReferenceEqualityInstead.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 type ContainerAnnotationRedundancy 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-property ConvertToVbAutoProperty resharper_convert_to_vb_auto_property_highlighting | Suggestion |
Convert property to auto-property when possible ConvertToVbAutoPropertyWhenPossible resharper_convert_to_vb_auto_property_when_possible_highlighting | Hint |
Convert property to auto-property with private setter ConvertToVbAutoPropertyWithPrivateSetter 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 assigned UnassignedGetOnlyAutoProperty resharper_unassigned_get_only_auto_property_highlighting | Warning |
Local function can be made static LocalFunctionCanBeMadeStatic 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 usage MultipleNullableAttributesUsage resharper_multiple_nullable_attributes_usage_highlighting | Warning |
Nullability attribute usage with declaration of void or value type AnnotationRedundancyAtValueType resharper_annotation_redundancy_at_value_type_highlighting | Warning |
Parameter can be declared with base type SuggestBaseTypeForParameter 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 argument VBPossibleMistakenArgument 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 |
Property can be made init-only (non-private accessibility) PropertyCanBeMadeInitOnly.Global resharper_property_can_be_made_init_only_global_highlighting | Suggestion |
Property can be made init-only (private accessibility) PropertyCanBeMadeInitOnly.Local resharper_property_can_be_made_init_only_local_highlighting | Suggestion |
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 assignment VBReplaceWithSingleAssignment.1 resharper_vb_replace_with_single_assignment_1_highlighting | Suggestion |
Replace with single assignment VBReplaceWithSingleAssignment.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 operator SimplifyConditionalOperator resharper_simplify_conditional_operator_highlighting | Suggestion |
Simplify expression VBSimplifyLinqExpression.1 resharper_vb_simplify_linq_expression_1_highlighting | Suggestion |
Simplify expression VBSimplifyLinqExpression.2 resharper_vb_simplify_linq_expression_2_highlighting | Suggestion |
Simplify expression VBSimplifyLinqExpression.3 resharper_vb_simplify_linq_expression_3_highlighting | Suggestion |
Simplify expression VBSimplifyLinqExpression.4 resharper_vb_simplify_linq_expression_4_highlighting | Suggestion |
Simplify expression VBSimplifyLinqExpression.5 resharper_vb_simplify_linq_expression_5_highlighting | Suggestion |
Simplify expression VBSimplifyLinqExpression.6 resharper_vb_simplify_linq_expression_6_highlighting | Suggestion |
Simplify expression VBSimplifyLinqExpression.7 resharper_vb_simplify_linq_expression_7_highlighting | Hint |
Simplify expression VBSimplifyLinqExpression.8 resharper_vb_simplify_linq_expression_8_highlighting | Hint |
Simplify expression VBSimplifyLinqExpression.9 resharper_vb_simplify_linq_expression_9_highlighting | Hint |
Simplify expression VBSimplifyLinqExpression.10 resharper_vb_simplify_linq_expression_10_highlighting | Hint |
Simplify 'IIf' SimplifyIIf resharper_simplify_i_if_highlighting | Suggestion |
Specify string comparison explicitly SpecifyStringComparison 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-specific VBStringCompareToIsCultureSpecific 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 readonly StructCanBeMadeReadOnly resharper_struct_can_be_made_read_only_highlighting | Suggestion |
Struct member can be made readonly StructMemberCanBeMadeReadOnly resharper_struct_member_can_be_made_read_only_highlighting | Disabled |
try-catch and try-finally statements can be merged TryStatementsCanBeMerged resharper_try_statements_can_be_merged_highlighting | Hint |
Use array creation expression VBUseArrayCreationExpression.1 resharper_vb_use_array_creation_expression_1_highlighting | Suggestion |
Use array creation expression VBUseArrayCreationExpression.2 resharper_vb_use_array_creation_expression_2_highlighting | Suggestion |
Use First() instead VBUseFirstInstead 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 ..' operator VBUseTypeOfIsOperator.1 resharper_vb_use_type_of_is_operator_1_highlighting | Suggestion |
Use 'TypeOf .. Is ..' operator VBUseTypeOfIsOperator.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 instance VBWarnings::BC42025 resharper_vb_warnings_bc42025_highlighting | Warning |
Async method lacks 'Await' operators VBWarnings::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 used UnusedField.Compiler resharper_unused_field_compiler_highlighting | Warning |
Function doesn't return a reference type value on all code paths VBWarnings::BC42105,BC42106,BC42107 resharper_vb_warnings_bc42105_bc42106_bc42107_highlighting | Warning |
Function doesn't return a struct value on all code paths VBWarnings::BC42353,BC42354,BC42355 resharper_vb_warnings_bc42353_bc42354_bc42355_highlighting | Warning |
Member shadows an overriable member VBWarnings::BC400005 resharper_vb_warnings_bc400005_highlighting | Warning |
Namespace or type specified in the Imports 'name' doesn't contain any public member or cannot be found VBWarnings::BC40056 resharper_vb_warnings_bc40056_highlighting | Warning |
Namespace should be default namespace of this project VBWarnings::WME006 resharper_vb_warnings_wme006_highlighting | Warning |
Non-accessed field NotAccessedField.Compiler resharper_not_accessed_field_compiler_highlighting | Warning |
Non-accessed local variable NotAccessedVariable.Compiler resharper_not_accessed_variable_compiler_highlighting | Warning |
Redundant DirectCast to the equals value type VBWarnings::BC42349 resharper_vb_warnings_bc42349_highlighting | Warning |
Runtime errors are likely to occur when converting X to Y VBWarnings::BC42322 resharper_vb_warnings_bc42322_highlighting | Warning |
Runtime errors might occur when converting X to Y VBWarnings::BC42016 resharper_vb_warnings_bc42016_highlighting | Warning |
Syntax error in XML comment VBWarnings::BC42304 resharper_vb_warnings_bc42304_highlighting | Warning |
Unassigned field UnassignedField.Compiler resharper_unassigned_field_compiler_highlighting | Warning |
Unassigned readonly field UnassignedReadonlyField.Compiler resharper_unassigned_readonly_field_compiler_highlighting | Warning |
Unused local variable UnusedVariable.Compiler resharper_unused_variable_compiler_highlighting | Warning |
Use obsolete member VBWarnings::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 value VBWarnings::BC42104 resharper_vb_warnings_bc42104_highlighting | Warning |
XML comment has a tag with a 'cref' attribute that could not be resolved VBWarnings::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 JetBrains Rider's code annotations, and other similar issues.Inspection ID EditorConfig property | Default severity |
---|---|
Inconsistent Naming InconsistentNaming resharper_inconsistent_naming_highlighting | Warning |
Namespace does not correspond to file location CheckNamespace 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 call InvokeAsExtensionMethod resharper_invoke_as_extension_method_highlighting | Suggestion |
Foreach loop can be converted into LINQ-expression but another 'GetEnumerator' method will be used ForeachCanBeConvertedToQueryUsingAnotherGetEnumerator resharper_foreach_can_be_converted_to_query_using_another_get_enumerator_highlighting | Hint |
Loop can be converted into LINQ-expression LoopCanBeConvertedToQuery 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 used ForeachCanBePartlyConvertedToQueryUsingAnotherGetEnumerator resharper_foreach_can_be_partly_converted_to_query_using_another_get_enumerator_highlighting | Hint |
Part of loop's body can be converted into LINQ-expression LoopCanBePartlyConvertedToQuery resharper_loop_can_be_partly_converted_to_query_highlighting | Disabled |
Use string interpolation expression UseStringInterpolation 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 branches ConditionalTernaryEqualBranch resharper_conditional_ternary_equal_branch_highlighting | Warning |
[ThreadStatic] doesn't work with instance fields ThreadStaticAtInstanceField resharper_thread_static_at_instance_field_highlighting | Warning |
Abstract or virtual (overridable) event is never invoked EventNeverInvoked.Global resharper_event_never_invoked_global_highlighting | Suggestion |
Access to disposed captured variable AccessToDisposedClosure resharper_access_to_disposed_closure_highlighting | Warning |
Access to foreach variable in closure AccessToForEachVariableInClosure resharper_access_to_for_each_variable_in_closure_highlighting | Warning |
Access to modified captured variable AccessToModifiedClosure resharper_access_to_modified_closure_highlighting | Warning |
Annotation conflict in hierarchy AnnotationConflictInHierarchy 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 parameters BaseMethodCallWithDefaultParameter resharper_base_method_call_with_default_parameter_highlighting | Warning |
Call to 'base.Equals(...)' is reference equality BaseObjectEqualsIsObjectEquals resharper_base_object_equals_is_object_equals_highlighting | Warning |
Cannot resolve property PropertyNotResolved resharper_property_not_resolved_highlighting | Error |
Cannot resolve resource ResourceNotResolved resharper_resource_not_resolved_highlighting | Error |
Cannot resolve resource item ResourceItemNotResolved resharper_resource_item_not_resolved_highlighting | Error |
Cannot resolve symbol in text argument NotResolvedInText 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 localizable LocalizableElement resharper_localizable_element_highlighting | Warning |
Equality comparison of floating point numbers CompareOfFloatsByEqualityOperator 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 invoked EventNeverInvoked resharper_event_never_invoked_highlighting | Warning |
Exception rethrow possibly intended PossibleIntendedRethrow resharper_possible_intended_rethrow_highlighting | Warning |
Function never returns FunctionNeverReturns resharper_function_never_returns_highlighting | Warning |
'GC.SuppressFinalize' is invoked for type without destructor GCSuppressFinalizeForTypeWithoutDestructor resharper_gc_suppress_finalize_for_type_without_destructor_highlighting | Warning |
Iterator never returns IteratorNeverReturns resharper_iterator_never_returns_highlighting | Warning |
Local variable hides member LocalVariableHidesMember 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 type ReferenceEqualsWithValueType resharper_reference_equals_with_value_type_highlighting | Warning |
Operator 'is'/'Type Of ... Is ...' can be used OperatorIsCanBeUsed resharper_operator_is_can_be_used_highlighting | Warning |
'out' parameter is not assigned upon exit NotAssignedOutParameter 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 member ParameterHidesMember resharper_parameter_hides_member_highlighting | Warning |
Possible incorrect implementation of Double-Check Locking pattern. Possible multiple write access to checked field PossibleMultipleWriteAccessInDoubleCheckLocking resharper_possible_multiple_write_access_in_double_check_locking_highlighting | Warning |
Possible incorrect implementation of Double-Check Locking pattern. Read access to checked field ReadAccessInDoubleCheckLocking resharper_read_access_in_double_check_locking_highlighting | Warning |
Possible infinite inheritance PossibleInfiniteInheritance resharper_possible_infinite_inheritance_highlighting | Warning |
Possible multiple enumeration PossibleMultipleEnumeration 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 invocation PossiblyImpureMethodCallOnReadonlyVariable resharper_possibly_impure_method_call_on_readonly_variable_highlighting | Warning |
Return value of pure method is not used ReturnValueOfPureMethodIsNotUsed resharper_return_value_of_pure_method_is_not_used_highlighting | Warning |
Similar expressions comparison EqualExpressionComparison resharper_equal_expression_comparison_highlighting | Warning |
Static field or auto-property in generic type StaticMemberInGenericType resharper_static_member_in_generic_type_highlighting | Warning |
Static member initializer refers to static member below or in other part StaticMemberInitializerReferesToMemberBelow resharper_static_member_initializer_referes_to_member_below_highlighting | Warning |
String formatting method problems FormatStringProblem resharper_format_string_problem_highlighting | Warning |
Suspicious type conversion or check SuspiciousTypeConversion.Global resharper_suspicious_type_conversion_global_highlighting | Warning |
Symbol from module that might be missing at runtime SymbolFromNotCopiedLocallyReferenceUsedWarning 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 initializer ThreadStaticFieldHasInitializer resharper_thread_static_field_has_initializer_highlighting | Warning |
Type check and casts can be merged MergeCastWithTypeCheck 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 field UnassignedReadonlyField resharper_unassigned_readonly_field_highlighting | Warning |
Use format specifier in format strings UseFormatSpecifierInFormatString resharper_use_format_specifier_in_format_string_highlighting | Suggestion |
Value assigned to a property of non-variable qualifier expression can be lost PossibleStructMemberModificationOfNonVariableStruct resharper_possible_struct_member_modification_of_non_variable_struct_highlighting | Warning |
'void' method is annotated by [Pure] attribute PureAttributeOnVoidMethod 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 used RedundantAssignment resharper_redundant_assignment_highlighting | Warning |
Explicit 'value' parameter declaration is redundant RedundantSetterValueParameterDeclaration 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' statements RedundantIteratorKeyword resharper_redundant_iterator_keyword_highlighting | Warning |
Keyword 'Then' is redundant in multiline 'If' statement RedundantIfStatementThenKeyword resharper_redundant_if_statement_then_keyword_highlighting | Disabled |
Parameterless property parentheses are redundant RedundantPropertyParentheses resharper_redundant_property_parentheses_highlighting | Hint |
Parentheses are redundant if attribute has no arguments RedundantAttributeParentheses resharper_redundant_attribute_parentheses_highlighting | Hint |
Redundant array lower bound specification RedundantArrayLowerBoundSpecification resharper_redundant_array_lower_bound_specification_highlighting | Warning |
Redundant cast RedundantCast resharper_redundant_cast_highlighting | Warning |
Redundant empty 'Case Else' statement RedundantEmptyCaseElse resharper_redundant_empty_case_else_highlighting | Warning |
Redundant explicit size specification in array creation RedundantExplicitArraySize resharper_redundant_explicit_array_size_highlighting | Warning |
Redundant 'Me.' qualifier RedundantMeQualifier resharper_redundant_me_qualifier_highlighting | Warning |
Redundant 'MyBase.' qualifier RedundantMyBaseQualifier resharper_redundant_my_base_qualifier_highlighting | Warning |
Redundant 'MyClass.' qualifier RedundantMyClassQualifier resharper_redundant_my_class_qualifier_highlighting | Warning |
Redundant operand in logical conditional expression RedundantLogicalConditionalExpressionOperand resharper_redundant_logical_conditional_expression_operand_highlighting | Warning |
Redundant qualifier RedundantQualifier resharper_redundant_qualifier_highlighting | Warning |
Remove redundant parentheses RedundantParentheses resharper_redundant_parentheses_highlighting | Disabled |
Unreachable code VbUnreachableCode resharper_vb_unreachable_code_highlighting | Warning |
Unused import clause UnusedImportClause resharper_unused_import_clause_highlighting | Warning |
Use implicit 'ByVal' modifier UseImplicitByValModifier resharper_use_implicit_by_val_modifier_highlighting | Hint |
Use implicitly typed variable declaration UseImplicitlyTypedVariable 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 used UnusedLocalFunction resharper_unused_local_function_highlighting | Warning |
Local function is never used UnusedLocalFunction.Compiler resharper_unused_local_function_compiler_highlighting | Warning |
Local function return value is never used UnusedLocalFunctionReturnValue 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 variable NotAccessedVariable 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 label UnusedLabel resharper_unused_label_highlighting | Warning |
Unused local variable UnusedVariable 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 method UnusedParameterInPartialMethod resharper_unused_parameter_in_partial_method_highlighting | Warning |
Unused positional parameter UnusedPositionalParameterCompiler resharper_unused_positional_parameter_compiler_highlighting | Warning |
Unused type parameter UnusedTypeParameter 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 comment CommentTypo resharper_comment_typo_highlighting | Suggestion |
Typo in identifier IdentifierTypo resharper_identifier_typo_highlighting | Suggestion |
Typo in string literal StringLiteralTypo resharper_string_literal_typo_highlighting | Suggestion |
Last modified: 12 July 2021