Roslynator is a set of code analysis tools for C#, powered by Roslyn.
OTHER License
Bot releases are hidden (Show)
Bump Roslyn version to 4.0.1
Change category of all analyzers to 'Roslynator'
Migrate all options to EditorConfig
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
!= null
to is not null
(RCS1248) (commit)var foo = Foo.Parse(value)
as having obvious type Foo
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 "Unncessary null check" RCS1199 (issue)
More syntax is considered as having obvious type:
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).