Add code quality test for self assignments

1) because you have a return as the only statement in a while loop; if it is to be recursive then while -> if but there is no sense to recurse when we can handle it in-place with a `while` as I suggested
2) if we don't assign to self, we should probably not assign to other? So the next loop should be modified, too.