Is there a way to setup checkstyle to prevent leading, multiple or trailing empty lines in method bodies:
e.g.
private void a() { - int a = 1; doStu
To enforce no blank lines at the beginning and end of any block, you can use multi-line regular expression checks:
"^$" signifies the blank line.