Pattern: Use of empty statement
Issue: -
Typing mistakes and misunderstandings about where semicolons are required can lead to semicolons that are unnecessary. While not technically an error, extra semicolons can cause confusion when reading code.
<module name="EmptyStatement"/>
Example of incorrect code:
doSomething();;
while (condition)
{
;
}
Example of correct code:
doSomething();
while (condition)
{
/** intentionally empty */
}