Skip to content

keyword_quote_linter() could allow quoted names in "balanced expressions" #2055

@MichaelChirico

Description

@MichaelChirico

Follow-up to #2030.

One thing we see with some regularity is usage like

switch(x,
  "a"   = 1,
  "b c" = 2,
  "d"   = 3,
  "e f" = 4
)

Here, the quotes aren't strictly necessary, but can help with readability/consistency.

I would allow such usage by default, and not introduce an option allowing the more strict behavior (hence labeling this false-positive), but we could consider adding such an option as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions