Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Flagging empty bodies in 'if' or 'else' blocks does sometimes find missing code. However, it also prevents the useful idiom of documenting why a branch isn't doing anything, as in if x { doSomething() } else { // If x isn't set, then so and so can't be the case and there's // nothing to do here. } Over the years I've come to the conclusion that preventing these comments is more harmful than the presence of accidentally empty branches. Updates: gh-321
- Loading branch information