Roslynator v2.9.0 Release Notes
Release Date: 2020-03-13 // about 4 years ago-
- Switch to Roslyn 3.x libraries
- ➕ Add
Directory.Build.props
file - ➕ Add open configuration commands to Command Palette (VS Code) (PR)
🐛 Bug Fixes
- 🛠 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)
🆕 New Analyzers
- 📄 RCS1242 (DoNotPassNonReadOnlyStructByReadOnlyReference).
- 📄 RCS1243 (DuplicateWordInComment).
- 0️⃣ RCS1244 (SimplifyDefaultExpression).
- 📄 RCS1245 (SimplifyConditionalExpression2) (issue).
Analyzers
- 0️⃣ 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.