Inspectopedia 2025.2 Help

Potential Code Quality Issues

The parameter expects a constant for optimal performance   New in this release

The parameter expects a constant for optimal performance.

'?:' expression has identical true and false branches   New in this release

'?:' expression has identical true and false branches.

'Enumerable.Sum' invocation in explicit unchecked context   New in this release

'Enumerable.Sum' invocation in explicit unchecked context.

'GC.SuppressFinalize' is invoked for type without destructor   New in this release

'GC.SuppressFinalize' is invoked for type without destructor.

'Object.ReferenceEquals' is always false because it is called with value type   New in this release

'Object.ReferenceEquals' is always false because it is called with value type.

'ref' or 'out' parameter with [Optional] attribute   New in this release

'ref' or 'out' parameter with [Optional] attribute.

'value' parameter is not used   New in this release

'value' parameter is not used.

'void' method is annotated with the [MustDisposeResource] attribute   New in this release

'void' method is annotated with the [MustDisposeResource] attribute.

'void' method is annotated with the [MustUseReturnValue] attribute   New in this release

'void' method is annotated with the [MustUseReturnValue] attribute.

'void' method is annotated with the [Pure] attribute   New in this release

'void' method is annotated with the [Pure] attribute.

'with' expression is used instead of object initializer   New in this release

'with' expression is used instead of object initializer.

'with' expression modifies all accessible instance members   New in this release

'with' expression modifies all accessible instance members.

[MustDisposeResource] annotation is not inherited from the base constructor and should be placed explicitly   New in this release

[MustDisposeResource] annotation is not inherited from the base constructor and should be placed explicitly.

[ThreadStatic] does not work with instance fields   New in this release

[ThreadStatic] does not work with instance fields.

A suppressed nullable warning might hide an underlying problem   New in this release

A suppressed nullable warning might hide an underlying problem.

Abstract or virtual (overridable) event is never invoked   New in this release

Abstract or virtual (overridable) event is never invoked.

Access to disposed captured variable   New in this release

Access to disposed captured variable.

Access to foreach variable in closure   New in this release

Access to foreach variable in closure.

Access to modified captured variable   New in this release

Access to modified captured variable.

According to values of the bit masks, expression result will always be the same   New in this release

According to values of the bit masks, expression result will always be the same.

Actual shift count equals zero   New in this release

Actual shift count equals zero.

Ambiguous symbols in text argument   New in this release

Ambiguous symbols in text argument.

Annotation conflict in hierarchy   New in this release

Annotation conflict in hierarchy.

Assignment in conditional expression   New in this release

Assignment in conditional expression.

Async iterator invocation without 'await foreach'   New in this release

Async iterator invocation without 'await foreach'.

Auto-property accessor is never used (non-private accessibility)   New in this release

Auto-property accessor is never used (non-private accessibility).

Auto-property accessor is never used (private accessibility)   New in this release

Auto-property accessor is never used (private accessibility).

Avoid mixing of variable-length escape sequences and text   New in this release

Avoid mixing of variable-length escape sequences and text.

Avoid using 'async' for methods and functions with the 'void' return type and a parameter of type 'System.EventArgs'   New in this release

Avoid using 'async' for methods and functions with the 'void' return type and a parameter of type 'System.EventArgs'.

Avoid using 'async' for methods and functions with the 'void' return type but without a parameter of type 'System.EventArgs'   New in this release

Avoid using 'async' for methods and functions with the 'void' return type but without a parameter of type 'System.EventArgs'.

Avoid using 'async' lambda when delegate type returns 'void'   New in this release

Avoid using 'async' lambda when delegate type returns 'void'.

Backing field is assigned but never used   New in this release

Backing field is assigned but never used.

Backing field is used but never assigned   New in this release

Backing field is used but never assigned.

Bitwise operation on enum that is not marked by the [Flags] attribute   New in this release

Bitwise operation on enum that is not marked by the [Flags] attribute.

Call to 'base.Equals(...)' is reference equality   New in this release

Call to 'base.Equals(...)' is reference equality.

Call to base member with implicit default parameters   New in this release

Call to base member with implicit default parameters.

Cannot access static symbol in text argument   New in this release

Cannot access static symbol in text argument.

Cannot access symbol in text argument   New in this release

Cannot access symbol in text argument.

Cannot resolve property   New in this release

Cannot resolve property.

Cannot resolve resource   New in this release

Cannot resolve resource.

Cannot resolve resource item   New in this release

Cannot resolve resource item.

Cannot resolve symbol in text argument   New in this release

