rubocop-lsp 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/rubocop/lsp/diagnostic_store.rb +7 -1
- data/lib/rubocop/lsp/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c17a7ea5c41b994245f6f8d3231d64bd14debc7d694383f2e847f0ccef92d82
|
4
|
+
data.tar.gz: c1b2f65bfd943cc815ac35196660296f11e89bdfd6945f605014c813c7244489
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ffacb6a3e97dd4d3d70e8c36daf9a6d3864b1a732ea09fa5bb6f92cba96ea7cb4ac15d8e384fd82b839dea513af5de15da072289cbad99e90d80f9bb81298a3f
|
7
|
+
data.tar.gz: 6d37b9ee07feda017345dd717c26c158d8cafe154d2b3c61b89d460d1edcc092cebfeb7fe68d1167e7036d097de9a41347b3208e19a438c355327037739ef4ca
|
data/Gemfile.lock
CHANGED
@@ -20,10 +20,16 @@ module DiagnosticStore
|
|
20
20
|
@diagnostic_map[uri] || []
|
21
21
|
end
|
22
22
|
|
23
|
+
def self.correctable_diagnostics_for(uri)
|
24
|
+
diagnostics_for(uri).reject do |diagnostic|
|
25
|
+
diagnostic.data[:edits].nil?
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
23
29
|
def self.code_actions_for(uri, range)
|
24
30
|
line_range = Range.new(range[:start][:line], range[:end][:line])
|
25
31
|
|
26
|
-
file_diagnostics =
|
32
|
+
file_diagnostics = correctable_diagnostics_for(uri)
|
27
33
|
line_diagnostics = file_diagnostics.select { |diagnostic| line_range.include?(diagnostic.range.start.line) }
|
28
34
|
actions = line_diagnostics.map { |diagnostic| code_action_from(uri, diagnostic) }
|
29
35
|
|
data/lib/rubocop/lsp/version.rb
CHANGED