- A collection of 110+ analyzers and 150+ refactorings for C#, powered by Roslyn.
- Release Notes
- Refactorings can be enabled/disabled in Visual Studio options
- Visual Studio extension that contains both analyzers and refactorings.
- Visual Studio extension that contains only refactorings.
- NuGet package that contains only analyzers.
- RCS1001 - Add braces
- RCS1002 - Remove braces
- RCS1003 - Add braces to if-else
- RCS1004 - Remove braces from if-else
- RCS1005 - Simplify nested using statement
- RCS1006 - Merge else clause with nested if statement
- RCS1007 - Avoid embedded statement
- RCS1008 - Use explicit type instead of 'var' (when the type is not obvious)
- RCS1009 - Use explicit type instead of 'var' (foreach variable)
- RCS1010 - Use 'var' instead of explicit type (when the type is obvious)
- RCS1012 - Use explicit type instead of 'var' (even if the type is obvious)
- RCS1013 - Use predefined type
- RCS1014 - Avoid implicitly-typed array
- RCS1015 - Use 'nameof' operator
- RCS1016 - Use expression-bodied member
- RCS1017 - Avoid multiline expression body
- RCS1018 - Add default access modifier
- RCS1019 - Reorder modifiers
- RCS1020 - Simplify Nullable to T?
- RCS1021 - Simplify lambda expression
- RCS1022 - Simplify lambda expression parameter list
- RCS1023 - Format empty block
- RCS1024 - Format accessor list
- RCS1025 - Format each enum member on a separate line
- RCS1026 - Format each statement on a separate line
- RCS1027 - Format embedded statement on a separate line
- RCS1028 - Format switch section's statement on a separate line
- RCS1029 - Format binary operator on next line
- RCS1030 - Add empty line after embedded statement
- RCS1031 - Remove redundant braces
- RCS1032 - Remove redundant parentheses
- RCS1033 - Remove redundant boolean literal
- RCS1034 - Remove redundant 'sealed' modifier
- RCS1035 - Remove redundant comma in initializer
- RCS1036 - Remove redundant empty line
- RCS1037 - Remove trailing white-space
- RCS1038 - Remove empty statement
- RCS1039 - Remove empty attribute argument list
- RCS1040 - Remove empty else clause
- RCS1041 - Remove empty initializer
- RCS1042 - Remove enum default underlying type
- RCS1043 - Remove 'partial' modifier from type with a single part
- RCS1044 - Remove original exception from throw statement
- RCS1045 - Rename private field according to camel case with underscore
- RCS1046 - Asynchronous method name should end with 'Async'
- RCS1047 - Non-asynchronous method name should not end with 'Async'
- RCS1048 - Replace anonymous method with lambda expression
- RCS1049 - Simplify boolean comparison
- RCS1050 - Add constructor argument list
- RCS1051 - Wrap conditional expression condition in parentheses
- RCS1052 - Declare each attribute separately
- RCS1054 - Merge local declaration with return statement
- RCS1055 - Avoid semicolon at the end of declaration
- RCS1056 - Avoid usage of using alias directive
- RCS1057 - Add empty line between declarations
- RCS1058 - Simplify assignment expression
- RCS1059 - Avoid locking on publicly accessible instance
- RCS1060 - Declare each type in separate file
- RCS1061 - Merge if statement with nested if statement
- RCS1062 - Avoid interpolated string with no interpolation
- RCS1063 - Avoid usage of do statement to create an infinite loop
- RCS1064 - Avoid usage of for statement to create an infinite loop
- RCS1065 - Avoid usage of while statement to create an inifinite loop
- RCS1066 - Remove empty finally clause
- RCS1067 - Remove empty argument list
- RCS1068 - Simplify logical not expression
- RCS1069 - Remove unnecessary case label
- RCS1070 - Remove redundant default switch section
- RCS1071 - Remove redundant base constructor call
- RCS1072 - Remove empty namespace declaration
- RCS1073 - Replace if statement with return statement
- RCS1074 - Remove redundant constructor
- RCS1075 - Avoid empty catch clause that catches System.Exception
- RCS1076 - Format declaration braces
- RCS1077 - Simplify LINQ method chain
- RCS1078 - Replace string.Empty with ""
- RCS1079 - Throwing of new NotImplementedException
- RCS1080 - Replace 'Any' method with 'Count' or 'Length' property
- RCS1081 - Split variable declaration
- RCS1082 - Replace 'Count' method with 'Count' or 'Length' property
- RCS1083 - Replace 'Count' method with 'Any' method
- RCS1084 - Replace conditional expression with coalesce expression
- RCS1085 - Replace property with auto-implemented property
- RCS1086 - Use linefeed as newline
- RCS1087 - Use carriage return + linefeed as newline
- RCS1088 - Avoid usage of tab
- RCS1089 - Use postfix unary operator instead of assignment
- RCS1090 - Add 'ConfigureAwait(false)' to awaitable expression
- RCS1091 - Remove empty region
- RCS1092 - Add empty line after last statement in do statement
- RCS1093 - Remove file with no code
- RCS1094 - Declare using directive on top level
- RCS1095 - Use C# 6.0 dictionary initializer
- RCS1096 - Use bitwise operation instead of 'HasFlag' method
- RCS1097 - Remove redundant 'ToString' call
- RCS1098 - Avoid 'null' on the left side of a binary expression
- RCS1099 - Default label should be last label in switch section
- RCS1100 - Format documentation summary on a single line
- RCS1101 - Format documentation summary on multiple lines
- RCS1102 - Mark class as static
- RCS1103 - Simplify if-else statement
- RCS1104 - Simplify conditional expression
- RCS1105 - Merge interpolation into interpolated string
- RCS1106 - Remove empty destructor
- RCS1107 - Remove redundant 'ToCharArray' call
- RCS1108 - Add static modifier to all partial class declarations
- RCS1109 - Use 'Cast' method instead of 'Select' method
- RCS1110 - Declare type inside namespace
- RCS1111 - Add braces to switch section with multiple statements
- RCS1112 - Combine 'Enumerable.Where' method chain
- RCS1113 - Use 'string.IsNullOrEmpty' method
- RCS1114 - Remove redundant delegate creation
- Add boolean comparison
- Add braces
- Add braces to if-else
- Add braces to switch section
- Add braces to switch sections
- Add cast expression
- Add default value to parameter
- Add default value to return statement
- Add exception to documentation comment
- Add identifier to variable declaration
- Add parameter name to argument
- Add parameter name to parameter
- Add using directive
- Add using static directive
- Call 'ConfigureAwait(false)'
- Call 'To...' method
- Change explicit type to 'var'
- Change method return type to 'void'
- Change method/property/indexer type according to return expression
- Change method/property/indexer type according to yield return expression
- Change type according to expression
- Change 'var' to explicit type
- Check parameter for null
- Collapse to initalizer
- Comment out member
- Comment out statement
- Copy documentation comment from base member
- Create condition from boolean expression
- Duplicate argument
- Duplicate member
- Duplicate parameter
- Duplicate statement
- Expand assignment expression
- Expand coalesce expression
- Expand event
- Expand expression-bodied member
- Expand initializer
- Expand lambda expression body
- Expand property
- Expand property and add backing field
- Extract declaration from using statement
- Extract expression from condition
- Extract generic type
- Extract statement(s)
- Extract type declaration to a new file
- Format accessor braces
- Format argument list
- Format binary expression
- Format conditional expression
- Format expression chain
- Format initializer
- Format parameter list
- Generate base constructors
- Generate 'OnEvent' method
- Generate switch sections
- Initialize local with default value
- Inline method
- Insert string interpolation
- Introduce and initialize field
- Introduce and initialize property
- Introduce constructor
- Introduce field to lock on
- Make member abstract
- Mark all members as static
- Mark member as static
- Merge assignment expression with return statement
- Merge attributes
- Merge if statements
- Merge interpolation into interpolated string
- Merge local declarations
- Merge string literals
- Merge string literals into multiline string literal
- Negate binary expression
- Negate boolean literal
- Negate operator
- Notify property changed
- Parenthesize expression
- Promote local to parameter
- Remove all comments
- Remove all comments (except documentation comments)
- Remove all documentation comments
- Remove all member declarations
- Remove all preprocessor directives
- Remove all region directives
- Remove all statements
- Remove all switch sections
- Remove braces
- Remove braces from if-else
- Remove braces from switch section
- Remove braces from switch sections
- Remove comment
- Remove condition from last else clause
- Remove directive and related directives
- Remove empty lines
- Remove interpolation
- Remove member
- Remove member declarations above/below
- Remove parameter name from argument
- Remove parentheses
- Remove property initializer
- Remove region
- Remove statement
- Remove statements from switch sections
- Remove using alias directive
- Rename backing field according to property name
- Rename identifier according to type name
- Rename method according to type name
- Rename parameter according to its type name
- Rename property according to type name
- Replace "" with 'string.Empty'
- Replace anonymous method with lambda expression
- Replace 'Any/All' with 'All/Any'
- Replace as expression with cast expression
- Replace conditional expression with expression
- Replace conditional expression with if-else
- Replace constant with field
- Replace 'Count/Length' with 'Length/Count'
- Replace do statement with while statement
- Replace equals expression with string.Equals
- Replace equals expression with string.IsNullOrEmpty
- Replace equals expression with string.IsNullOrWhiteSpace
- Replace field with constant
- Replace for statement with foreach statement
- Replace foreach statement with for statement
- Replace 'HasFlag' with bitwise operation
- Replace if-else with conditional expression
- Replace if-else with switch statement
- Replace increment operator with decrement operator
- Replace interpolated string with interpolation expression
- Replace interpolated string with string literal
- Replace method invocation with '[]'
- Replace method with property
- Replace null literal expression with default expression
- Replace prefix operator to postfix operator
- Replace property with method
- Replace regular string literal with verbatim string literal
- Replace string literal with character literal
- Replace 'string.Empty' with ""
- Replace 'string.Format' with interpolated string
- Replace switch statement with if-else
- Replace verbatim string literal with regular string literal
- Replace verbatim string literal with regular string literals
- Replace while statement with do statement
- Reverse for loop
- Simplify lambda expression
- Split attributes
- Split variable declaration
- Swap expressions in binary expression
- Swap expressions in conditional expression
- Swap member declarations
- Swap statements in if-else
- Uncomment
- Use expression-bodied member
- Wrap in #if directive
- Wrap in condition
- Wrap in region
- Wrap in try-catch
- Wrap in using statement