{"action":"created","issue":{"url":"https://api.github.com/repos/checkstyle/checkstyle/issues/5313","repository_url":"https://api.github.com/repos/checkstyle/checkstyle","labels_url":"https://api.github.com/repos/checkstyle/checkstyle/issues/5313/labels{/name}","comments_url":"https://api.github.com/repos/checkstyle/checkstyle/issues/5313/comments","events_url":"https://api.github.com/repos/checkstyle/checkstyle/issues/5313/events","html_url":"https://github.com/checkstyle/checkstyle/issues/5313","id":279002520,"node_id":"MDU6SXNzdWUyNzkwMDI1MjA=","number":5313,"title":"New Check: EmptyLineWrappingInBlockCheck","user":{"login":"romani","id":812984,"node_id":"MDQ6VXNlcjgxMjk4NA==","avatar_url":"https://avatars3.githubusercontent.com/u/812984?v=4","gravatar_id":"","url":"https://api.github.com/users/romani","html_url":"https://github.com/romani","followers_url":"https://api.github.com/users/romani/followers","following_url":"https://api.github.com/users/romani/following{/other_user}","gists_url":"https://api.github.com/users/romani/gists{/gist_id}","starred_url":"https://api.github.com/users/romani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romani/subscriptions","organizations_url":"https://api.github.com/users/romani/orgs","repos_url":"https://api.github.com/users/romani/repos","events_url":"https://api.github.com/users/romani/events{/privacy}","received_events_url":"https://api.github.com/users/romani/received_events","type":"User","site_admin":false},"labels":[{"id":59160289,"node_id":"MDU6TGFiZWw1OTE2MDI4OQ==","url":"https://api.github.com/repos/checkstyle/checkstyle/labels/approved","name":"approved","color":"009800","default":false},{"id":283459633,"node_id":"MDU6TGFiZWwyODM0NTk2MzM=","url":"https://api.github.com/repos/checkstyle/checkstyle/labels/new%20feature","name":"new feature","color":"bfe5bf","default":false},{"id":475997272,"node_id":"MDU6TGFiZWw0NzU5OTcyNzI=","url":"https://api.github.com/repos/checkstyle/checkstyle/labels/new%20module","name":"new module","color":"c2e0c6","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-12-04T13:50:51Z","updated_at":"2018-11-13T05:17:50Z","closed_at":null,"author_association":"MEMBER","body":"from #3923 and https://groups.google.com/forum/#!topic/checkstyle/KZn_d8nC4c0\r\n \r\nNew Check\r\nEmptyLineWrappingInBlockCheck\r\ntokens= [CLASS, METHOD, IF, ...........] (by default only class)\r\ntopSeparator = [empty-line | empty-line-allowed | no-empty-line]\r\nbottomSeparator = [empty-line | empty-line-allowed | no-empty-line]\r\n\r\nempty-line-allowed == mean no validation.\r\n\r\nIf you consider all my examples above, we could make config for methods to allow user's empty line at the top and completely forbid it at the bottom.\r\nBlockEmptyLineWrappingCheck\r\ntokens= \"METHOD_DEF\"\r\ntopSeparator = \"empty-line-allowed\"\r\nbottomSeparator = \"no-empty-line\""},"comment":{"url":"https://api.github.com/repos/checkstyle/checkstyle/issues/comments/438140071","html_url":"https://github.com/checkstyle/checkstyle/issues/5313#issuecomment-438140071","issue_url":"https://api.github.com/repos/checkstyle/checkstyle/issues/5313","id":438140071,"node_id":"MDEyOklzc3VlQ29tbWVudDQzODE0MDA3MQ==","user":{"login":"ati90ati","id":14107633,"node_id":"MDQ6VXNlcjE0MTA3NjMz","avatar_url":"https://avatars2.githubusercontent.com/u/14107633?v=4","gravatar_id":"","url":"https://api.github.com/users/ati90ati","html_url":"https://github.com/ati90ati","followers_url":"https://api.github.com/users/ati90ati/followers","following_url":"https://api.github.com/users/ati90ati/following{/other_user}","gists_url":"https://api.github.com/users/ati90ati/gists{/gist_id}","starred_url":"https://api.github.com/users/ati90ati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ati90ati/subscriptions","organizations_url":"https://api.github.com/users/ati90ati/orgs","repos_url":"https://api.github.com/users/ati90ati/repos","events_url":"https://api.github.com/users/ati90ati/events{/privacy}","received_events_url":"https://api.github.com/users/ati90ati/received_events","type":"User","site_admin":false},"created_at":"2018-11-13T05:17:50Z","updated_at":"2018-11-13T05:17:50Z","author_association":"NONE","body":"Thank you.\r\nI'll write here my quick solution, maybe it will help others.\r\n\r\n    <module name=\"RegexpMultiline\">\r\n        <property name=\"format\" value=\"^([^\\n ]+ )*(class|interface|enum) [^{]*\\{\\n[^\\n}]\"/>\r\n        <property name=\"message\" value=\"Leave empty row after class/interface/enum definition!\"/>\r\n        <property name=\"severity\" value=\"error\"/>\r\n        <property name=\"fileExtensions\" value=\"groovy,java\"/>\r\n    </module>\r\n\r\n    <module name=\"RegexpMultiline\">\r\n        <property name=\"format\" value=\"[^\\n{]\\n\\}\\n\"/>\r\n        <property name=\"message\" value=\"Leave empty row before end of class/interface/enum!\"/>\r\n        <property name=\"severity\" value=\"error\"/>\r\n        <property name=\"fileExtensions\" value=\"groovy,java\"/>\r\n    </module>\r\n"}}
{"actor":{"display_login":"ati90ati"}}