All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Fix RCS1084 (#1006).
- Fix RCS1244 (#1007).
- [CLI] Add nullable reference type modifier when creating a list of symbols (
list-symbols
command) (#1013). - Add/remove blank line after file scoped namespace declaration (RCS0060) (#1014).
- Do not remove overriding member in record (RCS1132) (#1015).
- Do not remove parameterless empty constructor in a struct with field initializers (RCS1074) (#1021).
- Do not suggest to use generic event handler (RCS1159) (#1022).
- Fix (RCS1077) (#1023).
- Add Arm64 VS 2022 extension support (#990 by @snickler).
- Add analyzer "Add/remove blank line after file scoped namespace declaration" (RCS0060) (#993).
- Required option:
roslynator_blank_line_after_file_scoped_namespace_declaration = true|false
- Not enabled by default.
- Required option:
- Add analyzer "Simplify argument null check" (RCS1255) (#994).
- Use
ArgumentNullException.ThrowIfNull
instead ofif
null check. - Not enabled by default.
- Use
- Add analyzer "Invalid argument null check" (RCS1256) (#888).
- This analyzer reports null checks of arguments that are:
- annotated as nullable reference type.
- optional and its default value is
null
.
- This analyzer reports null checks of arguments that are:
- Add package
Roslynator.Testing.CSharp.MSTest
(#997).
- Disable RCS1080 by default (#980).
- [CLI] Bump Roslyn to 4.4.0 (#998).
- [CLI] Add support for .NET 7 and remove support for .NET 5 (#985.
- Fix RCS1080 when collection is derived from
List<T>
(#986). - Fix retrieving of trusted platform assemblies - separator differs by OS (#987).
- Fix refactoring (RR0014) (#988).
- Fix refactoring (RR0180) (#988).
- Recognize
ArgumentNullException.ThrowIfNull
(RCS1227) (#992). - Detect pattern matching in RCS1146 (#999).
- Handle
using
directive that starts withglobal::
RCS0015 (#1000). - [VS Extension] Reference all assemblies as 'Analyzer' and 'MefComponent' in vsix manifest (#1002).
- Fixes
AD0001
withSystem.IO.FileNotFoundException
on Visual Studio 17.4 and later.
- Fixes
- Convert more syntax to implicit object creation (RCS1250) (#910).
- Add code fix for CS0037 (#929).
- [CLI] Generate reference documentation that can be published with Docusaurus (#918).
roslynator generate-doc --host docusaurus
- [CLI] Generate reference documentation that can be published with Sphinx (#961).
roslynator generate-doc --host sphinx
- [CLI] Basic support for
<inheritdoc />
when generating documentation (generate-doc
command) (#972). - [CLI] Add option
ignored-title-parts
(generate-doc
command) (#975). - Publish Roslynator to Open VSX Registry (#820).
- Rename default branch to
main
. - Format changelog according to 'Keep a Changelog' (#915).
- [CLI] Improve release build of command-line tool (#912).
- Do not sort properties in an initializer (RR0216).
- [CLI] Bump Roslyn to 4.3.1 (#969).
- [CLI] Bump Microsoft.Build.Locator to 1.5.5 (#969).
- [CLI] Fix filtering of projects (relates to
--projects
or--ignored-projects
parameter) (#914). - Refactoring "Add using directive" (RR0014) now works when file-scoped namespace is used (#932).
- Add parentheses if necessary in a code fix for RCS1197 (#928 by @karl-sjogren).
- Do not simplify default expression if it would change semantics (RCS1244) (#939.
- Fix NullReferenceException in RCS1198 (#940.
- Order named arguments even if optional arguments are not specified RCS1205 (#941, (#965.
- Prefix identifier with
@
if necessary (RCS1220) (#943. - Do not suggest to make local variable a const when it is used in ref extension method (RCS1118) (#948.
- Fix formatting of argument list (#952.
- Do not remove async/await when 'using declaration' is used (#953.
- Convert if-else to return statement when pattern matching is used (RCS1073) (#956.
- [CLI] Include compiler diagnostics in the xml output file of the
roslynator analyze
command (#964 by @PeterKaszab). - Do not simplify 'default' expression if the type is inferred (RCS1244) (#966.
- Use explicit type from lambda expression (RCS1008) (#967.
- Do not remove constructor if it is decorated with 'UsedImplicitlyAttribute' (RCS1074) (#968.
- Detect argument null check in the form of
ArgumentNullException.ThrowIfNull
(RR0025, RCS1227) (#974. - Do not make generic class static if it's inherited (RCS1102) (#978.
- Bug fixes
- Add analyzer RCS1254 (Normalize format of enum flag value)
- Add analyzer RCS1253 (Format documentation comment summary)
- Add analyzer RCS1252 (Normalize usage of infinite loop)
- Add analyzer RCS1251 (Remove unnecessary braces from record declaration)
- Add refactoring Deconstruct foreach variable (RR0217)
- Add code fix for CS8602, CS8604
- Add suggestion to call AddRange instead of Add (RCS1235)
- Put back refactoring "Split local declaration and assignment" (RR0194) (issue)
- Adopt activation events in VS Code extension (issue) (thanks to ProphetLamb)
- Fix: Get config value from global AnalyzerConfig if available (issue)
- Fix: Do not suggest using null-forgiving operator for parameter default value (CS8625)
- Fix: Check if equality operator is overloaded (RCS1171)
- Fix: Do not remove field initialization in struct with constructor(s) (RCS1129)
- Fixed release for VS Code
- Disable analyzer ROS003 by default (commit)
- Analyzers that require option to be set should disabled by default (RCS1018, RCS1096, RCS1250) (commit)
- Fix analyzer RCS1014 (Use explicitly/implicitly typed array) (commit)
- Fix analyzer RCS1016 (Use block body or expression body) (commit)
- Fix refactoring AddUsingDirective (RR0013) (commit)
- Propagate some options from .roslynatorconfig (commit)
- Enable ROS analyzers to be set from .roslynatorconfig (commit)
- Files generated with source generators have relative paths (commit)
- Bug fixes
-
Bump Roslyn version to 4.0.1
-
Change category of all analyzers to 'Roslynator'
-
Migrate all options to EditorConfig
- Enable/disable all analyzers
- Enable/disable all refactorings
- Enable/disable specific refactoring
- Enable/disable all compiler diagnostics fixes
- Enable/disable specific compiler diagnostic fix
-
Add analyzer RCS0057 (Normalize whitespace at the beginning of a file)
-
Add analyzer RCS0058 (Normalize whitespace at the end of a file)
-
Add analyzer RCS0059 (Place new line after/before null-conditional operator)
-
Add analyzer RCS1249 (Unnecessary null-forgiving operator)
-
Add analyzer RCS1250 (Use implicit/explicit object creation)
-
Add refactoring ExpandPositionalRecord (RR0215)
-
Add refactoring AddAllPropertiesToInitializer (RR0216)
-
Add code fix for CS8403, CS8618 and CS8625
- Bunch of bug fixes and small improvements
- Disable analyzers RCS1079 and RCS1090 by default
- Ensure that shared assemblies with be loaded properly on .NET Core (issue)
- Publish Roslynator for Visual Studio 2022 Preview
- Bug fixes and various improvements
- Publish Roslynator Testing Framework
- Support editorconfig to configure analyzer options (commit)
- Update references to Roslyn API to 3.8.0
- A bunch of bug fixes
- Add option to invert analyzer RCS1016 (commit)
- Add more cases to analyzer RCS1218 (commit)
- Convert
!= null
tois not null
(RCS1248) (commit)
- Add code fix for CS7036 (commit)
- Add code fix for CS8632 (commit)
- Improve code fix for CS0029, CS0246 (commit)
- Add option for code fix for CS1591 (commit)
- Add analyzer RCS0056 (Line is too long)
- Add option to suppress diagnostic from Unity script methods (RCS1213)
- Consider syntax
var foo = Foo.Parse(value)
as having obvious typeFoo
- Update references to Roslyn API to 3.7.0
-
Add analyzer RCS0055 (Fix formatting of a binary expression chain)
-
Add analyzer RCS0054 (Fix formatting of a call chain)
-
Add analyzer RCS0053 (Fix formatting of a list)
-
Add analyzer RCS0052 (Add newline before equals sign instead of after it (or vice versa))
-
Add analyzer RCS1248 (Use 'is null' pattern instead of comparison (or vice versa)) (issue)
-
Add analyzer RCS1247 (Fix documentation comment tag)
-
Add analyzer option RCS1207i (Convert method group to anonymous function)
-
Add analyzer option RCS1090i (Remove call to 'ConfigureAwait')
-
Add analyzer option RCS1018i (Remove accessibility modifiers) (issue)
-
Add analyzer option RCS1014i (Use implicitly typed array)
-
Add analyzer option RCS1014a (Use implicitly typed array (when type is obvious))
-
Add analyzer option RCS1078i (Use string.Empty instead of "")
-
Add analyzer option RCS1016a (Convert expression-body to block body when expression is multi-line)
-
Add analyzer option RCS1016b (Convert expression-body to block body when declaration is multi-line)
-
Disable by default analyzer RCS1207i (Convert method group to anonymous function)
-
Remove analyzer RCS1219 (Call 'Enumerable.Skip' and 'Enumerable.Any' instead of 'Enumerable.Count')
-
Rename analyzer "Avoid 'null' on left side of binary expression" to "Constant values should be placed on right side of comparisons" RCS1098
-
Rename analyzer "Simplify boolean expression" to "Unnecessary null check" RCS1199 (issue)
-
More syntax is considered as having obvious type:
- string literal
- character literal
- boolean literal
- implicit array creation that contains only expressions whose type is obvious
- Update references to Roslyn API to 3.5.0
- Release .NET Core Global Tool Roslynator.DotNet.Cli
- Introduce concept of "Analyzer Options"
- Reassign ID for some analyzers.
- Remove references to Roslynator assemblies from omnisharp.json on uninstall (VS Code)
- RCS0048 (Remove newlines from initializer with single-line expression).
- RCS0049 (Add empty line after top comment).
- RCS0050 (Add empty line before top declaration).
- RCS0051 (Add newline between closing brace and 'while' keyword (or vice versa)).
- RCS1246 (Use element access).
- RR0214 (Convert 'switch' expression to 'switch' statement).
- Switch to Roslyn 3.x libraries
- Add
Directory.Build.props
file - Add open configuration commands to Command Palette (VS Code) (PR)
- Fix key duplication/handle camel case names in
omnisharp.json
(PR) - Use prefix unary operator instead of postfix unary operator (RCS1089) (issue)
- Cast of
this
to its interface cannot be null (RCS1202) (issue) - Do not remove braces in switch section if it contains 'using variable' (RCS1031) (issue)
- RCS1242 (DoNotPassNonReadOnlyStructByReadOnlyReference).
- RCS1243 (DuplicateWordInComment).
- RCS1244 (SimplifyDefaultExpression).
- RCS1245 (SimplifyConditionalExpression2) (issue).
- Disable analyzer RCS1057 by default (issue).
- Merge analyzer RCS1156 with RCS1113 (issue).
x == ""
should be replaced withstring.IsNullOrEmpty(x)
- Improve analyzer RCS1215 (commit).
x == double.NaN
should be replaced withdouble.IsNaN(x)
- Enable RCS1169 and RCS1170 if the type is read-only struct (commit).
- Improve analyzer RCS1077 (commit).
x.OrderBy(y => y).Reverse()
can be simplified tox.OrderByDescending(y => y)
x.SelectMany(y => y).Count()
can be simplified tox.Sum(y => y.Count)
ifx
hasCount
orLength
property
- Improve analyzer RCS1161 - Declare explicit enum value using
<<
operator (commit). - Improve analyzer RCS1036 - remove empty line between documentation comment and declaration (commit).
- Improve analyzer RCS1037 - remove trailing white-space from documentation comment (commit).
- Improve analyzer RCS1143 (commit)
x?.M() ?? default(int?)
can be simplified tox?.M()
ifx
is a nullable struct.
- Improve analyzer RCS1206 (commit)
(x != null) ? x.M() : default(int?)
can be simplified tox?.M()
ifx
is a nullable struct.
- Last release of package Roslynator.Analyzers (2.3.0) that references Roslyn 2.x (VS 2017)
- Last release of Roslynator for VS 2017
- Automatically update configuration in omnisharp.json (VS Code) (PR).
- Add set of formatting analyzers (RCS0...).
- Enable configuration for non-Windows systems (VS Code).
- Disable analyzer RCS1029 (FormatBinaryOperatorOnNextLine) by default.
- Initial release of Roslynator for VS Code.
- Publish package Roslynator.CodeAnalysis.Analyzers 1.0.0-beta
- Add analyzer RCS1236 (UseExceptionFilter).
- Add analyzer RCS1237 (UseBitShiftOperator).
- Add analyzer RCS1238 (AvoidNestedConditionalOperators).
- Add analyzer RCS1239 (UseForStatementInsteadOfWhileStatement).
- Add analyzer RCS1240 (UnnecessaryOperator).
- Add analyzer RCS1241 (ImplementNonGenericCounterpart).
- Add refactoring RR0213 (AddParameterToInterfaceMember)
- Add analyzer RCS1235 (OptimizeMethodCall).
- Enable by default analyzer RCS1023 (FormatEmptyBlock) and change default severity to 'Hidden'.
- Change default severity of analyzer RCS1168 (ParameterNameDiffersFromBaseName) to 'Hidden'.
- Add refactoring RR0212 (DuplicateSwitchSection)
- Export/import Visual Studio options.
- Disable analyzer RCS1231 (MakeParameterRefReadOnly) by default.
- Add code fixes for CS0191, CS0192, CS1012.
- First release of Roslynator 2019 (for Visual Studio 2019)
- Support global suppression of diagnostics.
- Go to Visual Studio Tools > Options > Roslynator > Global Suppressions
- Add analyzer RCS1232 (OrderElementsInDocumentationComment)
- Add analyzer RCS1233 (UseShortCircuitingOperator)
- Add analyzer RCS1234 (DuplicateEnumValue)
- Refactoring RR0120 (ReplaceConditionalExpressionWithIfElse) can be applied recursively.
- Add refactoring RR0022 (ChangeTypeAccordingToExpression)
- Add refactoring RR0210 (ImplementCustomEnumerator)
- Add refactoring RR0211 (ConvertStatementsToIfElse)
- Add code fix for CS0029, CS0131, CS0621, CS3000, CS3001, CS3002, CS3003, CS3005, CS3006, CS3007, CS3008, CS3009, CS3016, CS3024, CS3027.
- Add nuget package Roslynator.CommandLine
- Change default severity of RCS1141, RCS1142 and RCS1165 to 'Hidden'
- Disable RCS1174 by default
- Improve analyzer RCS1128 -
x.GetValueOrDefault(y)
can be replaced withx ?? y
- Change code fix for RCS1194 - do not generate "serialization" constructor
- Add refactoring RR0209 (RemoveAsyncAwait)
- Add code fix for CS0119.
- Add analyzer RCS1228 (UnusedElementInDocumentationComment)
- Add analyzer RCS1229 (UseAsyncAwait)
- Add code fix for analyzer RCS1163 (UnusedParameter)
- Add refactoring RR0208 (AddTagToDocumentationComment)
- Add code fixes for CS8050 and CS8139.
- Add analyzer RCS1227 (ValidateArgumentsCorrectly)
- Add refactoring RR0206 (ReplaceForEachWithEnumerator)
- Add refactoring RR0207 (SortCaseLabels)
- Enable refactorings RR0037 (ExpandExpressionBody) and RR0169 (UseExpressionBodiedMember) for multiple members.
- Extend refactoring RR0189 (ReduceIfNesting) and rename it to InvertIf.
- Add analyzer RCS1223 (MarkTypeWithDebuggerDisplayAttribute)
- Add analyzer RCS1224 (MakeMethodExtensionMethod)
- Add analyzer RCS1225 (MakeSealedClass)
- Add analyzer RCS1226 (AddParagraphToDocumentationComment)
- Improve analyzer RCS1146 (UseConditionalAccess)
x == null || x.y
can be simplified tox?.y != false
x == null || !x.y
can be simplified tox?.y != true
- Improve refactoring RR0051 (FormatExpressionChain)
- A chain that contains conditional access (
x?.y
) will be properly formatted.
- A chain that contains conditional access (
- Add analyzer RCS1220 (UsePatternMatchingInsteadOfIsAndCast)
- Add analyzer RCS1221 (UsePatternMatchingInsteadOfAsAndNullCheck)
- Add analyzer RCS1222 (MergePreprocessorDirectives)
- Add code fixes for CS0136, CS0210, CS1003, CS1624, and CS1983.
- Add analyzer RCS1218 (SimplifyCodeBranching)
- Add analyzer RCS1219 (CallSkipAndAnyInsteadOfCount) (split from RCS1083)
- Add refactoring RR0202 (MoveUnsafeContextToContainingDeclaration)
- Add refactoring RR0203 (ExtractEventHandlerMethod)
- Add refactoring RR0204 (GeneratePropertyForDebuggerDisplayAttribute)
- Add refactoring RR0205 (AddEmptyLineBetweenDeclarations)
- Add code fixes for CS0152, CS0238, CS0524, CS0525, CS0549, CS0567, CS0568, CS0574, CS0575, CS0714, CS1737, CS1743, CS8340.
- RCS1008: disabled by default
- RCS1009: disabled by default
- RCS1010: disabled by default
- RCS1035: disabled by default
- RCS1040: enabled by default
- RCS1073: enabled by default
- RCS1017: from Warning to Info
- RCS1026: from Warning to Info
- RCS1027: from Warning to Info
- RCS1028: from Warning to Info
- RCS1030: from Warning to Info
- RCS1044: from Info to Warning
- RCS1045: from Warning to Info
- RCS1055: from Info to Hidden
- RCS1056: from Warning to Info
- RCS1073: from Hidden to Info
- RCS1076: from Info to Hidden
- RCS1081: from Warning to Info
- RCS1086: from Warning to Info
- RCS1087: from Warning to Info
- RCS1088: from Warning to Info
- RCS1094: from Warning to Info
- RCS1110: from Warning to Info
- RCS1182: from Info to Hidden
- Add analyzer RCS1217 (ReplaceInterpolatedStringWithStringConcatenation).
- Add refactoring RR0201 (ReplaceInterpolatedStringWithStringFormat).
- Add analyzer RCS1216 (UnnecessaryUnsafeContext).
- Improve analyzer RCS1181 (ReplaceCommentWithDocumentationComment) - support trailing comment.
- Rename analyzer AddBraces to AddBracesWhenExpressionSpansOverMultipleLines (RCS1001).
- Rename analyzer AddBracesToIfElse to AddBracesToIfElseWhenExpressionSpansOverMultipleLines (RCS1003).
- Rename analyzer AvoidEmbeddedStatement to AddBraces (RCS1007).
- Rename analyzer AvoidEmbeddedStatementInIfElse to AddBracesToIfElse (RCS1126).
- Add refactoring RR0200 (UncommentMultilineComment).
- Add support for 'private protected' accessibility.
- Do not report unused parameter (RCS1163) when parameter name consists of underscore(s).
- Add refactoring RR0198 (InlineProperty).
- Add refactoring RR0199 (RemoveEnumMemberValue).
- Remove, duplicate or comment out local function.
- Change accessibility for selected members.
- Add code fixes for CS0029, CS0133, CS0201, CS0501, CS0527.
- Add analyzer RCS1214 (AvoidInterpolatedStringWithNoInterpolatedText).
- Add analyzer RCS1215 (ExpressionIsAlwaysEqualToTrueOrFalse).
- Add refactoring RR0197 (InitializeFieldFromConstructor).
- Add code fixes for CS1503, CS1751.
- Add analyzer RCS1213 (UnusedMemberDeclaration).
- Improve analyzer RCS1163 (UnusedParameter)
- Report unused parameters of lambda expressions and anonymous methods.
- Add code fixes for CS0030, CS1597.
Add code fix for CS1031 and CS8112.
- Add refactoring RR0193 (ReplaceInterpolatedStringWithConcatenation).
- Add refactoring RR0194 (SplitDeclarationAndInitialization).
- Add code fixes for CS0246.
- Add analyzer RCS1212 (RemoveRedundantAssignment).
- Add refactoring RR0192 (ReplaceCommentWithDocumentationComment).
- Add code fixes for CS0216, CS0659, CS0660, CS0661 and CS1526.
- Add analyzer RCS1210 (ReturnTaskInsteadOfNull).
- Add analyzer RCS1211 (RemoveUnnecessaryElseClause).
- Remove analyzer RCS1022 (SimplifyLambdaExpressionParameterList).
- Replace refactoring RR0019 (ChangeMemberTypeAccordingToReturnExpression) with code fix.
- Replace refactoring RR0020 (ChangeMemberTypeAccordingToYieldReturnExpression) with code fix.
- Replace refactoring RR0008 (AddDefaultValueToReturnStatement) with code fix.
- Add code fix for CS0126, CS0139, CS0713 and CS1750.
- Add code fixes for CS0103, CS0192, CS0403 and CS0541.
- Bug fixes.
- Remove analyzer RCS1095 (UseCSharp6DictionaryInitializer)
- RR0191 (UseCSharp6DictionaryInitializer)
- RR0190 (ReplaceIfElseWithIfReturn)
- Add code fix for CS0021.
- RCS1209 (ReorderTypeParameterConstraints)
- Add code fixes for CS0077, CS0201, CS0472, CS1623.
- RCS1208 (ReduceIfNesting)
- RR0189 (ReduceIfNesting)
- Improve code fixes for CS0162, CS1061.
- Add code fix for analyzer RCS1168 (ParameterNameDiffersFromBase)
- RCS1203 (UseAttributeUsageAttribute)
- RCS1204 (UseEventArgsEmpty)
- RCS1205 (ReorderNamedArguments)
- RCS1206 (UseConditionalAccessInsteadOfConditionalExpression)
- RCS1207 (UseMethodGroupInsteadOfAnonymousFunction)
- New code fixes for CS0139, CS0266, CS0592, CS1689.
- RCS1199 (SimplifyBooleanExpression)
- RCS1200 (CallThenByInsteadOfOrderBy)
- RCS1201 (UseMethodChaining)
- RCS1202 (UseConditionalAccessToAvoidNullReferenceException)
- New code fixes for CS0115, CS1106, CS1621, CS1988.
- RR0073 (MarkContainingClassAsAbstract) has been replaced with code fix.
Code fixes has been added for the following compiler diagnostics:
- NamespaceAlreadyContainsDefinition (CS0101)
- TypeAlreadyContainsDefinition (CS0102)
- TypeOfConditionalExpressionCannotBeDetermined (CS0173)
- OutParameterMustBeAssignedToBeforeControlLeavesCurrentMethod (CS0177)
- NewConstraintMustBeLastConstraintSpecified (CS0401)
- DuplicateConstraintForTypeParameter (CS0405)
- ConstraintClauseHasAlreadyBeenSpecified (CS0409)
- ClassOrStructConstraintMustComeBeforeAnyOtherConstraints (CS0449)
- CannotSpecifyBothConstraintClassAndClassOrStructConstraint (CS0450)
- NewConstraintCannotBeUsedWithStructConstraint (CS0451)
- TypeParameterHasSameNameAsTypeParameterFromOuterType (CS0693)
- StaticTypesCannotBeUsedAsTypeArguments (CS0718)
- PartialMethodCannotHaveAccessModifiersOrVirtualAbstractOverrideNewSealedOrExternModifiers (CS0750)
- NoDefiningDeclarationFoundForImplementingDeclarationOfPartialMethod (CS0759)
- PartialMethodsMustHaveVoidReturnType (CS0766)
- MethodHasParameterModifierThisWhichIsNotOnFirstParameter (CS1100)
- ExtensionMethodMustBeStatic (CS1105)
- ElementsDefinedInNamespaceCannotBeExplicitlyDeclaredAsPrivateProtectedOrProtectedInternal (CS1527)
- AsyncModifierCanOnlyBeUsedInMethodsThatHaveBody (CS1994)
- Add code fixes that fix 80+ compiler diagnostics (like 'CS0001')
-
Following analyzers have been replaced with code fixes:
- RCS1115 (ReplaceReturnStatementWithExpressionStatement)
- RCS1116 (AddBreakStatementToSwitchSection)
- RCS1117 (AddReturnStatementThatReturnsDefaultValue)
- RCS1122 (AddMissingSemicolon)
- RCS1125 (MarkMemberAsStatic)
- RCS1131 (ReplaceReturnWithYieldReturn)
- RCS1137 (AddDocumentationComment)
- RCS1144 (MarkContainingClassAsAbstract)
- RCS1147 (RemoveInapplicableModifier)
- RCS1148 (RemoveUnreachableCode)
- RCS1149 (RemoveImplementationFromAbstractMember)
- RCS1152 (MemberTypeMustMatchOverriddenMemberType)
- RCS1176 (OverridingMemberCannotChangeAccessModifiers)
-
Following refactorings have been replaced with code fixes:
- RR0186 (ChangeAccessibility)
- RCS1192 (UseRegularStringLiteralInsteadOfVerbatimStringLiteral)
- RCS1193 (OverridingMemberCannotChangeParamsModifier)
- RCS1194 (ImplementExceptionConstructors)
- RCS1195 (UseExclusiveOrOperator)
- RCS1196 (CallExtensionMethodAsInstanceMethod)
- RR0183 (UseListInsteadOfYield)
- RR0184 (SplitIfStatement)
- RR0185 (ReplaceObjectCreationWithDefaultValue)
- RCS1191 (DeclareEnumValueAsCombinationOfNames)
- RCS1190 (MergeStringExpressions)
- RCS1189 (AddOrRemoveRegionName)
- RCS1188 (RemoveRedundantAutoPropertyInitialization)
- RCS1187 (MarkFieldAsConst)
- RCS1186 (UseRegexInstanceInsteadOfStaticMethod)
- Delete analyzer RCS1054 (MergeLocalDeclarationWithReturnStatement) - Its functionality is incorporated into analyzer RCS1124 (InlineLocalVariable).
- Disable analyzer RCS1024 (FormatAccessorList) by default.
- Disable analyzer RCS1023 (FormatEmptyBlock) by default.
- Modify analyzer RCS1091 (RemoveEmptyRegion) - Change default severity from Info to Hidden.
- Modify analyzer RCS1157 (CompositeEnumValueContainsUndefinedFlag) - Change default severity from Warning to Info.
- Modify analyzer RCS1032 (RemoveRedundantParentheses) - Exclude following syntaxes from analyzer:
- AssignmentExpression.Right
- ForEachExpression.Expression
- EqualsValueClause.Value
- Modify refactoring RR0024 (CheckExpressionForNull) - Do not add empty line.
- A lot of bug fixes and improvements.
- Improve analyzer RCS1147 (RemoveInapplicableModifier) - Analyze local function.
- Improve analyzer RCS1077 (SimplifyMethodChain) - Merge combination of Where and Any.
- Improve analyzer RCS1158 (StaticMemberInGenericTypeShouldUseTypeParameter) - Member must be public, internal or protected internal.
- RCS1178 (CallDebugFailInsteadOfDebugAssert)
- RCS1179 (UseReturnInsteadOfAssignment)
- RCS1180 (InlineLazyInitialization)
- RCS1181 (ReplaceCommentWithDocumentationComment)
- RCS1182 (RemoveRedundantBaseInterface)
- RCS1183 (FormatInitializerWithSingleExpressionOnSingleLine)
- RCS1184 (FormatConditionalExpression)
- RCS1185 (AvoidSingleLineBlock)
- Add support for configuration file.
- Disable RCS1176 (UseVarInsteadOfExplicitTypeWhenTypeIsNotObvious) by default.
- Disable RCS1177 (UseVarInsteadOfExplicitTypeInForEach) by default.
- Filter list of refactorings in options.
- Bug fixes.
- Change default severity of RCS1140 (AddExceptionToDocumentationComment) from Warning to Hidden.
- Change default severity of RCS1161 (EnumMemberShouldDeclareExplicitValue) from Warning to Hidden.
- RCS1176 (UseVarInsteadOfExplicitTypeWhenTypeIsNotObvious)
- RCS1177 (UseVarInsteadOfExplicitTypeInForEach)
- RR0180 (InlineUsingStatic)
- Bug fixes.
- Improved options page with a list of refactorings.
- Refactorings are displayed in WPF control instead of property grid.
- Each refactoring has an identifier 'RR....' to avoid confusion with analyzers.
- UnusedThisParameter
- ImplementIEquatableOfT
- AddTypeParameter
- SimplifyLazilyInitializedProperty
- UseIsOperatorInsteadOfAsOperator
- UseCoalesceOperatorInsteadOfIf
- RemoveRedundantAsyncAwait
- ReplaceHexadecimalLiteralWithDecimalLiteral
- WrapInElseClause
- Analyzer RemoveRedundantBraces was deleted.
- MarkFieldAsReadOnly
- UseReadOnlyAutoProperty
- ParameterNameDiffersFromBase
- OverridingMemberCannotChangeAccessModifiers
- ValueTypeCheckedForNull
- UnconstrainedTypeParameterCheckedForNull
- UnusedTypeParameter
- UnusedParameter
- SortEnumMembers
- UseStringComparison
- UseStringLengthInsteadOfComparisonWithEmptyString
- CompositeEnumValueContainsUndefinedFlag
- AvoidStaticMembersInGenericTypes
- UseGenericEventHandler
- AbstractTypeShouldNotHavePublicConstructors
- EnumMemberShouldDeclareExplicitValue
- AvoidChainOfAssignments
- ReplaceExpressionWithConstantValue
- SimplifyCoalesceExpression
- MarkContainingClassAsAbstract
- RemoveRedundantAsOperator
- UseConditionalAccess
- RemoveInapplicableModifier
- RemoveUnreachableCode
- RemoveImplementationFromAbstractMember
- CallStringConcatInsteadOfStringJoin
- RemoveRedundantCast
- MemberTypeMustMatchOverriddenMemberType
- AddEmptyLineAfterClosingBrace
- SortMemberDeclarations
- ReplaceWhileWithFor
- GenerateEnumValues
- GenerateEnumMember
- GenerateCombinedEnumMember
- BitwiseOperatorOnEnumWithoutFlagsAttribute
- ReplaceReturnWithYieldReturn
- RemoveRedundantOverriddenMember
- RemoveRedundantDisposeOrCloseCall
- RemoveRedundantContinueStatement
- DeclareEnumMemberWithZeroValue
- MergeSwitchSectionsWithEquivalentContent
- AddDocumentationComment
- AddSummaryToDocumentationComment
- AddSummaryElementToDocumentationComment
- AddExceptionToDocumentationComment
- AddParameterToDocumentationComment
- AddTypeParameterToDocumentationComment
- ReplaceReturnStatementWithExpressionStatement
- AddBreakStatementToSwitchSection
- AddReturnStatementThatReturnsDefaultValue
- MarkLocalVariableAsConst
- CallFindMethodInsteadOfFirstOrDefaultMethod
- UseElementAccessInsteadOfElementAt
- UseElementAccessInsteadOfFirst
- AddMissingSemicolon
- AddParenthesesAccordingToOperatorPrecedence
- InlineLocalVariable
- MarkMemberAsStatic
- AvoidEmbeddedStatementInIfElse
- MergeLocalDeclarationWithInitialization
- UseCoalesceExpression
- RemoveRedundantFieldInitialization
- Release of package Roslynator.Analyzers 1.2.0
- Release of package CSharpAnalyzers 1.2.0
- Initial release of Roslynator 2017 and Roslynator Refactorings 2017
- MergeStringExpressions
- ReplaceForWithWhile
- MarkContainingClassAsAbstract
- MakeMemberVirtual
- ReplaceStatementWithIfStatement
- NegateIsExpression
- ReplaceCastWithAs
- SplitSwitchLabels
- CheckExpressionForNull
- CallExtensionMethodAsInstanceMethod
- ReplaceMethodGroupWithLambda
- ReplaceIfStatementWithReturnStatement
- IntroduceLocalFromExpressionStatementThatReturnsValue
- CombineEnumerableWhereMethodChain
- UseStringIsNullOrEmptyMethod
- RemoveRedundantDelegateCreation
- AddExceptionToDocumentationComment
- ReplaceNullLiteralExpressionWithDefaultExpression
- RemoveEmptyDestructor
- RemoveRedundantStringToCharArrayCall
- AddStaticModifierToAllPartialClassDeclarations
- UseCastMethodInsteadOfSelectMethod
- DeclareTypeInsideNamespace
- AddBracesToSwitchSectionWithMultipleStatements
- ReplaceEqualsExpressionWithStringIsNullOrEmpty
- ReplaceEqualsExpressionWithStringIsNullOrWhiteSpace
- FormatDocumentationSummaryOnSingleLine
- FormatDocumentationSummaryOnMultipleLines
- MarkClassAsStatic
- SimplifyIfElseStatement
- SimplifyConditionalExpression
- MergeInterpolationIntoInterpolatedString
- MergeInterpolationIntoInterpolatedString
- RemoveRedundantToStringCall
- AvoidNullLiteralExpressionOnLeftSideOfBinaryExpression
- DefaultLabelShouldBeLastLabelInSwitchSection
- IntroduceFieldToLockOn
- UseCSharp6DictionaryInitializer
- UseBitwiseOperationInsteadOfHasFlagMethod
- CopyDocumentationCommentFromBaseMember
- RemoveFileWithNoCode
- DeclareUsingDirectiveOnTopLevel
- RemoveRegion
- ReplaceAsWithCast
- ReplaceEqualsExpressionWithStringEquals
- RemoveUsingAliasDirective
- ReplaceInterpolatedStringWithInterpolationExpression
- AddEmptyLineAfterLastStatementInDoStatement
- ReplaceIfElseWithSwitch
- RemoveAllPreprocessorDirectives
- AddToMethodInvocation
- RemoveEmptyRegion
- GenerateOnEventMethod
- InlineMethod - void method with multiple statements can be inlined.
- CheckParameterForNull - refactoring can be applied to multiple parameters at once.
- AddBraces - braces can be added to if statement in last else-if.
- GenerateBaseConstructors
- PromoteLocalToParameter
- RemoveInterpolation
- UsePostfixUnaryOperatorInsteadOfAssignment
- AddConfigureAwait
- UseLinefeedAsNewline
- UseCarriageReturnAndLinefeedAsNewline
- AvoidUsageOfTab
- ReplaceMethodWithProperty and ReplacePropertyWithMethod refactorings significantly improved.
- ExtractTypeDeclarationToNewFile
- MergeLocalDeclarations
- Entire project was renamed to Roslynator
- Visual Studio extension C# Analyzers and Refactorings was renamed to Roslynator
- Visual Studio extension C# Refactorings was renamed to Roslynator Refactorings
- Some assemblies were renamed. As a result ruleset files must be updated in a following way:
- replace <Rules AnalyzerId="Pihrtsoft.CodeAnalysis.CSharp" RuleNamespace="Pihrtsoft.CodeAnalysis.CSharp">
- with <Rules AnalyzerId="Roslynator.CSharp.Analyzers" RuleNamespace="Roslynator.CSharp.Analyzers">
- "DeclareEachTypeInSeparateFile" has code fix.
- "ReplacePropertyWithAutoProperty" - property and field must be of equal type.
- "InsertInterpolation" - '{' and '}' are escaped by doubling when creating interpolated string from string literal.
- "UseExplicitTypeInsteadOfVar" and "UseVarInsteadOfExplicitType" allow 'var' for enum member expression.
- "AddDefaultAccessModifier" works with partial classes.
- "AvoidUsageOfUsingAliasDirective" has code fix.
- ReplaceIfElseWithConditionalExpression
- ReplaceConditionalExpressionWithExpression
- "RemoveRedundantEmptyLine" analyzer - empty line is allowed when it is last line in 'do' statement's body (when 'while' token is on the same line as closing brace)
- "UseExplicitTypeInsteadOfVar" and "UseVarInsteadOfExplicitType" analyzers - 'var' is allowed for 'default(T)' expression
- MergeAssignmentExpressionWithReturnStatement
- CollapseToInitializer
- IntroduceAndInitializeField
- IntroduceAndInitializeProperty
- AddRegion
- AddIfDirective
- RemoveAllStatements
- RemoveAllMembers
- AddUsingDirective
- MergeIfStatements
- AddDefaultValueToReturnStatement
- InlineMethod
- AddExpressionFromIfStatement
- RemoveAllSwitchSections
- RemoveStatementsFromSwitchSections
- AddConfigureAwait
- RemovePreprocessorDirectiveAndRelatedDirectives
- ReplaceReturnStatementWithIfStatement
- WrapStatementsInTryCatch
- WrapStatementsInIfStatement
- RemoveMemberDeclarations
- AddIdentifierToVariableDeclaration
- RemoveEmptyLines
- CommentOutMember
- CommentOutStatement
- InitializerLocalWithDefaultValue
- AddDefaultValueToParameter
- refactoring "ChangeTypeAccordingToExpression" works for field declaration
- refactoring "AddCastExpression" works for case label expression
- refactoring "FormatExpressionChain" does not format namespace
- refactoring "ReplacePropertyWithMethod" works for property with setter
- refactoring "ReverseForLoop" works for reversed for loop
- RemoveConditionFromLastElseIf
- RemoveAllXmlComments
- RemoveStatement
- DuplicateStatement
- ReplaceAnonymousMethodWithLambdaExpression
- SplitVariableDeclaration
- ReplaceCountWithLengthOrLengthWithCount
- ChangeMethodReturnTypeToVoid
- refactoring is available only when method body contains at least one statement
- refactoring is not available for async method that returns Task
- IntroduceUsingStaticDirective
- refactoring is available only when class name is selected
- ReplaceDoStatementWithWhileStatement
- ReplaceWhileStatementWithDoStatement
- IntroduceUsingStaticDirective
- ChangeMethodReturnTypeToVoid
- ReplaceEnumHasFlagWithBitwiseOperation
- refactoring "FormatBinaryExpression" is available for bitwise and/or expressions.
- refactorings for argument and argument list are also available for attribute argument and attribute argument list.
- refactorings "RemoveComment" and "RemoveAllComments" are available at comment inside trivia.
- refactoring "AddCastExpressionToArgument" handles properly params parameter.
- refactoring "ExpandPropertyAndAddBackingField" handles properly read-only auto-property.
- many analyzers renamed
- developmentDependency element added to CSharpAnalyzers.nuspec
- AddInterpolation
- SimplifyLambdaExpression
- refactorings can be enabled/disabled in Visual Studio UI (Tools - Options)
- some refactorings are available only when C# 6.0 is available.
- many refactorings renamed
- refactoring "ChangeMemberTypeAccordingToReturnExpression" improved for async method
- refactoring "AddCastToReturnExpression" improved for async method
- refactoring "CheckParameterForNull" is not available for lambda and anonymous method
- refactoring "MarkMemberAsStatic" should not be available for a constant.
- analyzer "MergeIfStatementWithContainedIfStatement" renamed to "MergeIfStatementWithNestedIfStatement"
- MarkMemberAsStatic
- MarkAllMembersAsStatic
- FormatAccessorBracesOnSingleLine
- GenerateSwitchSections
- ConvertStringLiteralToCharacterLiteral
- refactoring "ReverseForLoop" is available within 'for' keyword.
- refactoring "SwapExpressionsInBinaryExpression" is available only for logical and/or expression.
- refactoring "AddCastAccordingToParameterType" can offer more than one cast.
- refactorings "SwapParameters" and "SwapArguments" removed (these are covered by "Change signature..." dialog)
- refactorings "RemoveMember" and "DuplicateMember" are available only at opening/closing brace
- refactoring "RemoveAllRegions" is available inside #endregion directive.
- refactoring "RenameMethodAccordingToTypeName" handles properly async method.
- UseNameOfOperator analyzer:
- only quote marks (and at sign) are faded out.
- analyzer detects property name in property setter.
- SimplifyLambdaExpressionParameterList analyzer - parenthesized lambda with parameter list with a single parameter without type can be simplified to simple lambda
- UseExpressionBodiedMember analyzer
- Duplicate argument
- Add cast to return statement's expression
- Add cast to variable declaration
- Merge string literals
- Merge string literals into multiline string literal
- Convert regular string literal to verbatim string literal
- Convert verbatim string literal to regular string literal
- Convert verbatim string literal to regular string literals
- Use expression-bodied member
- "Extract expression from parentheses" refactoring is available when cursor is on opening/closing parenthesis.
- "Check parameter for null" refactoring is available for lambda expression and anonymous method.
- "Remove comment" and "Remove all comments" refactorings is available when cursor is inside xml documentation comment.
- "Convert foreach to for" refactoring is available for string expression.
- SplitDeclarationIntoMultipleDeclarations
- UseCountOrLengthPropertyInsteadOfCountMethod
- UseAnyMethodInsteadOfCountMethod
- UseCoalesceExpressionInsteadOfConditionalExpression
- UseAutoImplementedProperty
- DeclareExplicitType and DeclareImplicitType analyzers - 'var' is allowed for ThisExpression.
- "RemoveRedundantEmptyLine" analyzer - empty line can be between using directive (or extern alias) inside namespace declaration and first member declaration.
- Expand coalesce expression
- Expand event
- Swap members
- Split attributes
- Merge attributes
- Change method/property/indexer type according to yield return statement
- Notify property changed
- Add cast to assignment expression
- Format accessor braces on multiple lines
- "Remove/duplicate member" refactoring:
- triggers inside header or on closing brace (if any)
- is available for method/constructor/property/indexer/operator/event/namespace/class/struct/interface.
- "Add/remove parameter name" refactoring - argument(s) must be selected.
- "Rename variable/method/property/parameter according to type name" refactorings - predefined types are excluded.
- "Convert method to read-only property" refactoring - triggers only inside method header.
- "Convert property to method" refactoring - triggers only inside property header
- "Make method/property/indexer method" refactoring - triggers only inside method/property/indexer header
- "Convert constant to read-only field" refactoring - static keyword is added if the constant is declared in static class.
- "Convert switch to if-else chain" refactoring - there must be at least one non-default section.
- "Rename parameter according to type name" refactoring - now works for lambda's argument list.
- "Add parentheses" refactoring
- NEW - "RemoveEmptyFinallyClause" analyzer and code fix added
- NEW - "RemoveEmptyArgumentList" analyzer and code fix added
- NEW - "SimplifyLogicalNotExpression" analyzer and code fix added
- NEW - "RemoveUnnecessaryCaseLabel" analyzer and code fix added
- NEW - "RemoveRedundantDefaultSwitchSection" analyzer and code fix added
- NEW - "RemoveRedundantBaseConstructorCall" analyzer and code fix added
- NEW - "RemoveEmptyNamespaceDeclaration" analyzer and code fix added
- NEW - "SimplifyIfStatementToReturnStatement" analyzer and code fix added
- NEW - "RemoveRedundantConstructor" analyzer and code fix added
- NEW - "AvoidEmptyCatchClauseThatCatchesSystemException" analyzer and code fix added
- NEW - "FormatDeclarationBraces" analyzer and code fix added
- NEW - "SimplifyLinqMethodChain" analyzer and code fix added
- NEW - "AvoidUsageOfStringEmpty" analyzer and code fix added
- NEW - "ThrowingOfNewNotImplementedException" analyzer added
- NEW - "UseCountOrLengthPropertyInsteadOfAnyMethod" analyzer and code fix added
- NEW - "Swap arguments" refactoring added
- NEW - "Swap expressions" refactoring added
- NEW - "Swap parameters" refactoring added
- NEW - "Duplicate parameter" refactoring added
- NEW - "Access element using '[]' instead of 'First/Last/ElementAt' method" refactoring added
- NEW - "Introduce constructor from selected member(s)" refactoring added
- NEW - "Change method/property/indexer type according to return statement" refactoring added
- "Remove member" refactoring removes xml comment that belongs to a member
- "Add boolean comparison" refactoring works for return statement in method/property/indexer
- "Convert string literal to interpolated string" refactoring adds empty interpolation
- Bug fixed in "Rename field according to property name" refactoring
- Bug fixed in "Convert foreach to for" refactoring
- NEW - "UseForStatementToCreateInfiniteLoop" analyzer and code fix added
- NEW - "UseWhileStatementToCreateInfiniteLoop" analyzer and code fix added
- NEW - "AvoidUsageOfDoStatementToCreateInfiniteLoop" analyzer and code fix added
- NEW - UseStringLiteralInsteadOfInterpolatedString analyzer and code fix added
- "RemoveRedundantEmptyLine" analyzer enhanced
- "FormatAccessorList" analyzer now works for auto-property accessor list
- "MergeLocalDeclarationWithReturnStatement" code fix now works when cursor is in return statement
- "MergeIfStatementWithContainedIfStatement" code fix improved (unnecessary parentheses are not added)
- bug fixed in "SimplifyAssignmentExpression" analyzer
- "Extract statement(s) from if statement" refactoring now works for topmost if statement that has else clause
- "Format binary expression on multiple lines" refactoring now works for a single binary expression
- "Negate binary expression" refactoring now works properly for a chain of logical and/or expressions
- "Remove parameter name from each argument" refactoring now works when any argument has parameter name
- "Expand property and add backing field" improved (accessor is on a single line)
- NEW - MergeIfStatementWithContainedIfStatement analyzer and code fix added
- NEW - DeclareEachTypeInSeparateFile analyzer added
- NEW - AvoidLockingOnPubliclyAccessibleInstance analyzer and code fix added (without batch fixer)
- NEW - SimplifyAssignmentExpression analyzer and code fix added
- NEW - AddEmptyLinesBetweenDeclarations analyzer and code fix added
- NEW - AvoidUsingAliasDirective analyzer added
- NEW - AvoidSemicolonAtEndOfDeclaration analyzer and code fix added
- UseLogicalNotOperator analyzer renamed to SimplifyBooleanComparison and improved
- RemoveRedundantBooleanLiteral analyzer now works for
&& true
and|| false
- NEW - "Add boolean comparison" refactoring added
- NEW - "Convert interpolated string to string literal" refactoring added
- NEW - "Convert string literal to interpolated string" refactoring added
- NEW - "Change 'Any/All' to 'All/Any'" refactoring added
- "Format all parameters on a single line" refactoring now works for parameter list with a single parameter
- "Convert to constant" refactoring now works only for predefined types (except object)
- "Remove comment/comments" refactorings now work for comments that are inside trivia
- "Make member abstract" refactoring now work only for non-abstract indexer/method/property that are in abstract class
- "Add/remove parameter name (to/from each argument)" refactorings now work when cursor is right behind the parameter
- Bug fixed in "Uncomment" refactoring
- Bug fixes and minor improvements
- Bug fixes
- Initial release