Roslynator is a set of code analysis tools for C#, powered by Roslyn.
Directory.Build.props
fileomnisharp.json
(PR)this
to its interface cannot be null (RCS1202) (issue)x == ""
should be replaced with string.IsNullOrEmpty(x)
x == double.NaN
should be replaced with double.IsNaN(x)
x.OrderBy(y => y).Reverse()
can be simplified to x.OrderByDescending(y => y)
x.SelectMany(y => y).Count()
can be simplified to x.Sum(y => y.Count)
if x
has Count
or Length
property<<
operator (commit).x?.M() ?? default(int?)
can be simplified to x?.M()
if x
is a nullable struct.(x != null) ? x.M() : default(int?)
can be simplified to x?.M()
if x
is a nullable struct.Publish package Roslynator.CodeAnalysis.Analyzers 1.0.0-beta
Add analyzer UseExceptionFilter (RCS1236).
Add analyzer UseBitShiftOperator (RCS1237).
Add analyzer AvoidNestedConditionalOperators (RCS1238).
Add analyzer UseForStatementInsteadOfWhileStatement (RCS1239).
Add analyzer UnnecessaryOperator (RCS1240).
Add analyzer ImplementNonGenericCounterpart (RCS1241).