{"action":"created","comment":{"url":"https://api.github.com/repos/bbatsov/rubocop/pulls/comments/26644779","id":26644779,"diff_hunk":"@@ -453,10 +453,19 @@ Style/RedundantReturn:\n   # When true allows code like `return x, y`.\n   AllowMultipleReturnValues: false\n \n+# Use / or %r around regexp literals.\n Style/RegexpLiteral:\n-  # The maximum number of (escaped) slashes that a slash-delimited regexp is\n-  # allowed to have. If there are more slashes, a %r regexp shall be used.\n-  MaxSlashes: 1\n+  EnforcedStyle: slashes\n+  # slashes: Always use slashes.","path":"config/default.yml","position":10,"original_position":10,"commit_id":"7985ee5f43dd71fec5eee31ff6309a8bcba00adf","original_commit_id":"7985ee5f43dd71fec5eee31ff6309a8bcba00adf","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},"body":"`%r` should always be allowed for a literal containing `/`.","created_at":"2015-03-18T08:28:05Z","updated_at":"2015-03-18T08:28:05Z","html_url":"https://github.com/bbatsov/rubocop/pull/1721#discussion_r26644779","pull_request_url":"https://api.github.com/repos/bbatsov/rubocop/pulls/1721","_links":{"self":{"href":"https://api.github.com/repos/bbatsov/rubocop/pulls/comments/26644779"},"html":{"href":"https://github.com/bbatsov/rubocop/pull/1721#discussion_r26644779"},"pull_request":{"href":"https://api.github.com/repos/bbatsov/rubocop/pulls/1721"}}},"pull_request":{"url":"https://api.github.com/repos/bbatsov/rubocop/pulls/1721","id":31367424,"html_url":"https://github.com/bbatsov/rubocop/pull/1721","diff_url":"https://github.com/bbatsov/rubocop/pull/1721.diff","patch_url":"https://github.com/bbatsov/rubocop/pull/1721.patch","issue_url":"https://api.github.com/repos/bbatsov/rubocop/issues/1721","number":1721,"state":"open","locked":false,"title":"Multiline %r","user":{"login":"bquorning","id":22333,"avatar_url":"https://avatars.githubusercontent.com/u/22333?v=3","gravatar_id":"","url":"https://api.github.com/users/bquorning","html_url":"https://github.com/bquorning","followers_url":"https://api.github.com/users/bquorning/followers","following_url":"https://api.github.com/users/bquorning/following{/other_user}","gists_url":"https://api.github.com/users/bquorning/gists{/gist_id}","starred_url":"https://api.github.com/users/bquorning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bquorning/subscriptions","organizations_url":"https://api.github.com/users/bquorning/orgs","repos_url":"https://api.github.com/users/bquorning/repos","events_url":"https://api.github.com/users/bquorning/events{/privacy}","received_events_url":"https://api.github.com/users/bquorning/received_events","type":"User","site_admin":false},"body":"Fixes #1020.\r\n\r\nFollowing the discussion on #1655 (see https://github.com/bbatsov/rubocop/pull/1655#issuecomment-74412384 and https://github.com/bbatsov/rubocop/pull/1655#discussion_r26288686), and https://github.com/bbatsov/ruby-style-guide/commit/bdde52a668da9fec99ba4e33f893bce91d18494f, this PR removes the `MaxSlashes` option from the `RegexpLiteral` cop, instead adding the `EnforcedStyle` option (either `slashes`, `percent_r` or `mixed`) and the `AllowInnerSlashes` option.\r\n\r\nThe implementation is very similar to how `CommandLiteral` was implemented in #1655.\r\n\r\nThe former implementation had some `auto_gen_config` logic that I have completely removed. I *think* all it did was keep a counter to set the `MaxSlashes` value in the generated config file.","created_at":"2015-03-17T19:06:22Z","updated_at":"2015-03-18T08:28:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dc1b3d68e65203b7eb5d3ddc26a712f282ce8fc0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bbatsov/rubocop/pulls/1721/commits","review_comments_url":"https://api.github.com/repos/bbatsov/rubocop/pulls/1721/comments","review_comment_url":"https://api.github.com/repos/bbatsov/rubocop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bbatsov/rubocop/issues/1721/comments","statuses_url":"https://api.github.com/repos/bbatsov/rubocop/statuses/7985ee5f43dd71fec5eee31ff6309a8bcba00adf","head":{"label":"bquorning:multiline-percent-r","ref":"multiline-percent-r","sha":"7985ee5f43dd71fec5eee31ff6309a8bcba00adf","user":{"login":"bquorning","id":22333,"avatar_url":"https://avatars.githubusercontent.com/u/22333?v=3","gravatar_id":"","url":"https://api.github.com/users/bquorning","html_url":"https://github.com/bquorning","followers_url":"https://api.github.com/users/bquorning/followers","following_url":"https://api.github.com/users/bquorning/following{/other_user}","gists_url":"https://api.github.com/users/bquorning/gists{/gist_id}","starred_url":"https://api.github.com/users/bquorning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bquorning/subscriptions","organizations_url":"https://api.github.com/users/bquorning/orgs","repos_url":"https://api.github.com/users/bquorning/repos","events_url":"https://api.github.com/users/bquorning/events{/privacy}","received_events_url":"https://api.github.com/users/bquorning/received_events","type":"User","site_admin":false},"repo":{"id":12640527,"name":"rubocop","full_name":"bquorning/rubocop","owner":{"login":"bquorning","id":22333,"avatar_url":"https://avatars.githubusercontent.com/u/22333?v=3","gravatar_id":"","url":"https://api.github.com/users/bquorning","html_url":"https://github.com/bquorning","followers_url":"https://api.github.com/users/bquorning/followers","following_url":"https://api.github.com/users/bquorning/following{/other_user}","gists_url":"https://api.github.com/users/bquorning/gists{/gist_id}","starred_url":"https://api.github.com/users/bquorning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bquorning/subscriptions","organizations_url":"https://api.github.com/users/bquorning/orgs","repos_url":"https://api.github.com/users/bquorning/repos","events_url":"https://api.github.com/users/bquorning/events{/privacy}","received_events_url":"https://api.github.com/users/bquorning/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bquorning/rubocop","description":"An experimental Ruby code analyzer, based on the community Ruby style guide.","fork":true,"url":"https://api.github.com/repos/bquorning/rubocop","forks_url":"https://api.github.com/repos/bquorning/rubocop/forks","keys_url":"https://api.github.com/repos/bquorning/rubocop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bquorning/rubocop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bquorning/rubocop/teams","hooks_url":"https://api.github.com/repos/bquorning/rubocop/hooks","issue_events_url":"https://api.github.com/repos/bquorning/rubocop/issues/events{/number}","events_url":"https://api.github.com/repos/bquorning/rubocop/events","assignees_url":"https://api.github.com/repos/bquorning/rubocop/assignees{/user}","branches_url":"https://api.github.com/repos/bquorning/rubocop/branches{/branch}","tags_url":"https://api.github.com/repos/bquorning/rubocop/tags","blobs_url":"https://api.github.com/repos/bquorning/rubocop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bquorning/rubocop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bquorning/rubocop/git/refs{/sha}","trees_url":"https://api.github.com/repos/bquorning/rubocop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bquorning/rubocop/statuses/{sha}","languages_url":"https://api.github.com/repos/bquorning/rubocop/languages","stargazers_url":"https://api.github.com/repos/bquorning/rubocop/stargazers","contributors_url":"https://api.github.com/repos/bquorning/rubocop/contributors","subscribers_url":"https://api.github.com/repos/bquorning/rubocop/subscribers","subscription_url":"https://api.github.com/repos/bquorning/rubocop/subscription","commits_url":"https://api.github.com/repos/bquorning/rubocop/commits{/sha}","git_commits_url":"https://api.github.com/repos/bquorning/rubocop/git/commits{/sha}","comments_url":"https://api.github.com/repos/bquorning/rubocop/comments{/number}","issue_comment_url":"https://api.github.com/repos/bquorning/rubocop/issues/comments{/number}","contents_url":"https://api.github.com/repos/bquorning/rubocop/contents/{+path}","compare_url":"https://api.github.com/repos/bquorning/rubocop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bquorning/rubocop/merges","archive_url":"https://api.github.com/repos/bquorning/rubocop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bquorning/rubocop/downloads","issues_url":"https://api.github.com/repos/bquorning/rubocop/issues{/number}","pulls_url":"https://api.github.com/repos/bquorning/rubocop/pulls{/number}","milestones_url":"https://api.github.com/repos/bquorning/rubocop/milestones{/number}","notifications_url":"https://api.github.com/repos/bquorning/rubocop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bquorning/rubocop/labels{/name}","releases_url":"https://api.github.com/repos/bquorning/rubocop/releases{/id}","created_at":"2013-09-06T09:24:28Z","updated_at":"2015-03-15T19:29:38Z","pushed_at":"2015-03-17T18:57:30Z","git_url":"git://github.com/bquorning/rubocop.git","ssh_url":"git@github.com:bquorning/rubocop.git","clone_url":"https://github.com/bquorning/rubocop.git","svn_url":"https://github.com/bquorning/rubocop","homepage":"http://batsov.com/rubocop","size":8831,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"bbatsov:master","ref":"master","sha":"8aa3c3f4933fe56602b863d9a26ab49bff6ce261","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},"repo":{"id":4095287,"name":"rubocop","full_name":"bbatsov/rubocop","owner":{"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},"private":false,"html_url":"https://github.com/bbatsov/rubocop","description":"A Ruby static code analyzer, based on the community Ruby style guide.","fork":false,"url":"https://api.github.com/repos/bbatsov/rubocop","forks_url":"https://api.github.com/repos/bbatsov/rubocop/forks","keys_url":"https://api.github.com/repos/bbatsov/rubocop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bbatsov/rubocop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bbatsov/rubocop/teams","hooks_url":"https://api.github.com/repos/bbatsov/rubocop/hooks","issue_events_url":"https://api.github.com/repos/bbatsov/rubocop/issues/events{/number}","events_url":"https://api.github.com/repos/bbatsov/rubocop/events","assignees_url":"https://api.github.com/repos/bbatsov/rubocop/assignees{/user}","branches_url":"https://api.github.com/repos/bbatsov/rubocop/branches{/branch}","tags_url":"https://api.github.com/repos/bbatsov/rubocop/tags","blobs_url":"https://api.github.com/repos/bbatsov/rubocop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bbatsov/rubocop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bbatsov/rubocop/git/refs{/sha}","trees_url":"https://api.github.com/repos/bbatsov/rubocop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bbatsov/rubocop/statuses/{sha}","languages_url":"https://api.github.com/repos/bbatsov/rubocop/languages","stargazers_url":"https://api.github.com/repos/bbatsov/rubocop/stargazers","contributors_url":"https://api.github.com/repos/bbatsov/rubocop/contributors","subscribers_url":"https://api.github.com/repos/bbatsov/rubocop/subscribers","subscription_url":"https://api.github.com/repos/bbatsov/rubocop/subscription","commits_url":"https://api.github.com/repos/bbatsov/rubocop/commits{/sha}","git_commits_url":"https://api.github.com/repos/bbatsov/rubocop/git/commits{/sha}","comments_url":"https://api.github.com/repos/bbatsov/rubocop/comments{/number}","issue_comment_url":"https://api.github.com/repos/bbatsov/rubocop/issues/comments{/number}","contents_url":"https://api.github.com/repos/bbatsov/rubocop/contents/{+path}","compare_url":"https://api.github.com/repos/bbatsov/rubocop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bbatsov/rubocop/merges","archive_url":"https://api.github.com/repos/bbatsov/rubocop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bbatsov/rubocop/downloads","issues_url":"https://api.github.com/repos/bbatsov/rubocop/issues{/number}","pulls_url":"https://api.github.com/repos/bbatsov/rubocop/pulls{/number}","milestones_url":"https://api.github.com/repos/bbatsov/rubocop/milestones{/number}","notifications_url":"https://api.github.com/repos/bbatsov/rubocop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bbatsov/rubocop/labels{/name}","releases_url":"https://api.github.com/repos/bbatsov/rubocop/releases{/id}","created_at":"2012-04-21T10:09:58Z","updated_at":"2015-03-18T06:19:07Z","pushed_at":"2015-03-17T09:54:39Z","git_url":"git://github.com/bbatsov/rubocop.git","ssh_url":"git@github.com:bbatsov/rubocop.git","clone_url":"https://github.com/bbatsov/rubocop.git","svn_url":"https://github.com/bbatsov/rubocop","homepage":"","size":18585,"stargazers_count":4171,"watchers_count":4171,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":416,"mirror_url":null,"open_issues_count":96,"forks":416,"open_issues":96,"watchers":4171,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bbatsov/rubocop/pulls/1721"},"html":{"href":"https://github.com/bbatsov/rubocop/pull/1721"},"issue":{"href":"https://api.github.com/repos/bbatsov/rubocop/issues/1721"},"comments":{"href":"https://api.github.com/repos/bbatsov/rubocop/issues/1721/comments"},"review_comments":{"href":"https://api.github.com/repos/bbatsov/rubocop/pulls/1721/comments"},"review_comment":{"href":"https://api.github.com/repos/bbatsov/rubocop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bbatsov/rubocop/pulls/1721/commits"},"statuses":{"href":"https://api.github.com/repos/bbatsov/rubocop/statuses/7985ee5f43dd71fec5eee31ff6309a8bcba00adf"}}}}