Code Inspections Reference
- Code Inspection: Redundant type specification in default expression
- Code Inspection: IQueryable is possibly unintentionally used as IEnumerable
- Code Inspection: Use preferred body style (convert to local function with preferred body style)
- Code Inspection: Use preferred body style (convert to constructor or destructor with preferred body style)
- Code Inspection: Use preferred body style (convert to property, indexer or event with preferred body style)
- Code Inspection: Use preferred body style (convert to method or operator with preferred body style)
- Code Inspection: Redundant lambda parameter explicit type specification
- Code Inspection: Redundant lambda signature parentheses
- Code Inspection: Empty 'for' loop is redundant
- Code Inspection: Empty statement is redundant
- Code Inspection: Redundant 'partial' modifier on method declaration
- Code Inspection: Redundant 'partial' modifier on type declaration
- Code Inspection: Redundant 'case' label
- Code Inspection: Parentheses are redundant if attribute has no arguments
- Code Inspection: Redundant member override
- Code Inspection: Parameter type can be IEnumerable<T> (non-private accessibility)
- Code Inspection: Convert delegate variable to local function
- Code Inspection: Join null check with assignment
- Code Inspection: Local function never used
- Code Inspection: Class is never instantiated (non-private accessibility)
- Code Inspection: EmptyDestructor
- Code Inspection: Use collection’s count property
- Code Inspection: Use object or collection initializer when possible
- Code Inspection: ASP.NET dead code
- Code Inspection: Using of coerced equality
- Code Inspection: Local variable has too wide declaration scope
- Code Inspection: Unused local variable
- Code Inspection: Virtual(overridable) member is never overridden (non-private accessibility)
- Code Inspection: Use 'nameof' expression to reference name
- Code Inspection: '??' condition is known to be always null or not null
- Code Inspection: For-loop can be converted into foreach-loop
- Code Inspection: Replace if statement with null-propagating code
- Code Inspection: Access specifier does not change accessibility level
- Code Inspection: Convert to lambda expression
- Code Inspection: Member with '[NotNull]' attribute is not initialized at constructor exit
- Code Inspection: Problem in contract annotation definition
- Code Inspection: Inconsistent synchronization on field
- Code Inspection: Collection's content is never queried (non-private accessibility)
- Code Inspection: Collection is never updated (non-private accessibility)
- Code Inspection: Collection's content is never queried (private accessibility)
- Code Inspection: Collection is never updated (private accessibility)
- Code Inspection: Access to disposed closure
- Code Inspection: '?:' expression can be re-written as '??' expression
- Code Inspection: 'if' statement can be re-written as '?:' expression
- Code Inspection: 'if' statement can be re-written as '??' expression
- Code Inspection: 'if-return' statement can be re-written as 'return' statement
- Code Inspection: 'value' parameter is not used
- Code Inspection: Access to a static member of a type via a derived type
- Code Inspection: Access to foreach variable in closure
- Code Inspection: Access to modified closure
- Code Inspection: Add parentheses to avoid non-obvious precedence
- Code Inspection: Add/remove 'this.' qualifier
- Code Inspection: Add/remove qualifier for static members
- Code Inspection: Adjust modifiers declaration order
- Code Inspection: Assignment in conditional expression
- Code Inspection: Assignment is not used
- Code Inspection: Assignment to a property of a readonly field can be useless
- Code Inspection: Auto-property can be made get-only (non-private accessibility)
- Code Inspection: Auto-property can be made get-only (private accessibility)
- Code Inspection: Base type is required
- Code Inspection: BaseTypeRequired attribute supports only classes and interfaces
- Code Inspection: Cannot resolve symbol in text argument
- Code Inspection: Co-variant array conversion
- Code Inspection: Compare of float numbers with equality operator
- Code Inspection: Compare with '==' types marked by 'CannotApplyEqualityOperatorAttribute'
- Code Inspection: Convert Nullable of T to 'T?'
- Code Inspection: Convert property to auto-property
- Code Inspection: Convert to property with expression body
- Code Inspection: Delegate subtractions
- Code Inspection: Double negation operator
- Code Inspection: Empty constructor
- Code Inspection: Empty control statement body
- Code Inspection: Empty general catch clause
- Code Inspection: Empty namespace declaration
- Code Inspection: Expression is always 'true' or always 'false'
- Code Inspection: Field can be made readonly (Private Accessibility)
- Code Inspection: Function never returns
- Code Inspection: Inconsistent Naming
- Code Inspection: Introduce optional parameters (private accessibility)
- Code Inspection: Invert 'if' statement to reduce nesting
- Code Inspection: Invocation of polymorphic field-like event
- Code Inspection: Iteration variable can be declared with a more specific type
- Code Inspection: Join local variable declaration and assignment
- Code Inspection: Join or separate attributes is section
- Code Inspection: Local variable hides member
- Code Inspection: Loop can be converted into LINQ-expression
- Code Inspection: Loop control variable is never changed inside loop
- Code Inspection: Make constructor in abstract class protected
- Code Inspection: Member can be made private (non-private accessibility)
- Code Inspection: Member can be made private (private accessibility)
- Code Inspection: Member can be made protected (non-private accessibility)
- Code Inspection: Member can be made protected (private accessibility)
- Code Inspection: Member can be made static (shared) (private accessibility)
- Code Inspection: Member hides static member from outer class
- Code Inspection: Member initialized value ignored
- Code Inspection: Merge conditional ?: expression into conditional access
- Code Inspection: Merge sequential checks in && or || expressions
- Code Inspection: Method invocation is skipped
- Code Inspection: Multiple nullable attributes usage
- Code Inspection: Namespace does not correspond to file location
- Code Inspection: Non-accessed field (Private accessibility)
- Code Inspection: Non-readonly type member referenced in 'GetHashCode()'
- Code Inspection: Nullable attribute usage with declaration having value or void type
- Code Inspection: Parameter hides member
- Code Inspection: Parameter type can be IEnumerable of T
- Code Inspection: Possible "System.InvalidOperationException"
- Code Inspection: Possible 'System.InvalidCastException' in foreach loop
- Code Inspection: Possible 'System.NullReferenceException'
- Code Inspection: Possible 'null' assignment to entity with '[NotNull]' attribute
- Code Inspection: Possible compare of value type with 'null'
- Code Inspection: Possible cyclic constructor call
- Code Inspection: Possible incorrect implementation of Double-Check Locking pattern. Possible multiple write access to checked field
- Code Inspection: Possible incorrect implementation of Double-Check Locking pattern. Read access to checked field
- Code Inspection: Possible infinite inheritance
- Code Inspection: Possible multiple enumeration of IEnumerable
- Code Inspection: Possible unintended reference comparison
- Code Inspection: Private field can be converted to local variable
- Code Inspection: Redundant 'else' keyword
- Code Inspection: Redundant catch clause
- Code Inspection: Redundant class or or interface specification in base types list
- Code Inspection: Redundant control flow jump statement
- Code Inspection: Redundant empty default switch branch
- Code Inspection: Redundant explicit array size specification in array creation
- Code Inspection: Redundant explicit type in array creation
- Code Inspection: Redundant member initializer
- Code Inspection: Redundant string.Format() call
- Code Inspection: Redundant using directive
- Code Inspection: Remove redundant parentheses
- Code Inspection: Replace built-in type reference with a CLR type name or a keyword
- Code Inspection: Return value of pure method is not used
- Code Inspection: Sealed member in sealed class
- Code Inspection: Simplify conditional ternary expression
- Code Inspection: Simplify negative equality expression
- Code Inspection: Specify string comparison explicitly
- Code Inspection: Specify string culture explicitly
- Code Inspection: Static member in generic type
- Code Inspection: Ternary expression has identical true and false branches
- Code Inspection: Thread static field has initializer
- Code Inspection: Type check and casts can be replaced with try cast
- Code Inspection: Type or member is never used (non-private accessibility)
- Code Inspection: Type or member is never used (private accessibility)
- Code Inspection: Underlying type of enum is 'int'
- Code Inspection: Use 'String.IsNullOrEmpty'
- Code Inspection: Use explicit or implicit modifier definition for type members
- Code Inspection: Use explicit or implicit modifier definition for types
- Code Inspection: Use method Any()
- Code Inspection: Use preferred 'var' style (elsewhere)
- Code Inspection: Use preferred 'var' style (for built-in types)
- Code Inspection: Use preferred 'var' style (when type is simple)
- Code Inspection: Use string interpolation expression
- Code Inspection: Virtual member call in constructor
- Code Inspection: [ThreadStatic] doesn't work with instance fields
Last modified: 11 October 2017