Code Inspections in C#
In C#, ReSharper 2020.2 provides two kinds of code inspections: 835 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 702 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 (2 inspections)
This category groups code inspections with minor severity levels. Inspection ID EditorConfig property | Default severity |
---|---|
Method invocation is skippedInvocationIsSkipped resharper_invocation_is_skipped_highlighting | Hint |
Part of the code cannot be parsedNonParsableElement resharper_non_parsable_element_highlighting | Warning |
Common Practices and Code Improvements (145 inspections)
This category groups inspections that hunt for medium severity issues that mainly affect code readability. Inspection ID EditorConfig property | Default severity |
---|---|
Access to a static member of a type via a derived typeAccessToStaticMemberViaDerivedType resharper_access_to_static_member_via_derived_type_highlighting | Warning |
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 |
Base member has 'params' parameter, but overrider hasn'tBaseMemberHasParams resharper_base_member_has_params_highlighting | Warning |
Check for reference equality insteadCheckForReferenceEqualityInstead.1 resharper_check_for_reference_equality_instead_1_highlighting | Suggestion |
Check for reference equality insteadCheckForReferenceEqualityInstead.3 resharper_check_for_reference_equality_instead_3_highlighting | Suggestion |
Check for reference equality insteadCheckForReferenceEqualityInstead.2 resharper_check_for_reference_equality_instead_2_highlighting | Suggestion |
Check for reference equality insteadCheckForReferenceEqualityInstead.4 resharper_check_for_reference_equality_instead_4_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 'if do while' to 'whileConvertIfDoToWhile resharper_convert_if_do_to_while_highlighting | Suggestion |
Convert 'if' to '||'ConvertIfToOrExpression resharper_convert_if_to_or_expression_highlighting | Suggestion |
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 |
Declaration nullability inferred (parameter is inferred to be not null)AnnotateNotNullParameter resharper_annotate_not_null_parameter_highlighting | Disabled |
Declaration nullability inferred (parameter is inferred to be nullable)AnnotateCanBeNullParameter resharper_annotate_can_be_null_parameter_highlighting | Disabled |
Declaration nullability inferred (type member is inferred to be not null)AnnotateNotNullTypeMember resharper_annotate_not_null_type_member_highlighting | Disabled |
Declaration nullability inferred (type member is inferred to be nullable)AnnotateCanBeNullTypeMember resharper_annotate_can_be_null_type_member_highlighting | Disabled |
Empty control statement bodyEmptyEmbeddedStatement resharper_empty_embedded_statement_highlighting | Warning |
Empty statement is redundantEmptyStatement resharper_empty_statement_highlighting | Warning |
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 |
Invert conditionInvertCondition.1 resharper_invert_condition_1_highlighting | Hint |
Iteration variable can be declared with a more specific typeMoreSpecificForeachVariableTypeAvailable resharper_more_specific_foreach_variable_type_available_highlighting | Suggestion |
Join local variable declaration and assignmentJoinDeclarationAndInitializer resharper_join_declaration_and_initializer_highlighting | Suggestion |
Literal's length can be reduced by using verbatim stringUseVerbatimString resharper_use_verbatim_string_highlighting | Hint |
Local function can be made staticLocalFunctionCanBeMadeStatic resharper_local_function_can_be_made_static_highlighting | Hint |
Local variable has too wide declaration scopeTooWideLocalVariableScope resharper_too_wide_local_variable_scope_highlighting | Suggestion |
Make constructor in abstract class protectedPublicConstructorInAbstractClass resharper_public_constructor_in_abstract_class_highlighting | Suggestion |
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 |
Method has async overloadMethodHasAsyncOverload resharper_method_has_async_overload_highlighting | Suggestion |
Method has async overload with cancellation supportMethodHasAsyncOverloadWithCancellation resharper_method_has_async_overload_with_cancellation_highlighting | Suggestion |
Method supports cancellationMethodSupportsCancellation resharper_method_supports_cancellation_highlighting | Suggestion |
Missing XML comment for private or internal type or memberInternalOrPrivateMemberNotDocumented resharper_internal_or_private_member_not_documented_highlighting | Disabled |
Multiple nullable attributes usageMultipleNullableAttributesUsage resharper_multiple_nullable_attributes_usage_highlighting | Warning |
Nested string interpolation can be inlinedNestedStringInterpolation resharper_nested_string_interpolation_highlighting | Suggestion |
Nullability attribute usage with declaration of void or value typeAnnotationRedundancyAtValueType resharper_annotation_redundancy_at_value_type_highlighting | Warning |
Nullability attribute used with declaration that cannot be directly referenced from other codeNotObservableAnnotationRedundancy resharper_not_observable_annotation_redundancy_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 argumentPossibleMistakenArgument resharper_possible_mistaken_argument_highlighting | Warning |
Possible mistaken call to GetType()PossibleMistakenCallToGetType.1 resharper_possible_mistaken_call_to_get_type_1_highlighting | Warning |
Possible mistaken call to GetType()PossibleMistakenCallToGetType.2 resharper_possible_mistaken_call_to_get_type_2_highlighting | Warning |
Remove constructor invocationRemoveConstructorInvocation resharper_remove_constructor_invocation_highlighting | Disabled |
Remove redundant statementRemoveRedundantOrStatement.False resharper_remove_redundant_or_statement_false_highlighting | Suggestion |
Remove redundant statementRemoveRedundantOrStatement.True resharper_remove_redundant_or_statement_true_highlighting | Suggestion |
Remove ToList()RemoveToList.1 resharper_remove_to_list_1_highlighting | Suggestion |
Remove ToList()RemoveToList.2 resharper_remove_to_list_2_highlighting | Suggestion |
Replace with FirstOrDefault($args$)ReplaceWithFirstOrDefault.1 resharper_replace_with_first_or_default_1_highlighting | Suggestion |
Replace with FirstOrDefault($args$)ReplaceWithFirstOrDefault.2 resharper_replace_with_first_or_default_2_highlighting | Suggestion |
Replace with FirstOrDefault($args$)ReplaceWithFirstOrDefault.3 resharper_replace_with_first_or_default_3_highlighting | Suggestion |
Replace with FirstOrDefault($args$)ReplaceWithFirstOrDefault.4 resharper_replace_with_first_or_default_4_highlighting | Suggestion |
Replace with LastOrDefault($args$)ReplaceWithLastOrDefault.1 resharper_replace_with_last_or_default_1_highlighting | Suggestion |
Replace with LastOrDefault($args$)ReplaceWithLastOrDefault.2 resharper_replace_with_last_or_default_2_highlighting | Suggestion |
Replace with LastOrDefault($args$)ReplaceWithLastOrDefault.3 resharper_replace_with_last_or_default_3_highlighting | Suggestion |
Replace with LastOrDefault($args$)ReplaceWithLastOrDefault.4 resharper_replace_with_last_or_default_4_highlighting | Suggestion |
Replace with OfType<T>()ReplaceWithOfType.1 resharper_replace_with_of_type_1_highlighting | Suggestion |
Replace with OfType<T>()ReplaceWithOfType.2 resharper_replace_with_of_type_2_highlighting | Suggestion |
Replace with OfType<T>()ReplaceWithOfType.3 resharper_replace_with_of_type_3_highlighting | Suggestion |
Replace with OfType<T>().Any()ReplaceWithOfType.Any.1 resharper_replace_with_of_type_any_1_highlighting | Suggestion |
Replace with OfType<T>().Any() (replace with OfType<T>().Any(..))ReplaceWithOfType.Any.2 resharper_replace_with_of_type_any_2_highlighting | Suggestion |
Replace with OfType<T>().Count()ReplaceWithOfType.Count.1 resharper_replace_with_of_type_count_1_highlighting | Suggestion |
Replace with OfType<T>().Count() (replace with OfType<T>().Count(..))ReplaceWithOfType.Count.2 resharper_replace_with_of_type_count_2_highlighting | Suggestion |
Replace with OfType<T>().First()ReplaceWithOfType.First.1 resharper_replace_with_of_type_first_1_highlighting | Suggestion |
Replace with OfType<T>().First() (replace with OfType<T>().First(..))ReplaceWithOfType.First.2 resharper_replace_with_of_type_first_2_highlighting | Suggestion |
Replace with OfType<T>().FirstOrDefault()ReplaceWithOfType.FirstOrDefault.1 resharper_replace_with_of_type_first_or_default_1_highlighting | Suggestion |
Replace with OfType<T>().FirstOrDefault() (replace with OfType<T>().FirstOrDefault(..))ReplaceWithOfType.FirstOrDefault.2 resharper_replace_with_of_type_first_or_default_2_highlighting | Suggestion |
Replace with OfType<T>().Last()ReplaceWithOfType.Last.1 resharper_replace_with_of_type_last_1_highlighting | Suggestion |
Replace with OfType<T>().Last() (replace with OfType<T>().Last(..))ReplaceWithOfType.Last.2 resharper_replace_with_of_type_last_2_highlighting | Suggestion |
Replace with OfType<T>().LastOrDefault()ReplaceWithOfType.LastOrDefault.1 resharper_replace_with_of_type_last_or_default_1_highlighting | Suggestion |
Replace with OfType<T>().LastOrDefault() (replace with OfType<T>().LastOrDefault(..))ReplaceWithOfType.LastOrDefault.2 resharper_replace_with_of_type_last_or_default_2_highlighting | Suggestion |
Replace with OfType<T>().LongCount()ReplaceWithOfType.LongCount resharper_replace_with_of_type_long_count_highlighting | Suggestion |
Replace with OfType<T>().Single()ReplaceWithOfType.Single.1 resharper_replace_with_of_type_single_1_highlighting | Suggestion |
Replace with OfType<T>().Single() (replace with OfType<T>().Single(..))ReplaceWithOfType.Single.2 resharper_replace_with_of_type_single_2_highlighting | Suggestion |
Replace with OfType<T>().SingleOrDefault()ReplaceWithOfType.SingleOrDefault.1 resharper_replace_with_of_type_single_or_default_1_highlighting | Suggestion |
Replace with OfType<T>().SingleOrDefault() (replace with OfType<T>().SingleOrDefault(..))ReplaceWithOfType.SingleOrDefault.2 resharper_replace_with_of_type_single_or_default_2_highlighting | Suggestion |
Replace with OfType<T>().Where() (replace with OfType<T>().Where(..))ReplaceWithOfType.Where resharper_replace_with_of_type_where_highlighting | Suggestion |
Replace with simple assignmentReplaceWithSimpleAssignment.True resharper_replace_with_simple_assignment_true_highlighting | Suggestion |
Replace with simple assignmentReplaceWithSimpleAssignment.False resharper_replace_with_simple_assignment_false_highlighting | Suggestion |
Replace with single assignmentReplaceWithSingleAssignment.False resharper_replace_with_single_assignment_false_highlighting | Suggestion |
Replace with single assignmentReplaceWithSingleAssignment.True resharper_replace_with_single_assignment_true_highlighting | Suggestion |
Replace with single call to Any(..)ReplaceWithSingleCallToAny resharper_replace_with_single_call_to_any_highlighting | Suggestion |
Replace with single call to Count(..)ReplaceWithSingleCallToCount resharper_replace_with_single_call_to_count_highlighting | Suggestion |
Replace with single call to First(..)ReplaceWithSingleCallToFirst resharper_replace_with_single_call_to_first_highlighting | Suggestion |
Replace with single call to FirstOrDefault(..)ReplaceWithSingleCallToFirstOrDefault resharper_replace_with_single_call_to_first_or_default_highlighting | Suggestion |
Replace with single call to Last(..)ReplaceWithSingleCallToLast resharper_replace_with_single_call_to_last_highlighting | Suggestion |
Replace with single call to LastOrDefault(..)ReplaceWithSingleCallToLastOrDefault resharper_replace_with_single_call_to_last_or_default_highlighting | Suggestion |
Replace with single call to Single(..)ReplaceWithSingleCallToSingle resharper_replace_with_single_call_to_single_highlighting | Suggestion |
Replace with single call to SingleOrDefault(..)ReplaceWithSingleCallToSingleOrDefault resharper_replace_with_single_call_to_single_or_default_highlighting | Suggestion |
Replace with SingleOrDefault($args$)ReplaceWithSingleOrDefault.1 resharper_replace_with_single_or_default_1_highlighting | Suggestion |
Replace with SingleOrDefault($args$)ReplaceWithSingleOrDefault.2 resharper_replace_with_single_or_default_2_highlighting | Suggestion |
Replace with SingleOrDefault($args$)ReplaceWithSingleOrDefault.3 resharper_replace_with_single_or_default_3_highlighting | Suggestion |
Replace with SingleOrDefault($args$)ReplaceWithSingleOrDefault.4 resharper_replace_with_single_or_default_4_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 ternary expressionSimplifyConditionalTernaryExpression resharper_simplify_conditional_ternary_expression_highlighting | Suggestion |
Simplify LINQ expression (use 'All')SimplifyLinqExpressionUseAll resharper_simplify_linq_expression_use_all_highlighting | Suggestion |
Simplify LINQ expression (use 'Any')SimplifyLinqExpressionUseAny resharper_simplify_linq_expression_use_any_highlighting | Suggestion |
Simplify negative equality expressionNegativeEqualityExpression resharper_negative_equality_expression_highlighting | Suggestion |
Specify string comparison explicitlySpecifyStringComparison resharper_specify_string_comparison_highlighting | Hint |
Specify string culture explicitlySpecifyACultureInStringConversionExplicitly resharper_specify_a_culture_in_string_conversion_explicitly_highlighting | Warning |
String literal can be inlinedStringLiteralAsInterpolationArgument resharper_string_literal_as_interpolation_argument_highlighting | Suggestion |
String.Compare is culture-specific (string.Compare(string, int, string, int) is culture-specific)StringCompareIsCultureSpecific.4 resharper_string_compare_is_culture_specific_4_highlighting | Warning |
String.Compare is culture-specific (string.Compare(string, int, string, int, bool) is culture-specific)StringCompareIsCultureSpecific.5 resharper_string_compare_is_culture_specific_5_highlighting | Warning |
String.Compare is culture-specific (string.Compare(string, int, string, int, bool) is culture-specific)StringCompareIsCultureSpecific.6 resharper_string_compare_is_culture_specific_6_highlighting | Warning |
String.Compare is culture-specific (string.Compare(string, string) is culture-specific)StringCompareIsCultureSpecific.1 resharper_string_compare_is_culture_specific_1_highlighting | Warning |
String.Compare is culture-specific (string.Compare(string, string, bool) is culture-specific)StringCompareIsCultureSpecific.2 resharper_string_compare_is_culture_specific_2_highlighting | Warning |
String.Compare is culture-specific (string.Compare(string, string, bool) is culture-specific)StringCompareIsCultureSpecific.3 resharper_string_compare_is_culture_specific_3_highlighting | Warning |
String.CompareTo is culture-specificStringCompareToIsCultureSpecific resharper_string_compare_to_is_culture_specific_highlighting | Warning |
String.EndsWith is culture-specific (string.EndsWith(string) is culture-specific)StringEndsWithIsCultureSpecific resharper_string_ends_with_is_culture_specific_highlighting | Disabled |
String.IndexOf is culture-specific (string.IndexOf(string) is culture-specific)StringIndexOfIsCultureSpecific.1 resharper_string_index_of_is_culture_specific_1_highlighting | Warning |
String.IndexOf is culture-specific (string.IndexOf(string, int) is culture-specific)StringIndexOfIsCultureSpecific.2 resharper_string_index_of_is_culture_specific_2_highlighting | Warning |
String.IndexOf is culture-specific (string.IndexOf(string, int) is culture-specific)StringIndexOfIsCultureSpecific.3 resharper_string_index_of_is_culture_specific_3_highlighting | Warning |
String.LastIndexOf is culture-specific (string.LastIndexOf(string) is culture-specific)StringLastIndexOfIsCultureSpecific.1 resharper_string_last_index_of_is_culture_specific_1_highlighting | Warning |
String.LastIndexOf is culture-specific (string.LastIndexOf(string, int) is culture-specific)StringLastIndexOfIsCultureSpecific.2 resharper_string_last_index_of_is_culture_specific_2_highlighting | Warning |
String.LastIndexOf is culture-specific (string.LastIndexOf(string, int) is culture-specific)StringLastIndexOfIsCultureSpecific.3 resharper_string_last_index_of_is_culture_specific_3_highlighting | Warning |
String.StartsWith is culture-specific (string.StartsWith(string) is culture-specific)StringStartsWithIsCultureSpecific resharper_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 |
Type parameter could be declared as covariant or contravariantTypeParameterCanBeVariant resharper_type_parameter_can_be_variant_highlighting | Suggestion |
Unreachable code detectedUnreachableCode resharper_unreachable_code_highlighting | Warning |
Use array creation expressionUseArrayCreationExpression.1 resharper_use_array_creation_expression_1_highlighting | Suggestion |
Use array creation expressionUseArrayCreationExpression.2 resharper_use_array_creation_expression_2_highlighting | Suggestion |
Use cancellation tokenUseCancellationTokenForIAsyncEnumerable resharper_use_cancellation_token_for_i_async_enumerable_highlighting | Suggestion |
Use indexed propertyUseIndexedProperty resharper_use_indexed_property_highlighting | Suggestion |
Use 'is' operatorUseIsOperator.1 resharper_use_is_operator_1_highlighting | Suggestion |
Use 'is' operatorUseIsOperator.2 resharper_use_is_operator_2_highlighting | Suggestion |
Use method Any()UseMethodAny.0 resharper_use_method_any_0_highlighting | Suggestion |
Use method Any()UseMethodAny.1 resharper_use_method_any_1_highlighting | Suggestion |
Use method Any()UseMethodAny.2 resharper_use_method_any_2_highlighting | Suggestion |
Use method Any()UseMethodAny.3 resharper_use_method_any_3_highlighting | Suggestion |
Use method Any()UseMethodAny.4 resharper_use_method_any_4_highlighting | Suggestion |
Use method IsInstanceOfType(..)UseMethodIsInstanceOfType resharper_use_method_is_instance_of_type_highlighting | Suggestion |
Use 'String.IsNullOrEmpty'ReplaceWithStringIsNullOrEmpty resharper_replace_with_string_is_null_or_empty_highlighting | Suggestion |
Compiler Warnings (116 inspections)
Inspections in this category detect compiler warnings before you compile. Inspection ID EditorConfig property | Default severity |
---|---|
'#warning' directiveCSharpWarnings::CS1030 resharper_c_sharp_warnings_cs1030_highlighting | Warning |
A method marked [DoesNotReturn] should not return.CSharpWarnings::CS8763 resharper_c_sharp_warnings_cs8763_highlighting | Warning |
A possible null value may not be used for a type marked with [NotNull] or [DisallowNull].CSharpWarnings::CS8607 resharper_c_sharp_warnings_cs8607_highlighting | Warning |
A previous catch clause already catches all exceptionsCSharpWarnings::CS1058 resharper_c_sharp_warnings_cs1058_highlighting | Warning |
Access to a member through 'base' keyword from anonymous method, lambda expression, query expression or iterator results in unverifiable codeCSharpWarnings::CS1911 resharper_c_sharp_warnings_cs1911_highlighting | Warning |
Alignment value 'value' has a magnitude greater than 'magnitude limit' and may result in a large formatted string.CSharpWarnings::CS8094 resharper_c_sharp_warnings_cs8094_highlighting | Warning |
Ambiguous reference in XML commentCSharpWarnings::CS1574 resharper_c_sharp_warnings_cs1574_highlighting | Warning |
Argument cannot be used as an output for parameter due to differences in the nullability of reference types.CSharpWarnings::CS8624 resharper_c_sharp_warnings_cs8624_highlighting | Warning |
Argument cannot be used for corresponding parameter due to differences in the nullability of reference types.CSharpWarnings::CS8620 resharper_c_sharp_warnings_cs8620_highlighting | Warning |
Assignment in conditional expressionCSharpWarnings::CS0665 resharper_c_sharp_warnings_cs0665_highlighting | Warning |
Assignment made to same variableCSharpWarnings::CS1717 resharper_c_sharp_warnings_cs1717_highlighting | Warning |
Async function without await expressionCSharpWarnings::CS1998 resharper_c_sharp_warnings_cs1998_highlighting | Warning |
Async method invocation without await expressionCSharpWarnings::CS4014 resharper_c_sharp_warnings_cs4014_highlighting | Warning |
Async-iterator has one or more parameters of type 'CancellationToken' but none of them is annotated with the 'EnumeratorCancellation' attribute.CSharpWarnings::CS8425 resharper_c_sharp_warnings_cs8425_highlighting | Warning |
'attribute modifier' is not a recognized attribute location. All attributes in this block will be ignoredCSharpWarnings::CS0658 resharper_c_sharp_warnings_cs0658_highlighting | Warning |
'attribute modifier' is not a valid attribute location for this declaration. All attributes in this block will be ignoredCSharpWarnings::CS0657 resharper_c_sharp_warnings_cs0657_highlighting | Warning |
Badly formed XML in included comments fileCSharpWarnings::CS1592 resharper_c_sharp_warnings_cs1592_highlighting | Warning |
Call to a non-readonly member from a 'readonly' member results in an implicit copy of 'this'CSharpWarnings::CS8656 resharper_c_sharp_warnings_cs8656_highlighting | Warning |
Cannot convert null literal to non-nullable reference type.CSharpWarnings::CS8625 resharper_c_sharp_warnings_cs8625_highlighting | Warning |
Cannot resolve reference in XML commentCSharpWarnings::CS1574,CS1584,CS1581,CS1580 resharper_c_sharp_warnings_cs1574_cs1584_cs1581_cs1580_highlighting | Warning |
Class overrides Object.Equals(object o) but not Object.GetHashCode()CSharpWarnings::CS0659 resharper_c_sharp_warnings_cs0659_highlighting | Warning |
Code is unreachableCSharpWarnings::CS0162 resharper_c_sharp_warnings_cs0162_highlighting | Warning |
Converting null literal or possible null value to non-nullable type.CSharpWarnings::CS8600 resharper_c_sharp_warnings_cs8600_highlighting | Warning |
Declaring new protected member in sealed class is the same as declaring it as privateCSharpWarnings::CS0628 resharper_c_sharp_warnings_cs0628_highlighting | Warning |
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::CS1066 resharper_c_sharp_warnings_cs1066_highlighting | Warning |
Dereference of a possibly null reference.CSharpWarnings::CS8602 resharper_c_sharp_warnings_cs8602_highlighting | Warning |
Duplicate param tag in XML commentCSharpWarnings::CS1571 resharper_c_sharp_warnings_cs1571_highlighting | Warning |
Duplicate typeparam tag in XML commentCSharpWarnings::CS1710 resharper_c_sharp_warnings_cs1710_highlighting | Warning |
Empty switch blockCSharpWarnings::CS1522 resharper_c_sharp_warnings_cs1522_highlighting | Warning |
Field is never usedUnusedField.Compiler resharper_unused_field_compiler_highlighting | Warning |
Filter expression is a constant, consider removing the filterCSharpWarnings::CS7095 resharper_c_sharp_warnings_cs7095_highlighting | Warning |
Given expression is always of the provided typeCSharpWarnings::CS0183 resharper_c_sharp_warnings_cs0183_highlighting | Warning |
Given expression is never of the provided typeCSharpWarnings::CS0184 resharper_c_sharp_warnings_cs0184_highlighting | Warning |
'goto case' value is not implicitly convertible to required typeCSharpWarnings::CS0469 resharper_c_sharp_warnings_cs0469_highlighting | Warning |
Incorrect signature in XML commentCSharpWarnings::CS1580 resharper_c_sharp_warnings_cs1580_highlighting | Warning |
Introducing a 'Finalize' method can interfere with destructor invocationCSharpWarnings::CS0465 resharper_c_sharp_warnings_cs0465_highlighting | Warning |
Invalid XML in XML commentCSharpWarnings::CS1570 resharper_c_sharp_warnings_cs1570_highlighting | Warning |
Invalid XML include elementCSharpWarnings::CS1590 resharper_c_sharp_warnings_cs1590_highlighting | Warning |
Keyword 'new' is redundantCSharpWarnings::CS0109 resharper_c_sharp_warnings_cs0109_highlighting | Warning |
Keyword 'new' is requiredCSharpWarnings::CS0108,CS0114 resharper_c_sharp_warnings_cs0108_cs0114_highlighting | Warning |
Member cannot be used in this attribute.CSharpWarnings::CS8776 resharper_c_sharp_warnings_cs8776_highlighting | Warning |
Member must conditionally have a non-null value when exiting a function.CSharpWarnings::CS8775 resharper_c_sharp_warnings_cs8775_highlighting | Warning |
Member must have a non-null value when exiting.CSharpWarnings::CS8774 resharper_c_sharp_warnings_cs8774_highlighting | Warning |
Member overrides obsolete memberCSharpWarnings::CS0672 resharper_c_sharp_warnings_cs0672_highlighting | Warning |
Method lacks '[DoesNotReturn]' annotation in order to match implemented or overridden member.CSharpWarnings::CS8770 resharper_c_sharp_warnings_cs8770_highlighting | Warning |
Missing XML comment for publicly visible type or memberCSharpWarnings::CS1591 resharper_c_sharp_warnings_cs1591_highlighting | Warning |
Multiple override candidates at run-timeCSharpWarnings::CS1957 resharper_c_sharp_warnings_cs1957_highlighting | Warning |
Namespace should be default namespace of this projectCSharpWarnings::WME006 resharper_c_sharp_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 |
Non-nullable member is uninitialized.CSharpWarnings::CS8618 resharper_c_sharp_warnings_cs8618_highlighting | Warning |
Nullability mismatch in constraints for type parameter.CSharpWarnings::CS8633 resharper_c_sharp_warnings_cs8633_highlighting | Warning |
Nullability of reference types in explicit interface specifier doesn't match interface implemented by the type.CSharpWarnings::CS8643 resharper_c_sharp_warnings_cs8643_highlighting | Warning |
Nullability of reference types in interface implemented by the base type doesn't match.CSharpWarnings::CS8644 resharper_c_sharp_warnings_cs8644_highlighting | Warning |
Nullability of reference types in return type doesn't match implemented member.CSharpWarnings::CS8616 resharper_c_sharp_warnings_cs8616_highlighting | Warning |
Nullability of reference types in return type doesn't match implicitly implemented member.CSharpWarnings::CS8613 resharper_c_sharp_warnings_cs8613_highlighting | Warning |
Nullability of reference types in return type doesn't match overridden member.CSharpWarnings::CS8609 resharper_c_sharp_warnings_cs8609_highlighting | Warning |
Nullability of reference types in return type doesn't match the target delegate.CSharpWarnings::CS8621 resharper_c_sharp_warnings_cs8621_highlighting | Warning |
Nullability of reference types in source type doesn't match target type.CSharpWarnings::CS8619 resharper_c_sharp_warnings_cs8619_highlighting | Warning |
Nullability of reference types in type doesn't match implemented member.CSharpWarnings::CS8615 resharper_c_sharp_warnings_cs8615_highlighting | Warning |
Nullability of reference types in type doesn't match implicitly implemented member.CSharpWarnings::CS8612 resharper_c_sharp_warnings_cs8612_highlighting | Warning |
Nullability of reference types in type doesn't match overridden member.CSharpWarnings::CS8608 resharper_c_sharp_warnings_cs8608_highlighting | Warning |
Nullability of reference types in type of a parameter doesn't match the target delegate.CSharpWarnings::CS8622 resharper_c_sharp_warnings_cs8622_highlighting | Warning |
Nullability of reference types in type of parameter doesn't match implemented member.CSharpWarnings::CS8617 resharper_c_sharp_warnings_cs8617_highlighting | Warning |
Nullability of reference types in type of parameter doesn't match implicitly implemented member.CSharpWarnings::CS8614 resharper_c_sharp_warnings_cs8614_highlighting | Warning |
Nullability of reference types in type of parameter doesn't match overridden member.CSharpWarnings::CS8610 resharper_c_sharp_warnings_cs8610_highlighting | Warning |
Nullability of reference types in type of parameter doesn't match partial method declaration.CSharpWarnings::CS8611 resharper_c_sharp_warnings_cs8611_highlighting | Warning |
Nullability of return type doesn't match implemented member (possibly because of nullability attributes).CSharpWarnings::CS8768 resharper_c_sharp_warnings_cs8768_highlighting | Warning |
Nullability of return type doesn't match implicitly implemented member (possibly because of nullability attributes).CSharpWarnings::CS8766 resharper_c_sharp_warnings_cs8766_highlighting | Warning |
Nullability of return type doesn't match overridden member (possibly because of nullability attributes).CSharpWarnings::CS8764 resharper_c_sharp_warnings_cs8764_highlighting | Warning |
Nullability of type argument doesn't match 'class' constraint.CSharpWarnings::CS8634 resharper_c_sharp_warnings_cs8634_highlighting | Warning |
Nullability of type argument doesn't match constraint type.CSharpWarnings::CS8631 resharper_c_sharp_warnings_cs8631_highlighting | Warning |
Nullability of type argument doesn't match 'notnull' constraint.CSharpWarnings::CS8714 resharper_c_sharp_warnings_cs8714_highlighting | Warning |
Nullability of type of parameter doesn't match implemented member (possibly because of nullability attributes).CSharpWarnings::CS8769 resharper_c_sharp_warnings_cs8769_highlighting | Warning |
Nullability of type of parameter doesn't match implicitly implemented member (possibly because of nullability attributes).CSharpWarnings::CS8767 resharper_c_sharp_warnings_cs8767_highlighting | Warning |
Nullability of type of parameter doesn't match overridden member (possibly because of nullability attributes).CSharpWarnings::CS8765 resharper_c_sharp_warnings_cs8765_highlighting | Warning |
Nullable value type may be null.CSharpWarnings::CS8629 resharper_c_sharp_warnings_cs8629_highlighting | Warning |
Object or collection initializer implicitly dereferences possibly null member.CSharpWarnings::CS8670 resharper_c_sharp_warnings_cs8670_highlighting | Warning |
Operator '==' or operator '!=' with 'Object.Equals(object o)' and 'Object.GetHashCode()' not overriddenCSharpWarnings::CS0660,CS0661 resharper_c_sharp_warnings_cs0660_cs0661_highlighting | Warning |
Parameter has no matching param tag in the XML commentCSharpWarnings::CS1573 resharper_c_sharp_warnings_cs1573_highlighting | Warning |
Parameter must conditionally have a non-null value when exiting a function.CSharpWarnings::CS8762 resharper_c_sharp_warnings_cs8762_highlighting | Warning |
Parameter must have a non-null value when exiting.CSharpWarnings::CS8777 resharper_c_sharp_warnings_cs8777_highlighting | Warning |
Partial method declarations have inconsistent nullability for type parameter.CSharpWarnings::CS8667 resharper_c_sharp_warnings_cs8667_highlighting | Warning |
Possible mistaken empty statementCSharpWarnings::CS0642 resharper_c_sharp_warnings_cs0642_highlighting | Warning |
Possible null reference argument for a parameter.CSharpWarnings::CS8604 resharper_c_sharp_warnings_cs8604_highlighting | Warning |
Possible null reference assignment.CSharpWarnings::CS8601 resharper_c_sharp_warnings_cs8601_highlighting | Warning |
Possible null reference return.CSharpWarnings::CS8603 resharper_c_sharp_warnings_cs8603_highlighting | Warning |
Possible unintended reference comparisonCSharpWarnings::CS0252,CS0253 resharper_c_sharp_warnings_cs0252_cs0253_highlighting | Warning |
Reference to a volatile field will not be treated as volatileCSharpWarnings::CS0420 resharper_c_sharp_warnings_cs0420_highlighting | Warning |
Syntax error in XML commentCSharpWarnings::CS1584 resharper_c_sharp_warnings_cs1584_highlighting | Warning |
Taking address of marshal-by-reference class fieldCSharpWarnings::CS0197 resharper_c_sharp_warnings_cs0197_highlighting | Warning |
The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.CSharpWarnings::CS8632 resharper_c_sharp_warnings_cs8632_highlighting | Warning |
The 'EnumeratorCancellation' attribute is only effective on a parameter of type 'CancellationToken' in an async-iterator method returning 'IAsyncEnumerable<>'.CSharpWarnings::CS8424 resharper_c_sharp_warnings_cs8424_highlighting | Warning |
The given expression always matches the provided constant.CSharpWarnings::CS8417 resharper_c_sharp_warnings_cs8417_highlighting | Warning |
The given expression never matches the provided pattern.CSharpWarnings::CS8416 resharper_c_sharp_warnings_cs8416_highlighting | Warning |
The 'l' suffix is easily confused with the digit '1'CSharpWarnings::CS0078 resharper_c_sharp_warnings_cs0078_highlighting | Warning |
The switch expression does not handle all possible inputs (it is not exhaustive).CSharpWarnings::CS8509 resharper_c_sharp_warnings_cs8509_highlighting | Warning |
The switch expression does not handle some null inputs (it is not exhaustive).CSharpWarnings::CS8655 resharper_c_sharp_warnings_cs8655_highlighting | Warning |
The tuple element name is ignored because a different name or no name is specified by the target type.CSharpWarnings::CS8123 resharper_c_sharp_warnings_cs8123_highlighting | Warning |
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::CS8383 resharper_c_sharp_warnings_cs8383_highlighting | Warning |
Thrown value may be null.CSharpWarnings::CS8597 resharper_c_sharp_warnings_cs8597_highlighting | Warning |
Type is already listed in the interface list with different nullability of reference types.CSharpWarnings::CS8645 resharper_c_sharp_warnings_cs8645_highlighting | Warning |
Type parameter has no matching typeparam tag in the XML commentCSharpWarnings::CS1712 resharper_c_sharp_warnings_cs1712_highlighting | Warning |
Type parameter has the same name as a type parameter from the outer typeCSharpWarnings::CS0693 resharper_c_sharp_warnings_cs0693_highlighting | Warning |
Unable to include XML fragmentCSharpWarnings::CS1589 resharper_c_sharp_warnings_cs1589_highlighting | Warning |
Unassigned fieldUnassignedField.Compiler resharper_unassigned_field_compiler_highlighting | Warning |
Unassigned readonly fieldUnassignedReadonlyField.Compiler resharper_unassigned_readonly_field_compiler_highlighting | Warning |
Unboxing a possibly null value.CSharpWarnings::CS8605 resharper_c_sharp_warnings_cs8605_highlighting | Warning |
Unused local variableUnusedVariable.Compiler resharper_unused_variable_compiler_highlighting | Warning |
Use of obsolete symbolCSharpWarnings::CS0618 resharper_c_sharp_warnings_cs0618_highlighting | Warning |
Use of obsolete symbol (without message)CSharpWarnings::CS0612 resharper_c_sharp_warnings_cs0612_highlighting | Warning |
Using 'is' to test compatibility with 'dynamic' is essentially identical to testing compatibility with 'Object' and will succeed for all non-null valuesCSharpWarnings::CS1981 resharper_c_sharp_warnings_cs1981_highlighting | Warning |
XML comment has a 'param' tag for 'Parameter', but there is no parameter by that nameCSharpWarnings::CS1572 resharper_c_sharp_warnings_cs1572_highlighting | Warning |
XML comment has a 'typeparam' tag for 'TypeParameter', but there is no type parameter by that nameCSharpWarnings::CS1711 resharper_c_sharp_warnings_cs1711_highlighting | Warning |
XML comment has cref attribute that refers to a type parameterCSharpWarnings::CS1723 resharper_c_sharp_warnings_cs1723_highlighting | Warning |
XML comment is not placed on a valid language elementCSharpWarnings::CS1587 resharper_c_sharp_warnings_cs1587_highlighting | Warning |
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. Inspection ID EditorConfig property | Default severity |
---|---|
Base type is requiredRequiredBaseTypesIsNotInherited resharper_required_base_types_is_not_inherited_highlighting | Warning |
BaseTypeRequired attribute supports only classes and interfacesUnsupportedRequiredBaseType resharper_unsupported_required_base_type_highlighting | Warning |
Compare with '==' types marked by 'CannotApplyEqualityOperatorAttribute'CannotApplyEqualityOperatorToType resharper_cannot_apply_equality_operator_to_type_highlighting | Warning |
Inconsistent NamingInconsistentNaming resharper_inconsistent_naming_highlighting | Warning |
Namespace does not correspond to file locationCheckNamespace resharper_check_namespace_highlighting | Warning |
Non-nullable member is not initialized at constructor exitNotNullMemberIsNotInitialized resharper_not_null_member_is_not_initialized_highlighting | Warning |
Possible 'null' assignment to non-nullable entityAssignNullToNotNullAttribute resharper_assign_null_to_not_null_attribute_highlighting | Warning |
Problem in contract annotation definitionContractAnnotationNotParsed resharper_contract_annotation_not_parsed_highlighting | Warning |
Required base type conflicting another typeRequiredBaseTypesConflict resharper_required_base_types_conflict_highlighting | Warning |
Type specified in '[BaseTypeRequired]' attribute conflicts another typeRequiredBaseTypesDirectConflict resharper_required_base_types_direct_conflict_highlighting | Warning |
Formatting (41 inspections)
Inspections in this category detect code code formatting problems. Inspection ID EditorConfig property | Default severity |
---|---|
Incorrect blank lines (blank lines are missing elsewhere)MissingBlankLines resharper_missing_blank_lines_highlighting | Disabled |
Incorrect blank lines (blank lines are redundant elsewhere)RedundantBlankLines resharper_redundant_blank_lines_highlighting | Disabled |
Incorrect blank lines (incorrect number of blank lines near braces)IncorrectBlankLinesNearBraces resharper_incorrect_blank_lines_near_braces_highlighting | Disabled |
Incorrect indent (around child statement)BadChildStatementIndent resharper_bad_child_statement_indent_highlighting | Warning |
Incorrect indent (around declaration braces)BadDeclarationBracesIndent resharper_bad_declaration_braces_indent_highlighting | Disabled |
Incorrect indent (around expression braces)BadExpressionBracesIndent resharper_bad_expression_braces_indent_highlighting | Disabled |
Incorrect indent (around namespace braces)BadNamespaceBracesIndent resharper_bad_namespace_braces_indent_highlighting | Disabled |
Incorrect indent (around preprocessor directive)BadPreprocessorIndent resharper_bad_preprocessor_indent_highlighting | Disabled |
Incorrect indent (around statement braces)BadControlBracesIndent resharper_bad_control_braces_indent_highlighting | Suggestion |
Incorrect indent (around switch statement)BadSwitchBracesIndent resharper_bad_switch_braces_indent_highlighting | Disabled |
Incorrect indent (incorrect indent size)WrongIndentSize resharper_wrong_indent_size_highlighting | Disabled |
Incorrect indent (line indent should be restored to the previous level elsewhere)OutdentIsOffPrevLevel resharper_outdent_is_off_prev_level_highlighting | Disabled |
Incorrect indent (line indent should not be changed relative to the previous line elsewhere)BadIndent resharper_bad_indent_highlighting | Disabled |
Incorrect indent (line should be indented or outdented elsewhere)MissingIndent resharper_missing_indent_highlighting | Disabled |
Incorrect indent (tabs/spaces mismatch)TabsAndSpacesMismatch resharper_tabs_and_spaces_mismatch_highlighting | Disabled |
Incorrect line breaks (around comma in lists)BadListLineBreaks resharper_bad_list_line_breaks_highlighting | Disabled |
Incorrect line breaks (around declaration braces)BadDeclarationBracesLineBreaks resharper_bad_declaration_braces_line_breaks_highlighting | Disabled |
Incorrect line breaks (around empty braces)BadEmptyBracesLineBreaks resharper_bad_empty_braces_line_breaks_highlighting | Disabled |
Incorrect line breaks (around expression braces)BadExpressionBracesLineBreaks resharper_bad_expression_braces_line_breaks_highlighting | Disabled |
Incorrect line breaks (around LINQ queries)BadLinqLineBreaks resharper_bad_linq_line_breaks_highlighting | Disabled |
Incorrect line breaks (around parenthesis)BadParensLineBreaks resharper_bad_parens_line_breaks_highlighting | Disabled |
Incorrect line breaks (around statement braces)BadControlBracesLineBreaks resharper_bad_control_braces_line_breaks_highlighting | Disabled |
Incorrect line breaks (line break is missing elsewhere)MissingLinebreak resharper_missing_linebreak_highlighting | Disabled |
Incorrect line breaks (line break is redundant elsewhere)RedundantLinebreak resharper_redundant_linebreak_highlighting | Disabled |
Incorrect line breaks (multiple statements on one line)MultipleStatementsOnOneLine resharper_multiple_statements_on_one_line_highlighting | Disabled |
Incorrect line breaks (multiple type members on one line)MultipleTypeMembersOnOneLine resharper_multiple_type_members_on_one_line_highlighting | Disabled |
Incorrect spacing (around attributes)BadAttributeBracketsSpaces resharper_bad_attribute_brackets_spaces_highlighting | Disabled |
Incorrect spacing (around braces)BadBracesSpaces resharper_bad_braces_spaces_highlighting | Disabled |
Incorrect spacing (around colon)BadColonSpaces resharper_bad_colon_spaces_highlighting | Disabled |
Incorrect spacing (around comma)BadCommaSpaces resharper_bad_comma_spaces_highlighting | Disabled |
Incorrect spacing (around generic brackets)BadGenericBracketsSpaces resharper_bad_generic_brackets_spaces_highlighting | Disabled |
Incorrect spacing (around member access symbols)BadMemberAccessSpaces resharper_bad_member_access_spaces_highlighting | Disabled |
Incorrect spacing (around operator symbols)BadSymbolSpaces resharper_bad_symbol_spaces_highlighting | Disabled |
Incorrect spacing (around parenthesis)BadParensSpaces resharper_bad_parens_spaces_highlighting | Disabled |
Incorrect spacing (around semicolon)BadSemicolonSpaces resharper_bad_semicolon_spaces_highlighting | Disabled |
Incorrect spacing (around square brackets within a statement)BadSquareBracketsSpaces resharper_bad_square_brackets_spaces_highlighting | Disabled |
Incorrect spacing (between keyword and parenthesis)BadSpacesAfterKeyword resharper_bad_spaces_after_keyword_highlighting | Disabled |
Incorrect spacing (multiple spaces are prohibited)MultipleSpaces resharper_multiple_spaces_highlighting | Disabled |
Incorrect spacing (space is missing elsewhere)MissingSpace resharper_missing_space_highlighting | Disabled |
Incorrect spacing (space is redundant elsewhere)RedundantSpace resharper_redundant_space_highlighting | Disabled |
Incorrect spacing (tabs are prohibited here)TabsOutsideIndent resharper_tabs_outside_indent_highlighting | Disabled |
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. Inspection ID EditorConfig property | Default severity |
---|---|
Class cannot be instantiatedClassCannotBeInstantiated resharper_class_cannot_be_instantiated_highlighting | Warning |
Convert 'as' expression type check and the following null check into negated pattern matchingUseNegatedPatternMatching resharper_use_negated_pattern_matching_highlighting | Hint |
Convert 'as' expression type check and the following null check into pattern matchingUsePatternMatching resharper_use_pattern_matching_highlighting | Suggestion |
Convert delegate variable to local functionConvertToLocalFunction resharper_convert_to_local_function_highlighting | Suggestion |
Convert 'if' statement to 'switch' expressionConvertIfStatementToSwitchExpression resharper_convert_if_statement_to_switch_expression_highlighting | Hint |
Convert 'if' statement to 'switch' statementConvertIfStatementToSwitchStatement resharper_convert_if_statement_to_switch_statement_highlighting | Hint |
Convert lambda expression to method groupConvertClosureToMethodGroup resharper_convert_closure_to_method_group_highlighting | Suggestion |
Convert 'Nullable<T>' to 'T?'ConvertNullableToShortForm resharper_convert_nullable_to_short_form_highlighting | Suggestion |
Convert property to auto-propertyConvertToAutoProperty resharper_convert_to_auto_property_highlighting | Suggestion |
Convert property to auto-property (when possible)ConvertToAutoPropertyWhenPossible resharper_convert_to_auto_property_when_possible_highlighting | Hint |
Convert property to auto-property with private setterConvertToAutoPropertyWithPrivateSetter resharper_convert_to_auto_property_with_private_setter_highlighting | Hint |
Convert static method invocation to extension method callInvokeAsExtensionMethod resharper_invoke_as_extension_method_highlighting | Suggestion |
Convert to 'await using' statement or declarationUseAwaitUsing resharper_use_await_using_highlighting | Suggestion |
Convert to lambda expressionConvertToLambdaExpression resharper_convert_to_lambda_expression_highlighting | Suggestion |
Convert to lambda expression (when possible)ConvertToLambdaExpressionWhenPossible resharper_convert_to_lambda_expression_when_possible_highlighting | Disabled |
Convert to static classConvertToStaticClass resharper_convert_to_static_class_highlighting | Suggestion |
Convert to 'using' declarationConvertToUsingDeclaration resharper_convert_to_using_declaration_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 |
For-loop can be converted into foreach-loopForCanBeConvertedToForeach resharper_for_can_be_converted_to_foreach_highlighting | Suggestion |
'if' statement can be re-written as '?:' expressionConvertIfStatementToConditionalTernaryExpression resharper_convert_if_statement_to_conditional_ternary_expression_highlighting | Suggestion |
'if' statement can be re-written as '??' expressionConvertIfStatementToNullCoalescingExpression resharper_convert_if_statement_to_null_coalescing_expression_highlighting | Suggestion |
'if' statement can be re-written as '??=' assignmentConvertIfStatementToNullCoalescingAssignment resharper_convert_if_statement_to_null_coalescing_assignment_highlighting | Suggestion |
'if-return' statement can be re-written as 'return' statementConvertIfStatementToReturnStatement resharper_convert_if_statement_to_return_statement_highlighting | Hint |
Inline 'out' variable declarationInlineOutVariableDeclaration resharper_inline_out_variable_declaration_highlighting | Suggestion |
Introduce optional parameters (non-private accessibility)IntroduceOptionalParameters.Global resharper_introduce_optional_parameters_global_highlighting | Suggestion |
Introduce optional parameters (private accessibility)IntroduceOptionalParameters.Local resharper_introduce_optional_parameters_local_highlighting | Suggestion |
Invert 'if' statement to reduce nestingInvertIf resharper_invert_if_highlighting | Hint |
Join null check with assignmentJoinNullCheckWithUsage resharper_join_null_check_with_usage_highlighting | Suggestion |
Join null check with assignment (when possible)JoinNullCheckWithUsageWhenPossible resharper_join_null_check_with_usage_when_possible_highlighting | Disabled |
Loop can be converted into LINQ-expressionLoopCanBeConvertedToQuery resharper_loop_can_be_converted_to_query_highlighting | Hint |
Merge conditional ?: expression into conditional accessMergeConditionalExpression resharper_merge_conditional_expression_highlighting | Suggestion |
Merge conditional ?: expression into conditional access (when possible)MergeConditionalExpressionWhenPossible resharper_merge_conditional_expression_when_possible_highlighting | Disabled |
Merge sequential checks in && or || expressionsMergeSequentialChecks resharper_merge_sequential_checks_highlighting | Suggestion |
Merge sequential checks in && or || expressions (when possible)MergeSequentialChecksWhenPossible resharper_merge_sequential_checks_when_possible_highlighting | Disabled |
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 |
Replace if statement with null-propagating codeUseNullPropagation resharper_use_null_propagation_highlighting | Suggestion |
Replace if statement with null-propagating code (when possible)UseNullPropagationWhenPossible resharper_use_null_propagation_when_possible_highlighting | Disabled |
Use compound assignmentConvertToCompoundAssignment resharper_convert_to_compound_assignment_highlighting | Hint |
Use compound assignmentConvertToNullCoalescingCompoundAssignment resharper_convert_to_null_coalescing_compound_assignment_highlighting | Suggestion |
Use deconstructionUseDeconstruction resharper_use_deconstruction_highlighting | Hint |
Use deconstruction (on parameter declaration)UseDeconstructionOnParameter resharper_use_deconstruction_on_parameter_highlighting | Hint |
Use index from end expressionUseIndexFromEndExpression resharper_use_index_from_end_expression_highlighting | Suggestion |
Use 'nameof' expression to reference nameUseNameofExpression resharper_use_nameof_expression_highlighting | Suggestion |
Use 'nameof' expression to reference type's nameUseNameOfInsteadOfTypeOf resharper_use_name_of_instead_of_type_of_highlighting | Suggestion |
Use object or collection initializer when possibleUseObjectOrCollectionInitializer resharper_use_object_or_collection_initializer_highlighting | Suggestion |
Use string interpolation expressionUseStringInterpolation resharper_use_string_interpolation_highlighting | Suggestion |
Use switch expressionConvertSwitchStatementToSwitchExpression resharper_convert_switch_statement_to_switch_expression_highlighting | Hint |
Use switch expressionConvertConditionalTernaryExpressionToSwitchExpression resharper_convert_conditional_ternary_expression_to_switch_expression_highlighting | Hint |
NUnit (27 inspections)
These inspections detect code issues related to NUnit tests. Inspection ID EditorConfig property | Default severity |
---|---|
NUnit. Async test method must return Task or Task<T>NUnit.AsyncMethodMustBeTask resharper_n_unit_async_method_must_be_task_highlighting | Warning |
NUnit. Cannot resolve symbol in TestCaseSource or ValueSource attributeNUnit.TestCaseSourceCannotBeResolved resharper_n_unit_test_case_source_cannot_be_resolved_highlighting | Warning |
NUnit. Duplicate valuesNUnit.DuplicateValues resharper_n_unit_duplicate_values_highlighting | Warning |
NUnit. Ignored parameter attributeNUnit.IgnoredParameterAttribute resharper_n_unit_ignored_parameter_attribute_highlighting | Warning |
NUnit. Implicitly unspecified null valuesNUnit.ImplicitUnspecifiedNullValues resharper_n_unit_implicit_unspecified_null_values_highlighting | Warning |
NUnit. Incompatible argument type or incorrect argument valueNUnit.IncorrectArgumentType resharper_n_unit_incorrect_argument_type_highlighting | Warning |
NUnit. Incompatible expected result type or incorrect valueNUnit.IncorrectExpectedResultType resharper_n_unit_incorrect_expected_result_type_highlighting | Warning |
NUnit. Incorrect range bounds. 'to' must be greater than or equal to 'from'NUnit.IncorrectRangeBounds resharper_n_unit_incorrect_range_bounds_highlighting | Warning |
NUnit. Mismatch of the range step signNUnit.RangeStepSignMismatch resharper_n_unit_range_step_sign_mismatch_highlighting | Warning |
NUnit. Missing arguments in TestCase attributeNUnit.MissingArgumentsInTestCaseAttribute resharper_n_unit_missing_arguments_in_test_case_attribute_highlighting | Warning |
NUnit. Missing expected result for non-void test methodNUnit.TestCaseAttributeRequiresExpectedResult resharper_n_unit_test_case_attribute_requires_expected_result_highlighting | Warning |
NUnit. No values provided in the attributesNUnit.NoValuesProvided resharper_n_unit_no_values_provided_highlighting | Warning |
NUnit. Non-public test methodNUnit.NonPublicMethodWithTestAttribute resharper_n_unit_non_public_method_with_test_attribute_highlighting | Warning |
NUnit. Range 'step' parameter value must be non-zeroNUnit.RangeStepValueMustNotBeZero resharper_n_unit_range_step_value_must_not_be_zero_highlighting | Warning |
NUnit. Redundant argument in TestCase attributeNUnit.RedundantArgumentInTestCaseAttribute resharper_n_unit_redundant_argument_in_test_case_attribute_highlighting | Warning |
NUnit. Redundant argument instead of ExpectedResultNUnit.RedundantArgumentInsteadOfExpectedResult resharper_n_unit_redundant_argument_instead_of_expected_result_highlighting | Warning |
NUnit. Redundant expected result for void test methodNUnit.RedundantExpectedResultInTestCaseAttribute resharper_n_unit_redundant_expected_result_in_test_case_attribute_highlighting | Warning |
NUnit. Specified attribute values produce too many testsNUnit.AttributeProducesTooManyTests resharper_n_unit_attribute_produces_too_many_tests_highlighting | Disabled |
NUnit. Specified values are not compatible with the test parameter typeNUnit.ParameterTypeIsNotCompatibleWithAttribute resharper_n_unit_parameter_type_is_not_compatible_with_attribute_highlighting | Warning |
NUnit. Test case Result property duplicates ExpectedResultNUnit.TestCaseResultPropertyDuplicatesExpectedResult resharper_n_unit_test_case_result_property_duplicates_expected_result_highlighting | Warning |
NUnit. Test case Result property is obsoleteNUnit.TestCaseResultPropertyIsObsolete resharper_n_unit_test_case_result_property_is_obsolete_highlighting | Warning |
NUnit. Test case source must be field, property, or methodNUnit.TestCaseSourceMustBeFieldPropertyMethod resharper_n_unit_test_case_source_must_be_field_property_method_highlighting | Warning |
NUnit. Test case source must be non-abstract and implement IEnumerableNUnit.TestCaseSourceShouldImplementIEnumerable resharper_n_unit_test_case_source_should_implement_i_enumerable_highlighting | Warning |
NUnit. Test case source must be staticNUnit.TestCaseSourceMustBeStatic resharper_n_unit_test_case_source_must_be_static_highlighting | Warning |
NUnit. The maximum range value is not reachable with the step valueNUnit.RangeToValueIsNotReachable resharper_n_unit_range_to_value_is_not_reachable_highlighting | Warning |
NUnit. Values for test method parameters are not providedNUnit.MethodWithParametersAndTestAttribute resharper_n_unit_method_with_parameters_and_test_attribute_highlighting | Warning |
NUnit. Values in range do not fit the type of the test parameterNUnit.RangeAttributeBoundsAreOutOfRange resharper_n_unit_range_attribute_bounds_are_out_of_range_highlighting | Warning |
Potential Code Quality Issues (152 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 |
According to values of the bit masks, expression result will always be the same.NonConstantEqualityExpressionHasConstantResult resharper_non_constant_equality_expression_has_constant_result_highlighting | Warning |
Actual shift count equals zero.ShiftExpressionRealShiftCountIsZero resharper_shift_expression_real_shift_count_is_zero_highlighting | Warning |
Ambiguous symbols in text argumentMultipleResolveCandidatesInText resharper_multiple_resolve_candidates_in_text_highlighting | Warning |
Annotation conflict in hierarchyAnnotationConflictInHierarchy resharper_annotation_conflict_in_hierarchy_highlighting | Warning |
Assignment in conditional expressionAssignmentInConditionalExpression resharper_assignment_in_conditional_expression_highlighting | Warning |
Async iterator invocation without 'await foreach'AsyncIteratorInvocationWithoutAwaitForeach resharper_async_iterator_invocation_without_await_foreach_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 |
Bitwise operation on enum which is not marked by [Flags] attributeBitwiseOperatorOnEnumWithoutFlags resharper_bitwise_operator_on_enum_without_flags_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 access static symbol in text argumentStaticProblemInText resharper_static_problem_in_text_highlighting | Warning |
Cannot access symbol in text argumentAccessRightsInText resharper_access_rights_in_text_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 |
Captured field reference of a marshal-by-reference class may cause a runtime exceptionAddressOfMarshalByRefObject resharper_address_of_marshal_by_ref_object_highlighting | Warning |
Captured reference to 'volatile' field will not be treated as 'volatile'ByRefArgumentIsVolatileField resharper_by_ref_argument_is_volatile_field_highlighting | Warning |
Char is possibly unintentionally used as integerConfusingCharAsIntegerInConstructor resharper_confusing_char_as_integer_in_constructor_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 |
Constant shift expression with non-zero operands results in zero value.ShiftExpressionResultEqualsZero resharper_shift_expression_result_equals_zero_highlighting | Warning |
Co-variant array conversionCoVariantArrayConversion resharper_co_variant_array_conversion_highlighting | Warning |
Delegate subtractionsDelegateSubtraction resharper_delegate_subtraction_highlighting | Warning |
Division by zero in at least one execution path.IntDivisionByZero resharper_int_division_by_zero_highlighting | Warning |
Element is localizableLocalizableElement resharper_localizable_element_highlighting | Warning |
Empty general catch clauseEmptyGeneralCatchClause resharper_empty_general_catch_clause_highlighting | Warning |
'Enumerable.Sum' invocation in explicit unchecked contextEnumerableSumInExplicitUncheckedContext resharper_enumerable_sum_in_explicit_unchecked_context_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 |
Event unsubscription via anonymous delegateEventUnsubscriptionViaAnonymousDelegate resharper_event_unsubscription_via_anonymous_delegate_highlighting | Warning |
Exception rethrow possibly intendedPossibleIntendedRethrow resharper_possible_intended_rethrow_highlighting | Warning |
Explicit argument passed to parameter with caller info attributeExplicitCallerInfoArgument resharper_explicit_caller_info_argument_highlighting | Warning |
Formatting is specified, but interpolated string expression is not IFormattableInterpolatedStringExpressionIsNotIFormattable resharper_interpolated_string_expression_is_not_i_formattable_highlighting | Warning |
Function body is too complex to analyzeFunctionComplexityOverflow resharper_function_complexity_overflow_highlighting | Disabled |
Function is recursive on all execution pathsFunctionRecursiveOnAllPaths resharper_function_recursive_on_all_paths_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 |
Heuristically unreachable case due to integer analysis.UnreachableSwitchCaseDueToIntegerAnalysis resharper_unreachable_switch_case_due_to_integer_analysis_highlighting | Warning |
Heuristically unreachable switch arm due to integer analysis.UnreachableSwitchArmDueToIntegerAnalysis resharper_unreachable_switch_arm_due_to_integer_analysis_highlighting | Warning |
Inconsistent arguments passed to 'Math.Clamp()' method.MathClampMinGreaterThanMax resharper_math_clamp_min_greater_than_max_highlighting | Warning |
Inconsistent synchronization on fieldInconsistentlySynchronizedField resharper_inconsistently_synchronized_field_highlighting | Warning |
Instance of IEnumerator is never disposedGenericEnumeratorNotDisposed resharper_generic_enumerator_not_disposed_highlighting | Warning |
Interfaces marked as ServiceContract should declare at least one OperationContractServiceContractWithoutOperations resharper_service_contract_without_operations_highlighting | Warning |
Invalid XML documentation commentInvalidXmlDocComment resharper_invalid_xml_doc_comment_highlighting | Warning |
Invocation of polymorphic field-like eventPolymorphicFieldLikeEventInvocation resharper_polymorphic_field_like_event_invocation_highlighting | Warning |
IQueryable is possibly unintentionally used as IEnumerablePossibleUnintendedQueryableAsEnumerable resharper_possible_unintended_queryable_as_enumerable_highlighting | Suggestion |
Iterator never returnsIteratorNeverReturns resharper_iterator_never_returns_highlighting | Warning |
Local function hides methodLocalFunctionHidesMethod resharper_local_function_hides_method_highlighting | Warning |
Local variable hides memberLocalVariableHidesMember resharper_local_variable_hides_member_highlighting | Warning |
Loop control variable is never changed inside loopLoopVariableIsNeverChangedInsideLoop resharper_loop_variable_is_never_changed_inside_loop_highlighting | Warning |
Member hides static member from outer classMemberHidesStaticFromOuterClass resharper_member_hides_static_from_outer_class_highlighting | Warning |
Member initialized value ignoredMemberInitializerValueIgnored resharper_member_initializer_value_ignored_highlighting | Warning |
Method is marked as OperationContract but containing type isn't marked as ServiceContractOperationContractWithoutServiceContract resharper_operation_contract_without_service_contract_highlighting | Warning |
Method with optional or 'params' parameter is hidden by overloadMethodOverloadWithOptionalParameter resharper_method_overload_with_optional_parameter_highlighting | Warning |
Method with 'params' is invoked while more specific method is availablePossiblyMistakenUseOfParamsMethod resharper_possibly_mistaken_use_of_params_method_highlighting | Warning |
Mismatch of optional parameter value in overridden methodOptionalParameterHierarchyMismatch resharper_optional_parameter_hierarchy_mismatch_highlighting | Warning |
Multiple sequential 'OrderBy' invocationMultipleOrderBy resharper_multiple_order_by_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 |
Nullable warning suppression operator might be confused with inverted 'is' expressionSuppressNullableWarningExpressionAsInvertedIsExpression resharper_suppress_nullable_warning_expression_as_inverted_is_expression_highlighting | Warning |
'Object.ReferenceEquals' is always false because it is called with value typeReferenceEqualsWithValueType resharper_reference_equals_with_value_type_highlighting | Warning |
One way operations must not return valuesOneWayOperationContractWithReturnType resharper_one_way_operation_contract_with_return_type_highlighting | Warning |
Operator 'is'/'Type Of ... Is ...' can be usedOperatorIsCanBeUsed resharper_operator_is_can_be_used_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 |
Parameter name differs in partial method declarationPartialMethodParameterNameMismatch resharper_partial_method_parameter_name_mismatch_highlighting | Warning |
Possible ambiguity while accessing member by interfacePossibleInterfaceMemberAmbiguity resharper_possible_interface_member_ambiguity_highlighting | Warning |
Possible comparison of value type with 'null'CompareNonConstrainedGenericWithNull resharper_compare_non_constrained_generic_with_null_highlighting | Disabled |
Possible cyclic constructor callConstructorInitializerLoop resharper_constructor_initializer_loop_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 loss of fractionPossibleLossOfFraction resharper_possible_loss_of_fraction_highlighting | Warning |
Possible multiple enumerationPossibleMultipleEnumeration resharper_possible_multiple_enumeration_highlighting | Warning |
Possible overflow in checked context.IntVariableOverflowInCheckedContext resharper_int_variable_overflow_in_checked_context_highlighting | Warning |
Possible overflow in unchecked context.IntVariableOverflowInUncheckedContext resharper_int_variable_overflow_in_unchecked_context_highlighting | Warning |
Possible overflow.IntVariableOverflow resharper_int_variable_overflow_highlighting | Warning |
Possible 'System.ArgumentOutOfRangeException'. Index must be a non-negative integerNegativeIndex resharper_negative_index_highlighting | Warning |
Possible 'System.ArgumentOutOfRangeException'. Start index should be less than or equal to end indexIndexingByInvalidRange resharper_indexing_by_invalid_range_highlighting | Warning |
Possible 'System.InvalidCastException'PossibleInvalidCastException resharper_possible_invalid_cast_exception_highlighting | Warning |
Possible 'System.InvalidCastException' in foreach loopPossibleInvalidCastExceptionInForeachLoop resharper_possible_invalid_cast_exception_in_foreach_loop_highlighting | Warning |
Possible 'System.InvalidOperationException'PossibleInvalidOperationException resharper_possible_invalid_operation_exception_highlighting | Warning |
Possible 'System.NullReferenceException'PossibleNullReferenceException resharper_possible_null_reference_exception_highlighting | Warning |
Possible unassigned object created by 'new' expressionObjectCreationAsStatement resharper_object_creation_as_statement_highlighting | Warning |
Possible unintended reference comparisonPossibleUnintendedReferenceComparison resharper_possible_unintended_reference_comparison_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 |
Possibly misleading 'DefaultValueAttribute' usage to define optional parameter valueDefaultValueAttributeForOptionalParameter resharper_default_value_attribute_for_optional_parameter_highlighting | Warning |
Possibly missing comma before indexer initializerPossiblyMissingIndexerInitializerComma resharper_possibly_missing_indexer_initializer_comma_highlighting | Warning |
Possibly unintended linear search in setPossibleUnintendedLinearSearchInSet resharper_possible_unintended_linear_search_in_set_highlighting | Warning |
Possibly unintended string interpolation instead of format string template.PossiblyMistakenUseOfInterpolatedStringInsert resharper_possibly_mistaken_use_of_interpolated_string_insert_highlighting | Warning |
'ref' or 'out' parameter with [Optional] attributeOptionalParameterRefOut resharper_optional_parameter_ref_out_highlighting | Warning |
Return type of a function can be non-nullableReturnTypeCanBeNotNullable resharper_return_type_can_be_not_nullable_highlighting | Warning |
Return value of [MustUseReturnValue] annotated method is not usedMustUseReturnValue resharper_must_use_return_value_highlighting | Warning |
Return value of iterator is not usedIteratorMethodResultIsIgnored resharper_iterator_method_result_is_ignored_highlighting | Warning |
Return value of pure method is not usedReturnValueOfPureMethodIsNotUsed resharper_return_value_of_pure_method_is_not_used_highlighting | Warning |
Right operand of dynamic shift operation should be convertible to 'int'DynamicShiftRightOpIsNotInt resharper_dynamic_shift_right_op_is_not_int_highlighting | Warning |
Safe cast expression always succeedsTryCastAlwaysSucceeds resharper_try_cast_always_succeeds_highlighting | Suggestion |
Shift expression with zero left operand equals zero.ShiftExpressionZeroLeftOperand resharper_shift_expression_zero_left_operand_highlighting | Warning |
Similar anonymous type detected nearbySimilarAnonymousTypeNearby resharper_similar_anonymous_type_nearby_highlighting | Hint |
Similar expressions comparisonEqualExpressionComparison resharper_equal_expression_comparison_highlighting | Warning |
Some values of the enum are not processed inside switch expression and are handled via exception in default armSwitchExpressionHandlesSomeKnownEnumValuesWithExceptionInDefault resharper_switch_expression_handles_some_known_enum_values_with_exception_in_default_highlighting | Hint |
Some values of the enum are not processed inside switch statementSwitchStatementMissingSomeEnumCasesNoDefault resharper_switch_statement_missing_some_enum_cases_no_default_highlighting | Hint |
Some values of the enum are not processed inside switch statement and are handled via default sectionSwitchStatementHandlesSomeKnownEnumValuesWithDefault resharper_switch_statement_handles_some_known_enum_values_with_default_highlighting | Hint |
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 shift count for this type of left operand.ShiftExpressionRightOperandNotEqualRealCount resharper_shift_expression_right_operand_not_equal_real_count_highlighting | Warning |
Suspicious type conversion or checkSuspiciousTypeConversion.Global resharper_suspicious_type_conversion_global_highlighting | Warning |
Suspicious 'volatile' field usage: compound operation is not atomic. 'Interlocked' class can be used insteadNonAtomicCompoundOperator resharper_non_atomic_compound_operator_highlighting | Warning |
Symbol from module that might be missing at runtimeSymbolFromNotCopiedLocallyReferenceUsedWarning resharper_symbol_from_not_copied_locally_reference_used_warning_highlighting | Warning |
Tail recursive call can be replaced with loopTailRecursiveCall resharper_tail_recursive_call_highlighting | Hint |
The given expression of 'is' operator is always of the provided typeIsExpressionAlwaysTrue resharper_is_expression_always_true_highlighting | Warning |
The given expression of 'is' operator is never of the provided typeIsExpressionAlwaysFalse resharper_is_expression_always_false_highlighting | Warning |
The source expression always matches the provided patternPatternAlwaysMatches resharper_pattern_always_matches_highlighting | Warning |
The source expression is always of pattern's typePatternAlwaysOfType resharper_pattern_always_of_type_highlighting | Warning |
The source expression never matches the provided patternPatternNeverMatches resharper_pattern_never_matches_highlighting | Warning |
Thread static field has initializerThreadStaticFieldHasInitializer resharper_thread_static_field_has_initializer_highlighting | Warning |
Try cast and check for null can be replaced with a type checkSafeCastIsUsedAsTypeCheck resharper_safe_cast_is_used_as_type_check_highlighting | Suggestion |
Type check and casts can be mergedMergeCastWithTypeCheck resharper_merge_cast_with_type_check_highlighting | Suggestion |
Type pattern and casts can be mergedUseSwitchCasePatternVariable resharper_use_switch_case_pattern_variable_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 |
Usage of <inheritdoc /> is invalid.InheritdocInvalidUsage resharper_inheritdoc_invalid_usage_highlighting | Warning |
Use <inheritdoc /> on root level to inherit documentation from base candidate.InheritdocConsiderUsage resharper_inheritdoc_consider_usage_highlighting | Disabled |
Use collection's count propertyUseCollectionCountProperty resharper_use_collection_count_property_highlighting | Suggestion |
Use format specifier in format stringsUseFormatSpecifierInFormatString resharper_use_format_specifier_in_format_string_highlighting | Suggestion |
Use format specifier in interpolated stringsUseFormatSpecifierInInterpolation resharper_use_format_specifier_in_interpolation_highlighting | Suggestion |
Useless arithmetical operation.UselessBinaryOperation resharper_useless_binary_operation_highlighting | Warning |
Using stackalloc inside loopStackAllocInsideLoop resharper_stack_alloc_inside_loop_highlighting | Warning |
Value assigned to a property of non-variable qualifier expression can be lostPossibleStructMemberModificationOfNonVariableStruct resharper_possible_struct_member_modification_of_non_variable_struct_highlighting | Warning |
'value' parameter is not usedValueParameterNotUsed resharper_value_parameter_not_used_highlighting | Warning |
Variable can be declared as non-nullableVariableCanBeNotNullable resharper_variable_can_be_not_nullable_highlighting | Warning |
Variable in local function hides variable from outer scopeVariableHidesOuterVariable resharper_variable_hides_outer_variable_highlighting | Warning |
Virtual member call in constructorVirtualMemberCallInConstructor resharper_virtual_member_call_in_constructor_highlighting | Warning |
'void' method is annotated by [MustUseReturnValue] attributeVoidMethodWithMustUseReturnValueAttribute resharper_void_method_with_must_use_return_value_attribute_highlighting | Warning |
'void' method is annotated by [Pure] attributePureAttributeOnVoidMethod resharper_pure_attribute_on_void_method_highlighting | Warning |
Redundancies in Code (72 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 |
---|---|
'??' condition is known to be null or not nullConstantNullCoalescingCondition resharper_constant_null_coalescing_condition_highlighting | Warning |
Anonymous method signature is not necessaryUnusedAnonymousMethodSignature resharper_unused_anonymous_method_signature_highlighting | Warning |
Array creation can be replaced with array initializerRedundantArrayCreationExpression resharper_redundant_array_creation_expression_highlighting | Hint |
Assignment is not usedRedundantAssignment resharper_redundant_assignment_highlighting | Warning |
Assignment results are fully discardedAssignmentIsFullyDiscarded resharper_assignment_is_fully_discarded_highlighting | Warning |
Conditional access qualifier expression is known to be null or not nullConstantConditionalAccessQualifier resharper_constant_conditional_access_qualifier_highlighting | Warning |
Double negation operatorDoubleNegationOperator resharper_double_negation_operator_highlighting | Suggestion |
Empty 'for' loop is redundantEmptyForStatement resharper_empty_for_statement_highlighting | Warning |
Explicit delegate creation expression is redundantRedundantDelegateCreation resharper_redundant_delegate_creation_highlighting | Warning |
Expression is always 'null'ExpressionIsAlwaysNull resharper_expression_is_always_null_highlighting | Warning |
Expression is always 'true' or always 'false'ConditionIsAlwaysTrueOrFalse resharper_condition_is_always_true_or_false_highlighting | Warning |
Heuristically unreachable codeHeuristicUnreachableCode resharper_heuristic_unreachable_code_highlighting | Warning |
Immediate delegate invocationRedundantImmediateDelegateInvocation resharper_redundant_immediate_delegate_invocation_highlighting | Suggestion |
Math.Abs() argument is always non-negativeMathAbsMethodIsRedundant resharper_math_abs_method_is_redundant_highlighting | Warning |
Math.Sign() method always gives the same resultSuspiciousMathSignMethod resharper_suspicious_math_sign_method_highlighting | Warning |
Parentheses are redundant if attribute has no argumentsRedundantAttributeParentheses resharper_redundant_attribute_parentheses_highlighting | Hint |
Private field can be converted to local variablePrivateFieldCanBeConvertedToLocalVariable resharper_private_field_can_be_converted_to_local_variable_highlighting | Warning |
Redundant [AttributeUsage] attribute property assignmentRedundantAttributeUsageProperty resharper_redundant_attribute_usage_property_highlighting | Suggestion |
Redundant 'abstract' modifierRedundantAbstractModifier resharper_redundant_abstract_modifier_highlighting | Warning |
Redundant anonymous type property explicit nameRedundantAnonymousTypePropertyName resharper_redundant_anonymous_type_property_name_highlighting | Warning |
Redundant argument with default valueRedundantArgumentDefaultValue resharper_redundant_argument_default_value_highlighting | Warning |
Redundant arithmetic overflow checking contextRedundantOverflowCheckingContext resharper_redundant_overflow_checking_context_highlighting | Warning |
Redundant 'base.' qualifierRedundantBaseQualifier resharper_redundant_base_qualifier_highlighting | Warning |
Redundant boolean comparisonRedundantBoolCompare resharper_redundant_bool_compare_highlighting | Warning |
Redundant braces in collection initializerRedundantCollectionInitializerElementBraces resharper_redundant_collection_initializer_element_braces_highlighting | Hint |
Redundant 'case' labelRedundantCaseLabel resharper_redundant_case_label_highlighting | Warning |
Redundant castRedundantCast resharper_redundant_cast_highlighting | Warning |
Redundant cast to 'object'RedundantCast.0 resharper_redundant_cast_0_highlighting | Warning |
Redundant catch clauseRedundantCatchClause resharper_redundant_catch_clause_highlighting | Warning |
Redundant condition check before assignmentsRedundantCheckBeforeAssignment resharper_redundant_check_before_assignment_highlighting | Warning |
Redundant conditional ternary expression usageRedundantTernaryExpression resharper_redundant_ternary_expression_highlighting | Warning |
Redundant control flow jump statementRedundantJumpStatement resharper_redundant_jump_statement_highlighting | Warning |
Redundant discard designationRedundantDiscardDesignation resharper_redundant_discard_designation_highlighting | Suggestion |
Redundant discarded property patternRedundantDiscardedPattern resharper_redundant_discarded_pattern_highlighting | Suggestion |
Redundant 'else' keywordRedundantIfElseBlock resharper_redundant_if_else_block_highlighting | Hint |
Redundant empty argument list on object creation expressionRedundantEmptyObjectCreationArgumentList resharper_redundant_empty_object_creation_argument_list_highlighting | Hint |
Redundant empty finally blockRedundantEmptyFinallyBlock resharper_redundant_empty_finally_block_highlighting | Warning |
Redundant empty object or collection initializerRedundantEmptyObjectOrCollectionInitializer resharper_redundant_empty_object_or_collection_initializer_highlighting | Warning |
Redundant empty switch sectionRedundantEmptySwitchSection resharper_redundant_empty_switch_section_highlighting | Warning |
Redundant explicit array creation in argument of 'params' parameterRedundantExplicitParamsArrayCreation resharper_redundant_explicit_params_array_creation_highlighting | Suggestion |
Redundant explicit nullable type creationRedundantExplicitNullableCreation resharper_redundant_explicit_nullable_creation_highlighting | Warning |
Redundant explicit size specification in array creationRedundantExplicitArraySize resharper_redundant_explicit_array_size_highlighting | Warning |
Redundant explicit tuple component nameRedundantExplicitTupleComponentName resharper_redundant_explicit_tuple_component_name_highlighting | Warning |
Redundant explicit type in array creationRedundantExplicitArrayCreation resharper_redundant_explicit_array_creation_highlighting | Warning |
Redundant fixed pointer declarationRedundantFixedPointerDeclaration resharper_redundant_fixed_pointer_declaration_highlighting | Suggestion |
Redundant 'IEnumerable.Cast<T>' or 'IEnumerable.OfType<T>' callRedundantEnumerableCastCall resharper_redundant_enumerable_cast_call_highlighting | Warning |
Redundant lambda expression parameter type specificationRedundantLambdaParameterType resharper_redundant_lambda_parameter_type_highlighting | Warning |
Redundant lambda signature parenthesesRedundantLambdaSignatureParentheses resharper_redundant_lambda_signature_parentheses_highlighting | Hint |
Redundant name qualifierRedundantNameQualifier resharper_redundant_name_qualifier_highlighting | Warning |
Redundant 'notnull' constraint on type parameter constrained by non-nullable base type.RedundantNotNullConstraint resharper_redundant_not_null_constraint_highlighting | Warning |
Redundant nullable annotation on base type constraint of type parameter constrained by another non-nullable base type.RedundantNullableAnnotationOnTypeConstraintHasNonNullableBaseType resharper_redundant_nullable_annotation_on_type_constraint_has_non_nullable_base_type_highlighting | Warning |
Redundant nullable annotation on base type constraint of type parameter having non-nullable type kind.RedundantNullableAnnotationOnTypeConstraintHasNonNullableTypeKind resharper_redundant_nullable_annotation_on_type_constraint_has_non_nullable_type_kind_highlighting | Warning |
Redundant nullable annotation on 'class?' constraint of type parameter constrained by non-nullable base type.RedundantNullableAnnotationOnReferenceTypeConstraint resharper_redundant_nullable_annotation_on_reference_type_constraint_highlighting | Warning |
Redundant 'object.ToString()' callRedundantToStringCall resharper_redundant_to_string_call_highlighting | Warning |
Redundant 'object.ToString()' call for value typesRedundantToStringCallForValueType resharper_redundant_to_string_call_for_value_type_highlighting | Hint |
Redundant operand in logical conditional expressionRedundantLogicalConditionalExpressionOperand resharper_redundant_logical_conditional_expression_operand_highlighting | Warning |
Redundant 'orderby' clause 'ascending' keywordRedundantQueryOrderByAscendingKeyword resharper_redundant_query_order_by_ascending_keyword_highlighting | Hint |
Redundant property pattern clauseRedundantPropertyPatternClause resharper_redundant_property_pattern_clause_highlighting | Suggestion |
Redundant range boundRedundantRangeBound resharper_redundant_range_bound_highlighting | Suggestion |
Redundant 'readonly' modifierRedundantReadonlyModifier resharper_redundant_readonly_modifier_highlighting | Suggestion |
Redundant semicolon after type or namespace declarationRedundantDeclarationSemicolon resharper_redundant_declaration_semicolon_highlighting | Hint |
Redundant string interpolationRedundantStringInterpolation resharper_redundant_string_interpolation_highlighting | Suggestion |
Redundant 'string.Format()' callRedundantStringFormatCall resharper_redundant_string_format_call_highlighting | Warning |
Redundant 'string.ToCharArray()' callRedundantStringToCharArrayCall resharper_redundant_string_to_char_array_call_highlighting | Warning |
Redundant type arguments of methodRedundantTypeArgumentsOfMethod resharper_redundant_type_arguments_of_method_highlighting | Warning |
Redundant type specification in default expressionRedundantTypeSpecificationInDefaultExpression resharper_redundant_type_specification_in_default_expression_highlighting | Suggestion |
Redundant using directiveRedundantUsingDirective resharper_redundant_using_directive_highlighting | Warning |
Redundant verbatim prefixRedundantVerbatimPrefix resharper_redundant_verbatim_prefix_highlighting | Suggestion |
Redundant verbatim string prefixRedundantVerbatimStringPrefix resharper_redundant_verbatim_string_prefix_highlighting | Suggestion |
'true' is redundant as 'for'-statement conditionForStatementConditionIsTrue resharper_for_statement_condition_is_true_highlighting | Warning |
Type check for nullable type is equal to underlying type checkRedundantNullableTypeMark resharper_redundant_nullable_type_mark_highlighting | Warning |
Unsafe context declaration is redundantRedundantUnsafeContext resharper_redundant_unsafe_context_highlighting | Warning |
Redundancies in Symbol Declarations (45 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 |
Component of the tuple is never usedUnusedTupleComponentInReturnValue resharper_unused_tuple_component_in_return_value_highlighting | Warning |
'DefaultParameterValueAttribute' should be used in conjunction with 'OptionalAttribute'MeaninglessDefaultParameterValue resharper_meaningless_default_parameter_value_highlighting | Warning |
Empty constructorEmptyConstructor resharper_empty_constructor_highlighting | Warning |
Empty destructorEmptyDestructor resharper_empty_destructor_highlighting | Warning |
Empty namespace declarationEmptyNamespace resharper_empty_namespace_highlighting | Warning |
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 |
'params' modifier is always ignored on overridesRedundantParams resharper_redundant_params_highlighting | Warning |
Redundant base constructor callRedundantBaseConstructorCall resharper_redundant_base_constructor_call_highlighting | Warning |
Redundant class or interface specification in base types listRedundantExtendsListEntry resharper_redundant_extends_list_entry_highlighting | Warning |
Redundant member initializerRedundantDefaultMemberInitializer resharper_redundant_default_member_initializer_highlighting | Warning |
Redundant member overrideRedundantOverriddenMember resharper_redundant_overridden_member_highlighting | Warning |
Redundant method overload (non-private accessibility)RedundantOverload.Global resharper_redundant_overload_global_highlighting | Suggestion |
Redundant method overload (private accessibility)RedundantOverload.Local resharper_redundant_overload_local_highlighting | Suggestion |
Redundant 'partial' modifier on method declarationPartialMethodWithSinglePart resharper_partial_method_with_single_part_highlighting | Warning |
Redundant 'partial' modifier on type declarationPartialTypeWithSinglePart resharper_partial_type_with_single_part_highlighting | Warning |
Sealed member in sealed classSealedMemberInSealedClass resharper_sealed_member_in_sealed_class_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 |
Underlying type of enum is 'int'EnumUnderlyingTypeIsInt resharper_enum_underlying_type_is_int_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 |
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 page of ReSharper options (Alt+R O). You can also fix issues that these inspection detect using code cleanup. Inspection ID EditorConfig property | Default severity |
---|---|
Add parentheses to avoid non-obvious precedenceArrangeMissingParentheses resharper_arrange_missing_parentheses_highlighting | Disabled |
Add/remove qualifier for static membersArrangeStaticMemberQualifier resharper_arrange_static_member_qualifier_highlighting | Hint |
Add/remove 'this.' qualifierArrangeThisQualifier resharper_arrange_this_qualifier_highlighting | Hint |
Adjust modifiers declaration orderArrangeModifiersOrder resharper_arrange_modifiers_order_highlighting | Suggestion |
Join or separate attributes is sectionArrangeAttributes resharper_arrange_attributes_highlighting | Disabled |
Join or separate 'var' in deconstruction declarationsArrangeVarKeywordsInDeconstructingDeclaration resharper_arrange_var_keywords_in_deconstructing_declaration_highlighting | Suggestion |
Remove redundant parenthesesArrangeRedundantParentheses resharper_arrange_redundant_parentheses_highlighting | Hint |
Replace built-in type reference with a CLR type name or a keywordBuiltInTypeReferenceStyle resharper_built_in_type_reference_style_highlighting | Hint |
Replace built-in type reference with a CLR type name or a keyword in static member access expressionsBuiltInTypeReferenceStyleForMemberAccess resharper_built_in_type_reference_style_for_member_access_highlighting | Hint |
Separate control transfer statement with blank lineSeparateControlTransferStatement resharper_separate_control_transfer_statement_highlighting | Disabled |
Unnecessary whitespace at the end of lineUnnecessaryWhitespace resharper_unnecessary_whitespace_highlighting | Disabled |
Usage of tabulation character for indentation is prohibitedTabsAreDisallowed resharper_tabs_are_disallowed_highlighting | Disabled |
Use explicit or implicit modifier definition for type membersArrangeTypeMemberModifiers resharper_arrange_type_member_modifiers_highlighting | Hint |
Use explicit or implicit modifier definition for typesArrangeTypeModifiers resharper_arrange_type_modifiers_highlighting | Hint |
Use preferred argument styleArgumentsStyleOther resharper_arguments_style_other_highlighting | Hint |
Use preferred argument style for anonymous functionsArgumentsStyleAnonymousFunction resharper_arguments_style_anonymous_function_highlighting | Hint |
Use preferred argument style for literal valuesArgumentsStyleLiteral resharper_arguments_style_literal_highlighting | Hint |
Use preferred argument style for named expressionsArgumentsStyleNamedExpression resharper_arguments_style_named_expression_highlighting | Hint |
Use preferred argument style for string literal valuesArgumentsStyleStringLiteral resharper_arguments_style_string_literal_highlighting | Hint |
Use preferred body style (convert to constructor or destructor with preferred body style)ArrangeConstructorOrDestructorBody resharper_arrange_constructor_or_destructor_body_highlighting | Disabled |
Use preferred body style (convert to local function with preferred body style)ArrangeLocalFunctionBody resharper_arrange_local_function_body_highlighting | Disabled |
Use preferred body style (convert to method or operator with preferred body style)ArrangeMethodOrOperatorBody resharper_arrange_method_or_operator_body_highlighting | Disabled |
Use preferred body style (convert to property, indexer or event with preferred body style)ArrangeAccessorOwnerBody resharper_arrange_accessor_owner_body_highlighting | Suggestion |
Use preferred braces style (enforce braces in 'do-while' statement)EnforceDoWhileStatementBraces resharper_enforce_do_while_statement_braces_highlighting | Disabled |
Use preferred braces style (enforce braces in 'fixed' statement)EnforceFixedStatementBraces resharper_enforce_fixed_statement_braces_highlighting | Disabled |
Use preferred braces style (enforce braces in 'for' statement)EnforceForStatementBraces resharper_enforce_for_statement_braces_highlighting | Disabled |
Use preferred braces style (enforce braces in 'foreach' statement)EnforceForeachStatementBraces resharper_enforce_foreach_statement_braces_highlighting | Disabled |
Use preferred braces style (enforce braces in 'if' statement)EnforceIfStatementBraces resharper_enforce_if_statement_braces_highlighting | Disabled |
Use preferred braces style (enforce braces in 'lock' statement)EnforceLockStatementBraces resharper_enforce_lock_statement_braces_highlighting | Disabled |
Use preferred braces style (enforce braces in 'using' statement)EnforceUsingStatementBraces resharper_enforce_using_statement_braces_highlighting | Disabled |
Use preferred braces style (enforce braces in 'while' statement)EnforceWhileStatementBraces resharper_enforce_while_statement_braces_highlighting | Disabled |
Use preferred braces style (remove redundant braces)RemoveRedundantBraces resharper_remove_redundant_braces_highlighting | Disabled |
Use preferred style for discard declarationSuggestDiscardDeclarationVarStyle resharper_suggest_discard_declaration_var_style_highlighting | Hint |
Use preferred style for trailing comma before new line in multiline listsArrangeTrailingCommaInMultilineLists resharper_arrange_trailing_comma_in_multiline_lists_highlighting | Hint |
Use preferred style for trailing comma when the last element is not followed by a new lineArrangeTrailingCommaInSinglelineLists resharper_arrange_trailing_comma_in_singleline_lists_highlighting | Hint |
Use preferred 'var' style (elsewhere)SuggestVarOrType_Elsewhere resharper_suggest_var_or_type_elsewhere_highlighting | Hint |
Use preferred 'var' style (for built-in types)SuggestVarOrType_BuiltInTypes resharper_suggest_var_or_type_built_in_types_highlighting | Hint |
Use preferred 'var' style (in deconstruction declarations)SuggestVarOrType_DeconstructionDeclarations resharper_suggest_var_or_type_deconstruction_declarations_highlighting | Hint |
Use preferred 'var' style (when type is simple)SuggestVarOrType_SimpleTypes resharper_suggest_var_or_type_simple_types_highlighting | Hint |
Xunit (1 inspection)
These inspections detect code issues related to xUnit.Net tests. Inspection ID EditorConfig property | Default severity |
---|---|
Console output in Xunit testsXunit.XunitTestWithConsoleOutput resharper_xunit_xunit_test_with_console_output_highlighting | Warning |