Code Inspections Reference
- Code Inspection: Convert to lambda expression (when possible)
- Code Inspection: Member can be made static(shared) (non-private accessibility)
- Code Inspection: Field can be made readonly (non-private accessibility)
- Code Inspection: Replace built-in type reference with a CLR type name or a keyword in static member access expressions
- Code Inspection: Redundant fixed pointer declaration
- Code Inspection: Typo in markup text
- Code Inspection: Typo in markup attribute value
- Code Inspection: Typo in string literal
- Code Inspection: Typo in identifier
- Code Inspection: Typo in comment
- Code Inspection: Redundant argument with default value
- Code Inspection: Implicitly captured closure
- Code Inspection: Join or separate 'var' in deconstruction declarations
- Code Inspection: Use preferred 'var' style (in deconstruction declarations)
- Code Inspection: Use preferred style for discard declaration
- Code Inspection: Use preferred braces style (remove redundant braces)
- Code Inspection: Use preferred braces style (enforce braces in 'while' statement)
- Code Inspection: Use preferred braces style (enforce braces in 'using' statement)
- Code Inspection: Use preferred braces style (enforce braces in 'lock' statement)
- Code Inspection: Use preferred braces style (enforce braces in 'if' statement)
- Code Inspection: Use preferred braces style (enforce braces in 'foreach' statement)
- Code Inspection: Use preferred braces style (enforce braces in 'for' statement)
- Code Inspection: Use preferred braces style (enforce braces in 'fixed' statement)
- Code Inspection: Use preferred braces style (enforce braces in 'do-while' statement)
- Code Inspection: Use preferred argument style for string literal values
- Code Inspection: Use preferred argument style for named expressions
- Code Inspection: Use preferred argument style for literal values
- Code Inspection: Use preferred argument style for anonymous functions
- Code Inspection: Use preferred argument style
- Code Inspection: Incorrect spacing (around attributes)
- Code Inspection: Incorrect line breaks (around braces)
- Code Inspection: Incorrect indent (around switch statement)
- Code Inspection: Incorrect indent (line should be indented or outdented)
- Code Inspection: Incorrect indent (line indent should not be changed relative to the previous line)
- Code Inspection: Incorrect indent (tabs/spaces mismatch)
- Code Inspection: Incorrect indent (incorrect indent size)
- Code Inspection: Incorrect indent (line indent should be restored to the previous level)
- Code Inspection: Incorrect line breaks (line break is missing elsewhere)
- Code Inspection: Incorrect spacing (space is missing elsewhere)
- Code Inspection: Incorrect line breaks (line break is redundant elsewhere)
- Code Inspection: Incorrect spacing (space is redundant elsewhere)
- Code Inspection: Incorrect spacing (multiple spaces are prohibited)
- Code Inspection: Incorrect spacing (tabs are prohibited here)
- Code Inspection: Incorrect blank lines (blank lines are missing elsewhere)
- Code Inspection: Incorrect blank lines (blank lines are redundant elsewhere)
- Code Inspection: Separate control transfer statement with blank line
- Code Inspection: Unnecessary whitespace at the end of line
- Code Inspection: Usage of tabulation character for indentation is prohibited
- Code Inspection: Incorrect indent (around namespace braces)
- Code Inspection: Incorrect indent (around declaration braces)
- Code Inspection: Incorrect indent (around statement braces)
- Code Inspection: BadSwitchIndent
- Code Inspection: Incorrect indent (around expression braces)
- Code Inspection: Incorrect indent (around child statement)
- Code Inspection: Incorrect indent (around preprocessor directive)
- Code Inspection: Incorrect line breaks (multiple statements on one line)
- Code Inspection: Incorrect line breaks (multiple type members on one line)
- Code Inspection: BadDeclarationBracesLineBreaks
- Code Inspection: BadControlBracesLineBreaks
- Code Inspection: BadExpressionBracesLineBreaks
- Code Inspection: Incorrect line breaks (around empty braces)
- Code Inspection: Incorrect line breaks (around LINQ queries)
- Code Inspection: Incorrect line breaks (around parenthesis)
- Code Inspection: BadListLineBreaks
- Code Inspection: Incorrect spacing (between keyword and parenthesis)
- Code Inspection: Incorrect spacing (around comma)
- Code Inspection: Incorrect spacing (around semicolon)
- Code Inspection: Incorrect spacing (around operator symbols)
- Code Inspection: Incorrect spacing (around member access symbols)
- Code Inspection: Incorrect spacing (around colon)
- Code Inspection: Incorrect spacing (around parenthesis)
- Code Inspection: Incorrect spacing (around square brackets within a statement)
- Code Inspection: Incorrect spacing (around braces)
- Code Inspection: Incorrect spacing (around generic brackets)
- Code Inspection: BadAttributeSpaces
- Code Inspection: Incorrect blank lines (blank lines are redundant elsewhere)
- Code Inspection: String.StartsWith is culture-specific
- Code Inspection: String.LastIndexOf is culture-specific
- Code Inspection: String.LastIndexOf is culture-specific
- Code Inspection: String.LastIndexOf is culture-specific
- Code Inspection: String.IndexOf is culture-specific
- Code Inspection: String.IndexOf is culture-specific
- Code Inspection: String.IndexOf is culture-specific
- Code Inspection: String.EndsWith is culture-specific
- Code Inspection: String.Compare is culture-specific
- Code Inspection: String.Compare is culture-specific
- Code Inspection: String.Compare is culture-specific
- Code Inspection: String.Compare is culture-specific
- Code Inspection: String.Compare is culture-specific
- Code Inspection: String.Compare is culture-specific
- Code Inspection: String.CompareTo is culture-specific
- Code Inspection: Parameter name differs in partial method declaration
- Code Inspection: The given expression of 'is' operator is always of the provided type
- Code Inspection: Unused parameter in partial method
- Code Inspection: Safe cast expression always succeeds, consider direct cast instead
- Code Inspection: Return type can be IEnumerable<T> (private accessibility)
- Code Inspection: Return type can be IEnumerable<T> (non-private accessibility)
- Code Inspection: Redundant cast
- Code Inspection: Redundant operand in logical condition expression
- Code Inspection: Convert 'if' to '||'
- Code Inspection: Replace with single assignment
- Code Inspection: Replace with single assignment
- Code Inspection: Convert lambda expression to method group
- Code Inspection: Explicit delegate creation expression is redundant
- Code Inspection: Redundant name qualifier
- Code Inspection: Redundant lambda parameter explicit type specification
- 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 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: Convert to lambda expression
- Code Inspection: Virtual member call in constructor
Last modified: 21 December 2018