Spotless should flag newline in heading of file #3
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Both files in the lobbyui test folder have a (unused) newline in the heading of the file.
The rules of both Checkstyle and Spotless should be modified to disallow it.
assigned to @lars.winzer
Sadly there is no good way for accomplishing this.
One possible solution would be to utilize the
RegexpHeadermodule of Checkstyle to flag every file, that doesn’t match, for example, thepackage.The other would be to use the
Regexpmodule for flagging the first line, if it doesn’t contain either thepackageorimport.The advantage of both would be that style is enforced consistently, with the downside of limiting what you can put in the first line (license, BOM, …)