{"action":"created","issue":{"url":"https://api.github.com/repos/bbatsov/rubocop/issues/5063","repository_url":"https://api.github.com/repos/bbatsov/rubocop","labels_url":"https://api.github.com/repos/bbatsov/rubocop/issues/5063/labels{/name}","comments_url":"https://api.github.com/repos/bbatsov/rubocop/issues/5063/comments","events_url":"https://api.github.com/repos/bbatsov/rubocop/issues/5063/events","html_url":"https://github.com/bbatsov/rubocop/issues/5063","id":274395069,"number":5063,"title":"unexpected error: Operator => should be surrounded by a single space","user":{"login":"Mifrill","id":23525618,"avatar_url":"https://avatars2.githubusercontent.com/u/23525618?v=4","gravatar_id":"","url":"https://api.github.com/users/Mifrill","html_url":"https://github.com/Mifrill","followers_url":"https://api.github.com/users/Mifrill/followers","following_url":"https://api.github.com/users/Mifrill/following{/other_user}","gists_url":"https://api.github.com/users/Mifrill/gists{/gist_id}","starred_url":"https://api.github.com/users/Mifrill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mifrill/subscriptions","organizations_url":"https://api.github.com/users/Mifrill/orgs","repos_url":"https://api.github.com/users/Mifrill/repos","events_url":"https://api.github.com/users/Mifrill/events{/privacy}","received_events_url":"https://api.github.com/users/Mifrill/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-11-16T04:58:39Z","updated_at":"2017-11-16T10:55:55Z","closed_at":null,"author_association":"NONE","body":"*optional*\r\n\r\nI want to nicely align lines\r\n```\r\n  GLOSSARY = {\r\n    en: {\r\n      skipped_keys: /advertiser/i,\r\n      subcategory:  /\\AType\\z/i,\r\n      location:     /location/i,\r\n      new:          /new/i,\r\n      condition:    /Condition/i,\r\n      yes:          \"Yes\",\r\n      renames:      {\r\n        \"year of manufacture\" => \"year\",\r\n        \"machine designation\" => \"stock_no\"\r\n      }\r\n    },\r\n    zh: {\r\n      skipped_keys: /供货方状态/i,\r\n      subcategory:  /\\A类型\\z/i,\r\n      location:     /地点/i,\r\n      new:          /新建/i,\r\n      condition:    /状态/i,\r\n      yes:          \"是\",\r\n      renames:      {\r\n        \"制造年限\"             => \"year\",\r\n        \"地点\"                => \"location\",\r\n        \"经销商内部机器名称\"    => \"stock_no\"\r\n      }\r\n    }\r\n  }.freeze\r\n```\r\nFirstly: this is not a rubocop problem. It is impossible to align in the code editor (sublime or rubymine), we get this: https://imgur.com/a/B6lPW\r\nthis only happens with Chinese characters\r\n\r\nSecondly: rubocop behaves strangely with these symbols\r\n```\r\n\r\nconsole: rubocop -a path_to_file.rb\r\n\r\npath_to_file.rb :146:28: C: [Corrected] Operator => should be surrounded by a single space.\r\n        \"制造年限\"             => \"year\",\r\n                           ^^\r\npath_to_file.rb:147:29: C: [Corrected] Operator => should be surrounded by a single space.\r\n        \"地点\"                => \"location\",\r\n                            ^^\r\npath_to_file.rb:148:24: C: [Corrected] Operator => should be surrounded by a single space.\r\n        \"经销商内部机器名称\"    => \"stock_no\"\r\n                       ^^\r\n\r\n1 file inspected, 3 offenses detected, 3 offenses corrected\r\n```\r\ntried the tabs and spaces, the result is the same\r\n\r\neven one tab or space, provokes this error\r\n```\r\nC: [Corrected] Operator => should be surrounded by a single space.\r\n        \"经销商内部机器名称\"  => \"stock_no\"\r\n                     ^^\r\n1 file inspected, 1 offense detected, 1 offense corrected\r\n```\r\n\r\n## RuboCop version\r\n\r\n```\r\n$ rubocop -V\r\n0.51.0 (using Parser 2.4.0.0, running on ruby 2.3.3 x86_64-linux)\r\n```\r\nI will be grateful for your help and thank you for developing"},"comment":{"url":"https://api.github.com/repos/bbatsov/rubocop/issues/comments/344888183","html_url":"https://github.com/bbatsov/rubocop/issues/5063#issuecomment-344888183","issue_url":"https://api.github.com/repos/bbatsov/rubocop/issues/5063","id":344888183,"user":{"login":"Mifrill","id":23525618,"avatar_url":"https://avatars2.githubusercontent.com/u/23525618?v=4","gravatar_id":"","url":"https://api.github.com/users/Mifrill","html_url":"https://github.com/Mifrill","followers_url":"https://api.github.com/users/Mifrill/followers","following_url":"https://api.github.com/users/Mifrill/following{/other_user}","gists_url":"https://api.github.com/users/Mifrill/gists{/gist_id}","starred_url":"https://api.github.com/users/Mifrill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mifrill/subscriptions","organizations_url":"https://api.github.com/users/Mifrill/orgs","repos_url":"https://api.github.com/users/Mifrill/repos","events_url":"https://api.github.com/users/Mifrill/events{/privacy}","received_events_url":"https://api.github.com/users/Mifrill/received_events","type":"User","site_admin":false},"created_at":"2017-11-16T10:55:55Z","updated_at":"2017-11-16T10:55:55Z","author_association":"NONE","body":"@Drenmi  I also do not have problems when one line, regardless of the content.\r\ntry to copy the hash completely and try\r\n```\r\n    add = {\r\n      zh: {\r\n        skipped_keys: /供货方状态/i,\r\n        subcategory:  /\\A类型\\z/i,\r\n        location:     /地点/i,\r\n        new:          /新建/i,\r\n        condition:    /状态/i,\r\n        yes:          \"是\",\r\n        renames:      {\r\n          \"制造年限\" => \"year\",\r\n          \"地点\" => \"location\",\r\n          \"经销商内部机器名称\" => \"stock_no\"\r\n        }\r\n      }\r\n    }\r\n```"}}
{"actor":{"display_login":"Mifrill"}}