Cannot resolve symbol in text argument.

Captured field reference of a marshal-by-reference class may cause a runtime exception   New in this release

Captured field reference of a marshal-by-reference class may cause a runtime exception.

Captured primary constructor parameter is mutable   New in this release

Captured primary constructor parameter is mutable.

Captured reference to 'volatile' field will not be treated as 'volatile'   New in this release

Captured reference to 'volatile' field will not be treated as 'volatile'.

Char is possibly unintentionally used as integer   New in this release

Char is possibly unintentionally used as integer.

Class is never instantiated (non-private accessibility)   New in this release

Class is never instantiated (non-private accessibility).

Class is never instantiated (private accessibility)   New in this release

Class is never instantiated (private accessibility).

Co-variant array conversion   New in this release

Co-variant array conversion.

Collection content is never queried (non-private accessibility)   New in this release

Collection content is never queried (non-private accessibility).

Collection content is never queried (private accessibility)   New in this release

Collection content is never queried (private accessibility).

Collection is never updated (non-private accessibility)   New in this release

Collection is never updated (non-private accessibility).

Collection is never updated (private accessibility)   New in this release

Collection is never updated (private accessibility).

Conflicting CQRS attribute   New in this release

Conflicting CQRS attribute.

Constant shift expression with non-zero operands results in a zero value   New in this release

Constant shift expression with non-zero operands results in a zero value.

CQRS context intersection. Command is called from the Query context. (show on declarations)   New in this release

CQRS context intersection.

CQRS context intersection. Command is called from the Query context. (show on usages)   New in this release

CQRS context intersection.

CQRS context intersection. Query is called from the Command context. (show on declarations)   New in this release

CQRS context intersection.

CQRS context intersection. Query is called from the Command context. (show on usages)   New in this release

CQRS context intersection.

Disposal of a variable already captured by the 'using' statement   New in this release

Disposal of a variable already captured by the 'using' statement.

Division by zero in at least one execution path   New in this release

Division by zero in at least one execution path.

Do not rethrow exception in 'async void' methods and functions   New in this release

Do not rethrow exception in 'async void' methods and functions.

Do not store SpinLock in readonly field   New in this release

Do not store SpinLock in readonly field.

Do not use object initializer for 'using' variable   New in this release

Do not use object initializer for 'using' variable.

Do not use object initializer for 'using' variable (object initializer expression may throw exception while initializing 'using' variable)   New in this release

Do not use object initializer for 'using' variable (object initializer expression may throw exception while initializing 'using' variable).

Do not use right brace after a format specifier in format strings   New in this release

Do not use right brace after a format specifier in format strings.

Duplicate keys in dictionary/set initialization   New in this release

Duplicate keys in dictionary/set initialization.

Duplicated 'switch' arms   New in this release

Duplicated 'switch' arms.

Duplicated 'switch' branches   New in this release

Duplicated 'switch' branches.

Duplicated chained 'if' branches   New in this release

Duplicated chained 'if' branches.

Duplicated sequential 'if' branches   New in this release

Duplicated sequential 'if' branches.

Empty 'with' expression is redundant   New in this release

Empty 'with' expression is redundant.

Empty general catch clause   New in this release

Empty general catch clause.

Equality comparison of floating point numbers   New in this release

Equality comparison of floating point numbers.

Escape sequence can be simplified   New in this release

Escape sequence can be simplified.

Event is never subscribed to (non-private accessibility)   New in this release

Event is never subscribed to (non-private accessibility).

Event is never subscribed to (private accessibility)   New in this release

Event is never subscribed to (private accessibility).

Event never invoked   New in this release

Event never invoked.

Event unsubscription via anonymous delegate   New in this release

Event unsubscription via anonymous delegate.

Exception rethrow possibly intended   New in this release

Exception rethrow possibly intended.

Explicit argument passed to parameter with caller info attribute   New in this release

Explicit argument passed to parameter with caller info attribute.

Extract common code   New in this release

Extract common code.

Field hides property with default implementation in interface   New in this release

Field hides property with default implementation in interface.

Formatting is specified, but interpolated string expression is not IFormattable   New in this release

Formatting is specified, but interpolated string expression is not IFormattable.

Function body is too complex to analyze   New in this release

Function body is too complex to analyze.

Function is recursive on all execution paths   New in this release

Function is recursive on all execution paths.

Function never returns   New in this release

Function never returns.

Heuristically unreachable case according to integer analysis   New in this release

Heuristically unreachable case according to integer analysis.

Heuristically unreachable switch arm according to integer analysis   New in this release

