Skip to content

Missing label "naked bracket" #84

Description

@schneems

If a developer wanted to return an empty hash or array but forgot one side of the bracket, we don't always label it.

This has a label:

$ exe/dead_end /tmp/scratch.rb

DeadEnd: Unmatched `]` detected

file: /tmp/scratch.rb
simplified:

      1  def foo
    ❯ 2    [
      3  end

But not:

$ exe/dead_end /tmp/scratch.rb

file: /tmp/scratch.rb
simplified:

      1  def foo
    ❯ 2    ]
      3  end

The syntax error is this one, which we're not catching for annotation:

$ ruby -wc /tmp/scratch.rb
/tmp/scratch.rb:2: syntax error, unexpected ']'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions