Skip to content

Commit

Permalink
backport de139d7
Browse files Browse the repository at this point in the history
  • Loading branch information
searls committed Jun 23, 2024
1 parent f51abba commit 5ce7a2b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/ruby_lsp/standard/wraps_built_in_lsp_standardizer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def run_diagnostic(uri, document)
severity: severity,
range: RubyLsp::Interface::Range.new(
start: RubyLsp::Interface::Position.new(line: loc[:start_line] - 1, character: loc[:start_column] - 1),
end: RubyLsp::Interface::Position.new(line: loc[:last_line] - 1, character: loc[:last_column] - 1)
end: RubyLsp::Interface::Position.new(line: loc[:last_line] - 1, character: loc[:last_column])
)
# TODO: We need to do something like to support quickfixes thru code actions
# See: https://github.com/Shopify/ruby-lsp/blob/4c1906172add4d5c39c35d3396aa29c768bfb898/lib/ruby_lsp/requests/support/rubocop_diagnostic.rb#L62
Expand Down
2 changes: 1 addition & 1 deletion test/ruby_lsp_addon_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def test_diagnostic
assert_equal 1, result.response.items.size
item = result.response.items.first
assert_equal({line: 0, character: 4}, item.range.start.to_hash)
assert_equal({line: 0, character: 10}, item.range.end.to_hash)
assert_equal({line: 0, character: 11}, item.range.end.to_hash)
assert_equal RubyLsp::Constant::DiagnosticSeverity::INFORMATION, item.severity
assert_equal "Style/StringLiterals", item.code
assert_equal "https://docs.rubocop.org/rubocop/cops_style.html#stylestringliterals", item.code_description.href
Expand Down

0 comments on commit 5ce7a2b

Please sign in to comment.