Skip to content

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

@onk

Description

@onk
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions