rubocop / rubocop-jp

A place for RuboCop discussions in Japanese
55 stars 2 forks source link

Layout cop でコード内に全角文字があるときの誤検知(偽陽性)を修正する #18

Open onk opened 7 years ago

onk commented 7 years ago
ascii = {
  "a"  => 1,
  "ab" => 2,
}

fullwidth = {
  "あ"   => 1,
  "あい" => 2,
}
$ rubocop --only Layout/SpaceAroundOperators -D hoge.rb
Inspecting 1 file
C

Offenses:

hoge.rb:7:9: C: Layout/SpaceAroundOperators: Operator => should be surrounded by a single space.
  "あ"   => 1,
        ^^

1 file inspected, 1 offense detected