Line Indent Should Not Be Changed Relative To Previous

So this was an interesting pickup by ReSharper

if (e.Column.MappingName == "Facility")
    //e.Column.Width = 100;
if (e.Column.MappingName == "Notes")
    e.Column.Width = 0;

the commenting out of the e.Column.Width = 100; turns the code into

if (e.Column.MappingName == "Facility")
    if (e.Column.MappingName == "Notes")
        e.Column.Width = 0;

Which is an error that should be caught for a totally other reason - unintended cascading if's. But I also think that it needs to consider the warning for the relative to previous, even when there are multiple comment lines related to the actual error thrown. For instance, 

if (e.Column.MappingName == "Facility")
    //e.Column.Width = 100;
    // could be a problem
if (e.Column.MappingName == "Notes")
    e.Column.Width = 0;

does not trigger the Indent error and probably should. a multi-line or multiple lines of comments shouldn't affect the check.

One other question. is there a command to ask ReSharper to take me to the next instance of the same error in the code?

thanks

Harv

 

0

Please sign in to leave a comment.