mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
[ruby/syntax_suggest] Remove duplicate error messages
Before:
```
Expected a newline or semicolon after the statement
Cannot parse the expression
Expected a newline or semicolon after the statement
Cannot parse the expression
1 describe "webmock tests" do
22 it "body" do
27 query = Cutlass::FunctionQuery.new(
> 28 port: port
> 29 body: body
30 ).call
34 end
35 end
```
After:
```
Expected a newline or semicolon after the statement
Cannot parse the expression
1 describe "webmock tests" do
22 it "body" do
27 query = Cutlass::FunctionQuery.new(
> 28 port: port
> 29 body: body
30 ).call
34 end
35 end
```
becf097e5e
This commit is contained in:
parent
6d39d6d214
commit
c175e265da
1 changed files with 1 additions and 1 deletions
|
@ -108,7 +108,7 @@ module SyntaxSuggest
|
|||
# on the original error messages
|
||||
def errors
|
||||
if missing.empty?
|
||||
return GetParseErrors.errors(@code_lines.map(&:original).join)
|
||||
return GetParseErrors.errors(@code_lines.map(&:original).join).uniq
|
||||
end
|
||||
|
||||
missing.map { |miss| why(miss) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue