rubocop-lsp 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5008f097c351d59bce2270ed7339a927fb6793307512bcef8166e36b95c89d5c
4
- data.tar.gz: 2fdfc892459fe05ffbd07c3e0f9af182b91d3ec6b7849792ca169977847fd489
3
+ metadata.gz: 3c17a7ea5c41b994245f6f8d3231d64bd14debc7d694383f2e847f0ccef92d82
4
+ data.tar.gz: c1b2f65bfd943cc815ac35196660296f11e89bdfd6945f605014c813c7244489
5
5
  SHA512:
6
- metadata.gz: 1f136d5ba9f513c6800daa16ef9f27d6c6241d5a260c303c38ac03673e14edfdcd5ca7327b36d05f14eb4cdeb5a861240ec6306e870d96392f9557cc62ac89df
7
- data.tar.gz: 5edada0a8d7b8edc6645cc30ba5f476ff0f7a4670211600d0b4e7fb7a40f0aafeaf2adde292a7095c0d242824ba0d4beee4a68169b40b85362da189985bf0176
6
+ metadata.gz: ffacb6a3e97dd4d3d70e8c36daf9a6d3864b1a732ea09fa5bb6f92cba96ea7cb4ac15d8e384fd82b839dea513af5de15da072289cbad99e90d80f9bb81298a3f
7
+ data.tar.gz: 6d37b9ee07feda017345dd717c26c158d8cafe154d2b3c61b89d460d1edcc092cebfeb7fe68d1167e7036d097de9a41347b3208e19a438c355327037739ef4ca
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rubocop-lsp (0.1.0)
4
+ rubocop-lsp (0.1.1)
5
5
  language_server-protocol (>= 3.16)
6
6
  rubocop (>= 1.0)
7
7
 
@@ -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 = diagnostics_for(uri)
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
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Rubocop
4
4
  module Lsp
5
- VERSION = "0.1.0"
5
+ VERSION = "0.1.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-lsp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify