ruby / syntax_suggest

Searching for unexpected `end` syntax errors takes a lot of time. Let this gem do it for you!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Handle large files better

schneems opened this issue · comments

Right now when finding syntax errors in files with hundreds/thousands of lines, the output is simplified but can still be overwhelming.

My proposal is that we simplify the file so that only the "invalid block" and the indentation around it renders. Example:

class Dog
  module Talk
    def speak
    end

    defwoof
    end

    def bark
    end
  end
end

class Cat
  def meow
  end
end

Could be simplified to

class Dog
  module Talk
    defwoof
    end
  end
end

So that it has the surrounding context is present for visual verification, but the outcome is much smaller (hopefully)