Skip to content

Rules

EagleRepair currently aims to fix static analysis violations reported by SonarQube and ReSharper.

SonarQube

ID Squid SonarQube Description
R1 3881 "IDisposable" should be implemented correctly
R3 4201 Null checks should not be used with "is"
R4 2971 "IEnumerable" LINQs should be simplified
R5 3247 Duplicate casts should not be made
R6 1155 "Any()" should be used to test for emptiness
R10 3256 "string.IsNullOrEmpty" should be used

ReSharper

ID TypeId ReSharper Description
R2 MergeSequentialChecks Merge sequential checks in && or || expressions
R3 MergeSequentialChecks Merge sequential checks in && or || expressions
R4 ReplaceWithSingleCallTo Any, Count, FirstOrDefault, SingleOrDefault, First, Single, Last
R5 MergeCastWithTypeCheck Type check and casts can be merged
R6 UseMethodAny Use ".Any()" to test whether this IEnumerable is empty or not
R7 UseNullPropagation Replace if statement with null-propagating code
R8 UsePatternMatching Convert "as" expression type check and the following null check into pattern matching
R9 UseStringInterpolation Use string interpolation expression
R10 ReplaceWithStringIsNullOrEmpty Use "String.IsNullOrEmpty"
R11 UseCountProperty - Coming soon Use collection’s count property