{"action":"closed","issue":{"url":"https://api.github.com/repos/bbatsov/rubocop/issues/2101","labels_url":"https://api.github.com/repos/bbatsov/rubocop/issues/2101/labels{/name}","comments_url":"https://api.github.com/repos/bbatsov/rubocop/issues/2101/comments","events_url":"https://api.github.com/repos/bbatsov/rubocop/issues/2101/events","html_url":"https://github.com/bbatsov/rubocop/issues/2101","id":98915261,"number":2101,"title":"AllowForAlignment and Style/ExtraSpacing doesn't allow right-align of = against <<","user":{"login":"DMA57361","id":1375133,"avatar_url":"https://avatars.githubusercontent.com/u/1375133?v=3","gravatar_id":"","url":"https://api.github.com/users/DMA57361","html_url":"https://github.com/DMA57361","followers_url":"https://api.github.com/users/DMA57361/followers","following_url":"https://api.github.com/users/DMA57361/following{/other_user}","gists_url":"https://api.github.com/users/DMA57361/gists{/gist_id}","starred_url":"https://api.github.com/users/DMA57361/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DMA57361/subscriptions","organizations_url":"https://api.github.com/users/DMA57361/orgs","repos_url":"https://api.github.com/users/DMA57361/repos","events_url":"https://api.github.com/users/DMA57361/events{/privacy}","received_events_url":"https://api.github.com/users/DMA57361/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-04T08:20:27Z","updated_at":"2015-08-04T09:54:32Z","closed_at":"2015-08-04T09:54:32Z","body":"While using the latest master - including the fix for #2098 - I'm getting an offence for an `=` which is right aligned against a `<<`, which itself is then aligned with several other things. I think this is something that should be acceptable. (To be clear, I was getting this before reporting 2098 so that's probably not the cause, but I was going home for the day and didn't have time to construct an example for both yesterday).\r\n\r\nHere's a contrived example file that demonstrates:\r\n``` ruby\r\n# Some right-aligning single operators against double-width operators are OK\r\nvalue  = a_number\r\nvalue += more_number if want_bigger_number\r\n\r\n# Double double-width seems OK as well\r\narray += [1,2,3]\r\narray << another_number if include_another_number\r\n\r\n# But when it's the << operator and a single-width we get offenses\r\na_variable  = [1,2,3]\r\nan_array   << another_number if include_another_number\r\n\r\nshort             = 'wut'\r\nmuch_much_longer << :symbol\r\n\r\n# When the single-widths aligned with something else, it passes\r\nerrors       << some_error if failure\r\nfull_message  = errors.join\r\nfailures     += 1\r\n```\r\n\r\nAnd the results when run through Rubocop with only this cop enabled:\r\n```\r\nexample.rb:10:11: C: Style/ExtraSpacing: Unnecessary spacing detected.\r\na_variable  = [1,2,3]\r\n          ^\r\nexample.rb:11:9: C: Style/ExtraSpacing: Unnecessary spacing detected.\r\nan_array   << another_number if include_another_number\r\n        ^^\r\nexample.rb:13:6: C: Style/ExtraSpacing: Unnecessary spacing detected.\r\nshort             = 'wut'\r\n     ^^^^^^^^^^^^\r\nexample.rb:17:7: C: Style/ExtraSpacing: Unnecessary spacing detected.\r\nerrors       << some_error if failure\r\n      ^^^^^^\r\n```\r\nMy gut feeling is that all of these should probably be acceptable."}}