{"action":"created","issue":{"url":"https://api.github.com/repos/bbatsov/rubocop/issues/3604","repository_url":"https://api.github.com/repos/bbatsov/rubocop","labels_url":"https://api.github.com/repos/bbatsov/rubocop/issues/3604/labels{/name}","comments_url":"https://api.github.com/repos/bbatsov/rubocop/issues/3604/comments","events_url":"https://api.github.com/repos/bbatsov/rubocop/issues/3604/events","html_url":"https://github.com/bbatsov/rubocop/pull/3604","id":182732351,"number":3604,"title":"Add new `Style/MultilineMemoization` cop","user":{"login":"Drenmi","id":5259935,"avatar_url":"https://avatars.githubusercontent.com/u/5259935?v=3","gravatar_id":"","url":"https://api.github.com/users/Drenmi","html_url":"https://github.com/Drenmi","followers_url":"https://api.github.com/users/Drenmi/followers","following_url":"https://api.github.com/users/Drenmi/following{/other_user}","gists_url":"https://api.github.com/users/Drenmi/gists{/gist_id}","starred_url":"https://api.github.com/users/Drenmi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Drenmi/subscriptions","organizations_url":"https://api.github.com/users/Drenmi/orgs","repos_url":"https://api.github.com/users/Drenmi/repos","events_url":"https://api.github.com/users/Drenmi/events{/privacy}","received_events_url":"https://api.github.com/users/Drenmi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-10-13T08:58:44Z","updated_at":"2016-10-13T12:14:30Z","closed_at":"2016-10-13T12:13:16Z","pull_request":{"url":"https://api.github.com/repos/bbatsov/rubocop/pulls/3604","html_url":"https://github.com/bbatsov/rubocop/pull/3604","diff_url":"https://github.com/bbatsov/rubocop/pull/3604.diff","patch_url":"https://github.com/bbatsov/rubocop/pull/3604.patch"},"body":"This cop checks that multiline memoizations are wrapped in a `begin`\r\nand `end` block, e.g.:\r\n\r\n```\r\nfoo ||= begin\r\n  bar\r\n  baz\r\nend\r\n```\r\n\r\nThis only affects nodes that use parentheses, e.g.\r\n\r\n```\r\nfoo ||= (\r\n  baz\r\n  bax\r\n)\r\n```\r\n\r\n-----------------\r\n\r\nBefore submitting the PR make sure the following are checked:\r\n\r\n* [X] Wrote [good commit messages][1].\r\n* [X] Used the same coding conventions as the rest of the project.\r\n* [X] Feature branch is up-to-date with `master` (if not - rebase it).\r\n* [X] Squashed related commits together.\r\n* [X] Added tests.\r\n* [X] Added an entry to the [Changelog](../blob/master/CHANGELOG.md) if the new code introduces user-observable changes. See [changelog entry format](../blob/master/CONTRIBUTING.md#changelog-entry-format).\r\n* [X] All tests are passing.\r\n* [X] The new code doesn't generate RuboCop offenses.\r\n* [X] The PR relates to *only* one subject with a clear title\r\n  and description in grammatically correct, complete sentences.\r\n\r\n[1]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html"},"comment":{"url":"https://api.github.com/repos/bbatsov/rubocop/issues/comments/253496207","html_url":"https://github.com/bbatsov/rubocop/pull/3604#issuecomment-253496207","issue_url":"https://api.github.com/repos/bbatsov/rubocop/issues/3604","id":253496207,"user":{"login":"bbatsov","id":103882,"avatar_url":"https://avatars.githubusercontent.com/u/103882?v=3","gravatar_id":"","url":"https://api.github.com/users/bbatsov","html_url":"https://github.com/bbatsov","followers_url":"https://api.github.com/users/bbatsov/followers","following_url":"https://api.github.com/users/bbatsov/following{/other_user}","gists_url":"https://api.github.com/users/bbatsov/gists{/gist_id}","starred_url":"https://api.github.com/users/bbatsov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbatsov/subscriptions","organizations_url":"https://api.github.com/users/bbatsov/orgs","repos_url":"https://api.github.com/users/bbatsov/repos","events_url":"https://api.github.com/users/bbatsov/events{/privacy}","received_events_url":"https://api.github.com/users/bbatsov/received_events","type":"User","site_admin":false},"created_at":"2016-10-13T12:14:30Z","updated_at":"2016-10-13T12:14:30Z","body":"I'm fine with the cop and I'm open to adding a style guide entry for it as well (I'm pretty certain most Rubyists employ this style anyways). \r\n\r\nAnyways, if someone wants to make this configurable - I'm fine with this as well."}}
{"actor":{"display_login":"bbatsov"}}