Heuristically unreachable switch arm according to integer analysis.

Inconsistent arguments passed to 'Math.Clamp()' method   New in this release

Inconsistent arguments passed to 'Math.Clamp()' method.

Inconsistent order of taken locks   New in this release

Inconsistent order of taken locks.

Inconsistent synchronization on field   New in this release

Inconsistent synchronization on field.

Incorrect usage of ConstantExpected attribute   New in this release

Incorrect usage of ConstantExpected attribute.

Index from end must be greater than zero; use '^1' to refer to the last element   New in this release

Index from end must be greater than zero; use '^1' to refer to the last element.

Interfaces marked as ServiceContract should declare at least one OperationContract   New in this release

Interfaces marked as ServiceContract should declare at least one OperationContract.

Invalid XML documentation comment   New in this release

Invalid XML documentation comment.

Invocation of polymorphic field-like event   New in this release

Invocation of polymorphic field-like event.

IQueryable is possibly unintentionally used as IEnumerable   New in this release

IQueryable is possibly unintentionally used as IEnumerable.

Iterator never returns   New in this release

Iterator never returns.

Local function hides method   New in this release

Local function hides method.

Local variable hides member   New in this release

Local variable hides member.

Local variable hides primary constructor parameter   New in this release

Local variable hides primary constructor parameter.

Loop control variable is never changed inside loop   New in this release

Loop control variable is never changed inside loop.

Meaningless [HandlesResourceDisposal] annotation for an output parameter   New in this release

Meaningless [HandlesResourceDisposal] annotation for an output parameter.

Meaningless [MustDisposeResource] annotation for an input parameter   New in this release

Meaningless [MustDisposeResource] annotation for an input parameter.

Member hides static member from outer class   New in this release

Member hides static member from outer class.

Member initialized value ignored   New in this release

Member initialized value ignored.

Method is called from both CQRS contexts (show on declarations)   New in this release

Method is called from both CQRS contexts (show on declarations).

Method is called from both CQRS contexts (show on usages)   New in this release

Method is called from both CQRS contexts (show on usages).

Method is marked as OperationContract but containing type is not marked as ServiceContract   New in this release

Method is marked as OperationContract but containing type is not marked as ServiceContract.

Method with optional or 'params' parameter is hidden by overload   New in this release

Method with optional or 'params' parameter is hidden by overload.

Mismatch of optional parameter value in overridden method   New in this release

Mismatch of optional parameter value in overridden method.

Missing '.ConfigureAwait(false)' for async disposable in library code   New in this release

Missing '.ConfigureAwait(false)' for async disposable in library code.

Missing '.ConfigureAwait(false)' in library code   New in this release

Missing '.ConfigureAwait(false)' in library code.

Move the shebang directive to the beginning of the file   New in this release

Move the shebang directive to the beginning of the file.

Multiple sequential 'OrderBy' invocation   New in this release

Multiple sequential 'OrderBy' invocation.

Non-accessed field (non-private accessibility)   New in this release

Non-accessed field (non-private accessibility).

Non-accessed field (private accessibility)   New in this release

Non-accessed field (private accessibility).

Non-accessed positional property (non-private accessibility)   New in this release

Non-accessed positional property (non-private accessibility).

Non-accessed positional property (private accessibility)   New in this release

Non-accessed positional property (private accessibility).

Non-public member in implementation class hides default implementation in interface   New in this release

Non-public member in implementation class hides default implementation in interface.

Non-readonly type member referenced in 'GetHashCode()'   New in this release

Non-readonly type member referenced in 'GetHashCode()'.

Nullability conflicts with annotations in hierarchy   New in this release

Nullability conflicts with annotations in hierarchy.

Nullable warning suppression operator might be confused with inverted 'is' expression   New in this release

Nullable warning suppression operator might be confused with inverted 'is' expression.

One way operations must not return values   New in this release

One way operations must not return values.

Operator 'is'/'Type Of ... Is ...' can be used   New in this release

Operator 'is'/'Type Of ..

Operator without matching checked operator   New in this release

Operator without matching checked operator.

Overridden GetHashCode calls base 'Object.GetHashCode()'   New in this release

Overridden GetHashCode calls base 'Object.GetHashCode()'.

Parameter hides member   New in this release

Parameter hides member.

Parameter hides primary constructor parameter   New in this release

Parameter hides primary constructor parameter.

Parameter name differs between partial member declarations   New in this release

Parameter name differs between partial member declarations.

Possible 'System.ArgumentOutOfRangeException'. Index must be a non-negative integer.   New in this release

