Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

全角文字利用時、アラインメントが揃っているのに警告(Layout/ExtraSpacing)が出る #43

Open
ver-1000000 opened this issue Jun 13, 2018 · 1 comment
Labels

Comments

@ver-1000000
Copy link

ver-1000000 commented Jun 13, 2018

rubocop-0.57.2 環境で(それ以前でも)、以下のような事象が発生します。

# 警告なし
VALID_CONSTANT = [
  ['Japanese is double-byte character set.', '日本語は全角文字です。'],
  ['English is single-byte character set.',  '英語は半角文字です。']
].freeze

# Layout/ExtraSpacing: Unnecessary spacing detected. が発生する
INVALID_CONSTANT = [
  ['日本語は全角文字です。', 'Japanese is double-byte character set.'],
  ['英語は半角文字です。',   'English is single-byte character set.']
].freeze

文字数でカウントしているのか、日本語を利用した場合、スペースによるアラインメントがうまく認識されません。

@koic koic added the bug label Jun 13, 2018
@ver-1000000
Copy link
Author

Layout/ExtraSpacingの区分で報告していますが、 #18 と重複しているかもしれません。

私の方では判断できないので、本Issueが不要である場合は適宜closeしてください。 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants