This isn't really a good enough algorithm for determining whether we need a semicolon. E.g.

foo(a,
b);

shouldn't add a ';' in the intermediate line.

I'm going to accept as it's an improvement over the current state, but it needs more iteration. Please add a task for yourself and ping me if you need more details.