Possible 'System.ArgumentOutOfRangeException'.

Possible 'System.ArgumentOutOfRangeException'. Start index must be less than or equal to end index.   New in this release

Possible 'System.ArgumentOutOfRangeException'.

Possible 'System.InvalidCastException'   New in this release

Possible 'System.InvalidCastException'.

Possible 'System.InvalidCastException' in foreach loop   New in this release

Possible 'System.InvalidCastException' in foreach loop.

Possible 'System.InvalidOperationException'   New in this release

Possible 'System.InvalidOperationException'.

Possible 'System.InvalidOperationException: Collection was modified'   New in this release

Possible 'System.InvalidOperationException: Collection was modified'.

Possible 'System.NullReferenceException'   New in this release

Possible 'System.NullReferenceException'.

Possible ambiguity while accessing member by interface   New in this release

Possible ambiguity while accessing member by interface.

Possible comparison of value type with 'null'   New in this release

Possible comparison of value type with 'null'.

Possible cyclic constructor call   New in this release

Possible cyclic constructor call.

Possible incorrect implementation of Double-Check Locking pattern. Possible multiple write access to checked field.   New in this release

Possible incorrect implementation of Double-Check Locking pattern.

Possible incorrect implementation of Double-Check Locking pattern. Read access to checked field.   New in this release

Possible incorrect implementation of Double-Check Locking pattern.

Possible infinite inheritance   New in this release

Possible infinite inheritance.

Possible loss of fraction   New in this release

Possible loss of fraction.

Possible mistaken 'GetType()' invocation   New in this release

Possible mistaken 'GetType()' invocation.

Possible mistaken argument of type 'System.Type'   New in this release

Possible mistaken argument of type 'System.Type'.

Possible multiple enumeration   New in this release

Possible multiple enumeration.

Possible overflow   New in this release

Possible overflow.

Possible overflow in checked context   New in this release

Possible overflow in checked context.

Possible overflow in unchecked context   New in this release

Possible overflow in unchecked context.

Possible unassigned object created by 'new' expression   New in this release

Possible unassigned object created by 'new' expression.

Possible unintended reference comparison  

Possible unintended reference comparison.

Possibly impure struct method is called on readonly variable: struct value always copied before invocation   New in this release

Possibly impure struct method is called on readonly variable: struct value always copied before invocation.

Possibly misleading 'DefaultValueAttribute' usage to define optional parameter value   New in this release

Possibly misleading 'DefaultValueAttribute' usage to define optional parameter value.

Possibly missing comma before indexer initializer   New in this release

Possibly missing comma before indexer initializer.

Possibly mistaken use of a 'CancellationToken'   New in this release

Possibly mistaken use of a 'CancellationToken'.

Possibly unintended linear search in set   New in this release

Possibly unintended linear search in set.

Possibly unintended modification inside conditional invocation   New in this release

Possibly unintended modification inside conditional invocation.

Possibly unintended string interpolation instead of format string template   New in this release

Possibly unintended string interpolation instead of format string template.

Possibly wrong string comparison: spans are only equal when pointing to the same memory location   New in this release

Possibly wrong string comparison: spans are only equal when pointing to the same memory location.

Potentially misleading parameter name in lambda or local function   New in this release

Potentially misleading parameter name in lambda or local function.

Prefer explicitly provided tuple component name   New in this release

Prefer explicitly provided tuple component name.

Primary constructor parameter capturing is disallowed   New in this release

Primary constructor parameter capturing is disallowed.

Return of a task produced by 'using'-captured object   New in this release

Return of a task produced by 'using'-captured object.

Return of a variable captured by 'using' statement   New in this release

Return of a variable captured by 'using' statement.

Return type of a function can be made non-nullable   New in this release

Return type of a function can be made non-nullable.

Return value of 'GetEnumerator' method call is never disposed   New in this release

Return value of 'GetEnumerator' method call is never disposed.

Return value of [MustUseReturnValue]-annotated method is not used   New in this release

Return value of [MustUseReturnValue]-annotated method is not used.

Return value of a method annotated with [MustDisposeResource] is never disposed   New in this release

Return value of a method annotated with [MustDisposeResource] is never disposed.

Return value of a property must be disposed by the callee   New in this release

Return value of a property must be disposed by the callee.

Return value of iterator is not used   New in this release

Return value of iterator is not used.

Return value of pure method is not used   New in this release

Return value of pure method is not used.

Return value should be disposed but the method or function is not annotated with [MustDisposeResource]   New in this release

Return value should be disposed but the method or function is not annotated with [MustDisposeResource].

