Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Forbid code that would reformat poorly
Current checkstyle rules somehow allow things like void run() { throw new UnsupportedOperationException(); } Runnable r = () -> { throw new RuntimeException(); } Runnable asRunnable() { a_field++; } void update() { throw new RuntimeException(); } however, when such code is then auto-formatted by IntelliJ with Airbase codestyle, some whitespace is removed, resulting in a code that violates checkstyle rules. This state is undesired: sometimes a person working on a class file may need to undo auto-formatting so pass checkstyle checks. The new rules aim to reduce such situation by recognizing some common would-format-incorrectly patterns.
- Loading branch information