{"action":"created","issue":{"url":"https://api.github.com/repos/bbatsov/rubocop/issues/2121","labels_url":"https://api.github.com/repos/bbatsov/rubocop/issues/2121/labels{/name}","comments_url":"https://api.github.com/repos/bbatsov/rubocop/issues/2121/comments","events_url":"https://api.github.com/repos/bbatsov/rubocop/issues/2121/events","html_url":"https://github.com/bbatsov/rubocop/issues/2121","id":99742078,"number":2121,"title":"ExtraSpacing Infinite Correction Loop with AlignHash","user":{"login":"jfelchner","id":285582,"avatar_url":"https://avatars.githubusercontent.com/u/285582?v=3","gravatar_id":"","url":"https://api.github.com/users/jfelchner","html_url":"https://github.com/jfelchner","followers_url":"https://api.github.com/users/jfelchner/followers","following_url":"https://api.github.com/users/jfelchner/following{/other_user}","gists_url":"https://api.github.com/users/jfelchner/gists{/gist_id}","starred_url":"https://api.github.com/users/jfelchner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfelchner/subscriptions","organizations_url":"https://api.github.com/users/jfelchner/orgs","repos_url":"https://api.github.com/users/jfelchner/repos","events_url":"https://api.github.com/users/jfelchner/events{/privacy}","received_events_url":"https://api.github.com/users/jfelchner/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bbatsov/rubocop/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"jonas054","id":336720,"avatar_url":"https://avatars.githubusercontent.com/u/336720?v=3","gravatar_id":"","url":"https://api.github.com/users/jonas054","html_url":"https://github.com/jonas054","followers_url":"https://api.github.com/users/jonas054/followers","following_url":"https://api.github.com/users/jonas054/following{/other_user}","gists_url":"https://api.github.com/users/jonas054/gists{/gist_id}","starred_url":"https://api.github.com/users/jonas054/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonas054/subscriptions","organizations_url":"https://api.github.com/users/jonas054/orgs","repos_url":"https://api.github.com/users/jonas054/repos","events_url":"https://api.github.com/users/jonas054/events{/privacy}","received_events_url":"https://api.github.com/users/jonas054/received_events","type":"User","site_admin":false},"milestone":null,"comments":10,"created_at":"2015-08-07T22:41:44Z","updated_at":"2015-09-10T17:51:33Z","closed_at":null,"body":"Currently it appears that `ExtraSpacing` conflicts (possibly?) with the `AlignHash` cop's autocorrection.  It seems as though `ExtraSpacing` is trying to correct spacing on hash values which I believe it should be prohibited from doing since that's the job of the `AlignHash` cop.\r\n\r\nWhen I attempt to run it, I get:\r\n\r\n```\r\n/usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rubocop-0.33.0/lib/rubocop/runner.rb:126:in `check_for_infinite_loop': Infinite loop detected in /Users/jfelchner/Projects/my_project/my_file.rb. (RuboCop::Runner::InfiniteCorrectionLoop)\r\n        from /usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rubocop-0.33.0/lib/rubocop/runner.rb:101:in `block in do_inspection_loop'\r\n        from /usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rubocop-0.33.0/lib/rubocop/runner.rb:100:in `loop'\r\n        from /usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rubocop-0.33.0/lib/rubocop/runner.rb:100:in `do_inspection_loop'\r\n        from /usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rubocop-0.33.0/lib/rubocop/runner.rb:78:in `process_file'\r\n        from /usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rubocop-0.33.0/lib/rubocop/runner.rb:53:in `block in inspect_files'\r\n        from /usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rubocop-0.33.0/lib/rubocop/runner.rb:51:in `each'\r\n        from /usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rubocop-0.33.0/lib/rubocop/runner.rb:51:in `inspect_files'\r\n        from /usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rubocop-0.33.0/lib/rubocop/runner.rb:30:in `run'\r\n        from /usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rubocop-0.33.0/lib/rubocop/cli.rb:26:in `run'\r\n        from /usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rubocop-0.33.0/bin/rubocop:13:in `block in <top (required)>'\r\n        from /usr/local/var/rbenv/versions/2.2.2/lib/ruby/2.2.0/benchmark.rb:303:in `realtime'\r\n        from /usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rubocop-0.33.0/bin/rubocop:12:in `<top (required)>'\r\n        from /usr/local/var/rbenv/versions/2.2.2/bin/rubocop:23:in `load'\r\n        from /usr/local/var/rbenv/versions/2.2.2/bin/rubocop:23:in `<main>'\r\n```\r\n\r\n@jonas054 I'll attach a hash that will repro this issue in a couple hours."},"comment":{"url":"https://api.github.com/repos/bbatsov/rubocop/issues/comments/139324343","html_url":"https://github.com/bbatsov/rubocop/issues/2121#issuecomment-139324343","issue_url":"https://api.github.com/repos/bbatsov/rubocop/issues/2121","id":139324343,"user":{"login":"jonas054","id":336720,"avatar_url":"https://avatars.githubusercontent.com/u/336720?v=3","gravatar_id":"","url":"https://api.github.com/users/jonas054","html_url":"https://github.com/jonas054","followers_url":"https://api.github.com/users/jonas054/followers","following_url":"https://api.github.com/users/jonas054/following{/other_user}","gists_url":"https://api.github.com/users/jonas054/gists{/gist_id}","starred_url":"https://api.github.com/users/jonas054/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonas054/subscriptions","organizations_url":"https://api.github.com/users/jonas054/orgs","repos_url":"https://api.github.com/users/jonas054/repos","events_url":"https://api.github.com/users/jonas054/events{/privacy}","received_events_url":"https://api.github.com/users/jonas054/received_events","type":"User","site_admin":false},"created_at":"2015-09-10T17:51:33Z","updated_at":"2015-09-10T17:51:33Z","body":"@lackac There's no benefit in your example above, but it's easy to tweak the example so aligning the values looks better than not doing so:\r\n```ruby\r\nhash = {\r\n  alice: { age:  23,\r\n           role: 'Director' },\r\n  bob:   { age:  25,\r\n           role: 'Consultant' }\r\n}\r\n```\r\nSo I prefer to let `AlignHash` be as it is now, and fix the problem in `ExtraSpacing`."}}