Safe cast expression always succeeds   New in this release

Safe cast expression always succeeds.

Shift expression with zero left operand equals zero   New in this release

Shift expression with zero left operand equals zero.

Similar anonymous type detected nearby   New in this release

Similar anonymous type detected nearby.

Similar expressions comparison   New in this release

Similar expressions comparison.

Some values of the enum are not processed inside 'switch' expression and are handled via exception in default arm   New in this release

Some values of the enum are not processed inside 'switch' expression and are handled via exception in default arm.

Some values of the enum are not processed inside 'switch' statement   New in this release

Some values of the enum are not processed inside 'switch' statement.

Some values of the enum are not processed inside 'switch' statement and are handled via default section   New in this release

Some values of the enum are not processed inside 'switch' statement and are handled via default section.

Static field or auto-property in generic type   New in this release

Static field or auto-property in generic type.

Static member initializer refers to static member below or in other part   New in this release

Static member initializer refers to static member below or in other part.

String formatting method problems   New in this release

String formatting method problems.

Structured log message items are duplicated or differ only in case   New in this release

Structured log message items are duplicated or differ only in case.

Structured message template problems   New in this release

Structured message template problems.

Suspicious 'volatile' field usage: compound operation is not atomic. 'Interlocked' class can be used instead.   New in this release

Suspicious 'volatile' field usage: compound operation is not atomic.

Suspicious locking over synchronization primitive   New in this release

Suspicious locking over synchronization primitive.

Suspicious parameter name in ArgumentNullException   New in this release

Suspicious parameter name in ArgumentNullException.

Suspicious shift count for this type of left operand   New in this release

Suspicious shift count for this type of left operand.

Suspicious type conversion or check   New in this release

Suspicious type conversion or check.

Suspicious use of variable with discard-like name   New in this release

Suspicious use of variable with discard-like name.

Symbol from module that might be missing at runtime   New in this release

Symbol from module that might be missing at runtime.

Tail recursive call can be replaced with loop   New in this release

Tail recursive call can be replaced with loop.

The expression of 'is' operator is never of the provided type   New in this release

The expression of 'is' operator is never of the provided type.

The given expression of 'is' operator is always of the provided type   New in this release

The given expression of 'is' operator is always of the provided type.

The pattern is redundant, it does not produce any runtime checks   New in this release

The pattern is redundant, it does not produce any runtime checks.

The source expression always matches the provided pattern   New in this release

The source expression always matches the provided pattern.

The source expression never matches the provided pattern   New in this release

The source expression never matches the provided pattern.

Thread static field has initializer   New in this release

Thread static field has initializer.

Try cast and check for null can be replaced with a type check   New in this release

Try cast and check for null can be replaced with a type check.

Type check and casts can be merged   New in this release

Type check and casts can be merged.

Type pattern and casts can be merged   New in this release

Type pattern and casts can be merged.

Unassigned field (non-private accessibility)   New in this release

Unassigned field (non-private accessibility).

Unassigned field (private accessibility)   New in this release

Unassigned field (private accessibility).

Unassigned readonly field  

Unassigned readonly field.

Unidentified CQRS entity   New in this release

Unidentified CQRS entity.

Usage of <inheritdoc /> is invalid   New in this release

Usage of <inheritdoc /> is invalid.

Use <inheritdoc /> on root level to inherit documentation from base candidate   New in this release

Use <inheritdoc /> on root level to inherit documentation from base candidate.

Use collection's count property   New in this release

Use collection's count property.

Use format specifier in format strings   New in this release

Use format specifier in format strings.

Use format specifier in interpolated strings   New in this release

Use format specifier in interpolated strings.

Use null check instead of a type check succeeding on any not-null value   New in this release

Use null check instead of a type check succeeding on any not-null value.

Use null check pattern instead of a type check succeeding on any not-null value   New in this release

Use null check pattern instead of a type check succeeding on any not-null value.

Use nullable annotation instead of an attribute   New in this release

Use nullable annotation instead of an attribute.

Useless arithmetical operation   New in this release

Useless arithmetical operation.

Using stackalloc inside loop   New in this release

Using stackalloc inside loop.

Value assigned to a property of non-variable qualifier expression can be lost   New in this release

Value assigned to a property of non-variable qualifier expression can be lost.

Variable can be declared as non-nullable   New in this release

Variable can be declared as non-nullable.

Variable in local function hides variable from outer scope   New in this release

Variable in local function hides variable from outer scope.

Virtual member call in constructor   New in this release

Virtual member call in constructor.

Last modified: 21 August 2025