mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-03 14:38:51 +00:00
Enforce empty line before the last } of a file (#138)
This commit is contained in:
1 parent
591a6606cc
commit
bdced0904b
1 file changed
+10
-2
@@ -27,14 +27,22 @@
|
|||||||
<module name="SuppressWarningsFilter"/>
|
<module name="SuppressWarningsFilter"/>
|
||||||
|
|
||||||
<!-- carbon -->
|
<!-- carbon -->
|
||||||
<!-- empty line at beginning after class/interface/enum definition -->
|
|
||||||
<!-- Temporary until https://github.com/checkstyle/checkstyle/issues/5313 -->
|
<!-- Temporary until https://github.com/checkstyle/checkstyle/issues/5313 -->
|
||||||
|
<!-- empty line at beginning after class/interface/enum definition -->
|
||||||
<module name="RegexpMultiline">
|
<module name="RegexpMultiline">
|
||||||
<property name="format" value="^([^\r\n ]+ )*(class|interface|enum) [^{]*\{\r?\n[^\r\n}]"/>
|
<property name="format" value="^([^\r\n ]+ )*(class|interface|enum) [^{]*\{\r?\n[^\r\n}]"/>
|
||||||
<property name="message" value="Leave empty row after class/interface/enum definition!"/>
|
<property name="message" value="Leave an empty line after class/interface/enum definition!"/>
|
||||||
<property name="fileExtensions" value="groovy,java"/>
|
<property name="fileExtensions" value="groovy,java"/>
|
||||||
</module>
|
</module>
|
||||||
|
|
||||||
|
<!-- empty line before the last } of class/interface/enum definition -->
|
||||||
|
<module name="RegexpMultiline">
|
||||||
|
<property name="format" value="}\r\n}\r\n\Z"/>
|
||||||
|
<property name="message" value="Leave an empty line before the last } of class/interface/enum!"/>
|
||||||
|
<property name="fileExtensions" value="groovy,java"/>
|
||||||
|
<property name="matchAcrossLines" value="true"/>
|
||||||
|
</module>
|
||||||
|
|
||||||
<!-- https://checkstyle.org/config_filters.html#SuppressWithPlainTextCommentFilter -->
|
<!-- https://checkstyle.org/config_filters.html#SuppressWithPlainTextCommentFilter -->
|
||||||
<module name="SuppressWithPlainTextCommentFilter"/>
|
<module name="SuppressWithPlainTextCommentFilter"/>
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user