roslynator icon indicating copy to clipboard operation
roslynator copied to clipboard

RCS1239 doesn't apply to loops with addAssignments instead of postIncrements

Open hooper-m opened this issue 6 years ago • 0 comments
trafficstars

Product and Version Used: Roslynator 2019 2.1.3

Steps to Reproduce: This analyzer does not apply to the following snippet

int i = 0;
while (i < 10)
{
    Console.WriteLine(i);
    i += 3;
}

Suggested Behavior:

for (int i = 0; i < 10; i += 3) {
    Console.WriteLine(i);
}

I have a proposed solution that is ready to submit for a Pull Request if you agree with the suggested behavior.

hooper-m avatar Sep 13 '19 02:09 hooper-m