{"action":"created","issue":{"url":"https://api.github.com/repos/checkstyle/checkstyle/issues/6428","repository_url":"https://api.github.com/repos/checkstyle/checkstyle","labels_url":"https://api.github.com/repos/checkstyle/checkstyle/issues/6428/labels{/name}","comments_url":"https://api.github.com/repos/checkstyle/checkstyle/issues/6428/comments","events_url":"https://api.github.com/repos/checkstyle/checkstyle/issues/6428/events","html_url":"https://github.com/checkstyle/checkstyle/pull/6428","id":411045257,"node_id":"MDExOlB1bGxSZXF1ZXN0MjUzNjI4NjY3","number":6428,"title":"Issue #6301: ArrayTypeStyle support for method definitions","user":{"login":"esilkensen","id":94125,"node_id":"MDQ6VXNlcjk0MTI1","avatar_url":"https://avatars0.githubusercontent.com/u/94125?v=4","gravatar_id":"","url":"https://api.github.com/users/esilkensen","html_url":"https://github.com/esilkensen","followers_url":"https://api.github.com/users/esilkensen/followers","following_url":"https://api.github.com/users/esilkensen/following{/other_user}","gists_url":"https://api.github.com/users/esilkensen/gists{/gist_id}","starred_url":"https://api.github.com/users/esilkensen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esilkensen/subscriptions","organizations_url":"https://api.github.com/users/esilkensen/orgs","repos_url":"https://api.github.com/users/esilkensen/repos","events_url":"https://api.github.com/users/esilkensen/events{/privacy}","received_events_url":"https://api.github.com/users/esilkensen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"rnveach","id":5427943,"node_id":"MDQ6VXNlcjU0Mjc5NDM=","avatar_url":"https://avatars1.githubusercontent.com/u/5427943?v=4","gravatar_id":"","url":"https://api.github.com/users/rnveach","html_url":"https://github.com/rnveach","followers_url":"https://api.github.com/users/rnveach/followers","following_url":"https://api.github.com/users/rnveach/following{/other_user}","gists_url":"https://api.github.com/users/rnveach/gists{/gist_id}","starred_url":"https://api.github.com/users/rnveach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rnveach/subscriptions","organizations_url":"https://api.github.com/users/rnveach/orgs","repos_url":"https://api.github.com/users/rnveach/repos","events_url":"https://api.github.com/users/rnveach/events{/privacy}","received_events_url":"https://api.github.com/users/rnveach/received_events","type":"User","site_admin":false},"assignees":[{"login":"rnveach","id":5427943,"node_id":"MDQ6VXNlcjU0Mjc5NDM=","avatar_url":"https://avatars1.githubusercontent.com/u/5427943?v=4","gravatar_id":"","url":"https://api.github.com/users/rnveach","html_url":"https://github.com/rnveach","followers_url":"https://api.github.com/users/rnveach/followers","following_url":"https://api.github.com/users/rnveach/following{/other_user}","gists_url":"https://api.github.com/users/rnveach/gists{/gist_id}","starred_url":"https://api.github.com/users/rnveach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rnveach/subscriptions","organizations_url":"https://api.github.com/users/rnveach/orgs","repos_url":"https://api.github.com/users/rnveach/repos","events_url":"https://api.github.com/users/rnveach/events{/privacy}","received_events_url":"https://api.github.com/users/rnveach/received_events","type":"User","site_admin":false}],"milestone":null,"comments":10,"created_at":"2019-02-16T08:11:19Z","updated_at":"2019-02-21T07:05:13Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/checkstyle/checkstyle/pulls/6428","html_url":"https://github.com/checkstyle/checkstyle/pull/6428","diff_url":"https://github.com/checkstyle/checkstyle/pull/6428.diff","patch_url":"https://github.com/checkstyle/checkstyle/pull/6428.patch"},"body":"The goal of this PR is to address Issue #6301 by adding support for checking the [ArrayTypeStyle](https://checkstyle.org/config_misc.html#ArrayTypeStyle) of method definitions.\r\n\r\nThe following is valid Java syntax:\r\n```\r\nObject emptyArray()[] {\r\n    ...\r\n}\r\n```\r\n\r\nWith this PR, method definitions with array return types like the above would be reported as violations regardless of the value of `javaStyle`. My initial thought was that since functions can't have an array return type in C, it could make sense for this check to always enforce \"Java-style\" method return types.\r\n\r\nThat said, I think it'd be an easy enough code change to only report these method return type violations when `javaStyle` is `true` - or similarly to add a new parameter (or `TokenTypes.METHOD_DEF` as an optional token?) to configure whether to check method return types.\r\n\r\nWhat do you think? \r\n\r\nRegression reports: \r\n* http://esilkensen.github.io/checkstyle-tester/6301/true (`javaStyle=\"true\"` )\r\n* http://esilkensen.github.io/checkstyle-tester/6301/false (`javaStyle=\"false\"`)\r\n"},"comment":{"url":"https://api.github.com/repos/checkstyle/checkstyle/issues/comments/465886194","html_url":"https://github.com/checkstyle/checkstyle/pull/6428#issuecomment-465886194","issue_url":"https://api.github.com/repos/checkstyle/checkstyle/issues/6428","id":465886194,"node_id":"MDEyOklzc3VlQ29tbWVudDQ2NTg4NjE5NA==","user":{"login":"esilkensen","id":94125,"node_id":"MDQ6VXNlcjk0MTI1","avatar_url":"https://avatars0.githubusercontent.com/u/94125?v=4","gravatar_id":"","url":"https://api.github.com/users/esilkensen","html_url":"https://github.com/esilkensen","followers_url":"https://api.github.com/users/esilkensen/followers","following_url":"https://api.github.com/users/esilkensen/following{/other_user}","gists_url":"https://api.github.com/users/esilkensen/gists{/gist_id}","starred_url":"https://api.github.com/users/esilkensen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esilkensen/subscriptions","organizations_url":"https://api.github.com/users/esilkensen/orgs","repos_url":"https://api.github.com/users/esilkensen/repos","events_url":"https://api.github.com/users/esilkensen/events{/privacy}","received_events_url":"https://api.github.com/users/esilkensen/received_events","type":"User","site_admin":false},"created_at":"2019-02-21T07:05:13Z","updated_at":"2019-02-21T07:05:13Z","author_association":"CONTRIBUTOR","body":"@rnveach I have updated docs following your latest comments, let me know if anything needs to be changed. Thanks!"}}
{"actor":{"display_login":"esilkensen"}}