rubocop-lsp 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.github/workflows/main.yml +16 -0
- data/.rubocop.yml +6 -0
- data/.vscode/settings.json +3 -0
- data/Gemfile +10 -0
- data/Gemfile.lock +45 -0
- data/LICENSE.txt +21 -0
- data/README.md +43 -0
- data/Rakefile +8 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/exe/rubocop-lsp +6 -0
- data/lib/rubocop/lsp.rb +8 -0
- data/lib/rubocop/lsp/cli.rb +77 -0
- data/lib/rubocop/lsp/diagnostic_collector.rb +64 -0
- data/lib/rubocop/lsp/diagnostic_store.rb +79 -0
- data/lib/rubocop/lsp/handler.rb +72 -0
- data/lib/rubocop/lsp/version.rb +7 -0
- data/rubocop-lsp.gemspec +33 -0
- metadata +93 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5008f097c351d59bce2270ed7339a927fb6793307512bcef8166e36b95c89d5c
|
4
|
+
data.tar.gz: 2fdfc892459fe05ffbd07c3e0f9af182b91d3ec6b7849792ca169977847fd489
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1f136d5ba9f513c6800daa16ef9f27d6c6241d5a260c303c38ac03673e14edfdcd5ca7327b36d05f14eb4cdeb5a861240ec6306e870d96392f9557cc62ac89df
|
7
|
+
data.tar.gz: 5edada0a8d7b8edc6645cc30ba5f476ff0f7a4670211600d0b4e7fb7a40f0aafeaf2adde292a7095c0d242824ba0d4beee4a68169b40b85362da189985bf0176
|
@@ -0,0 +1,16 @@
|
|
1
|
+
name: Ruby
|
2
|
+
|
3
|
+
on: [push,pull_request]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
build:
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
steps:
|
9
|
+
- uses: actions/checkout@v2
|
10
|
+
- name: Set up Ruby
|
11
|
+
uses: ruby/setup-ruby@v1
|
12
|
+
with:
|
13
|
+
ruby-version: 3.0.1
|
14
|
+
bundler-cache: true
|
15
|
+
- name: Run the default task
|
16
|
+
run: bundle exec rake
|
data/.rubocop.yml
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
rubocop-lsp (0.1.0)
|
5
|
+
language_server-protocol (>= 3.16)
|
6
|
+
rubocop (>= 1.0)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
ast (2.4.2)
|
12
|
+
language_server-protocol (3.16.0.1)
|
13
|
+
parallel (1.20.1)
|
14
|
+
parser (3.0.2.0)
|
15
|
+
ast (~> 2.4.1)
|
16
|
+
rainbow (3.0.0)
|
17
|
+
rake (13.0.6)
|
18
|
+
regexp_parser (2.1.1)
|
19
|
+
rexml (3.2.5)
|
20
|
+
rubocop (1.18.3)
|
21
|
+
parallel (~> 1.10)
|
22
|
+
parser (>= 3.0.0.0)
|
23
|
+
rainbow (>= 2.2.2, < 4.0)
|
24
|
+
regexp_parser (>= 1.8, < 3.0)
|
25
|
+
rexml
|
26
|
+
rubocop-ast (>= 1.7.0, < 2.0)
|
27
|
+
ruby-progressbar (~> 1.7)
|
28
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
29
|
+
rubocop-ast (1.8.0)
|
30
|
+
parser (>= 3.0.1.1)
|
31
|
+
rubocop-shopify (2.2.0)
|
32
|
+
rubocop (~> 1.18)
|
33
|
+
ruby-progressbar (1.11.0)
|
34
|
+
unicode-display_width (2.0.0)
|
35
|
+
|
36
|
+
PLATFORMS
|
37
|
+
x86_64-darwin-20
|
38
|
+
|
39
|
+
DEPENDENCIES
|
40
|
+
rake (~> 13.0)
|
41
|
+
rubocop-lsp!
|
42
|
+
rubocop-shopify (~> 2.2)
|
43
|
+
|
44
|
+
BUNDLED WITH
|
45
|
+
2.2.20
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2021 Ufuk Kayserilioglu
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
# RuboCop LSP
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/rubocop/lsp`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'rubocop-lsp'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle install
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install rubocop-lsp
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/paracycle/rubocop-lsp. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/paracycle/rubocop-lsp/blob/main/CODE_OF_CONDUCT.md).
|
36
|
+
|
37
|
+
## License
|
38
|
+
|
39
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
40
|
+
|
41
|
+
## Code of Conduct
|
42
|
+
|
43
|
+
Everyone interacting in the Rubocop::Lsp project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/paracycle/rubocop-lsp/blob/main/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require "bundler/setup"
|
5
|
+
require "rubocop/lsp"
|
6
|
+
|
7
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
+
# with your gem easier. You can also use a different console, if you like.
|
9
|
+
|
10
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
+
# require "pry"
|
12
|
+
# Pry.start
|
13
|
+
|
14
|
+
require "irb"
|
15
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/exe/rubocop-lsp
ADDED
data/lib/rubocop/lsp.rb
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "rubocop"
|
4
|
+
require "language_server-protocol"
|
5
|
+
|
6
|
+
require "rubocop/lsp"
|
7
|
+
require "rubocop/lsp/handler"
|
8
|
+
|
9
|
+
module Rubocop
|
10
|
+
module Lsp
|
11
|
+
module Cli
|
12
|
+
Interface = LanguageServer::Protocol::Interface
|
13
|
+
Constant = LanguageServer::Protocol::Constant
|
14
|
+
|
15
|
+
def self.start(_argv)
|
16
|
+
handler = Handler.new
|
17
|
+
|
18
|
+
handler.config do
|
19
|
+
on("initialize") do
|
20
|
+
DiagnosticStore.clear_diagnostics
|
21
|
+
Interface::InitializeResult.new(
|
22
|
+
capabilities: Interface::ServerCapabilities.new(
|
23
|
+
text_document_sync: Interface::TextDocumentSyncOptions.new(
|
24
|
+
change: Constant::TextDocumentSyncKind::FULL,
|
25
|
+
open_close: true
|
26
|
+
),
|
27
|
+
code_action_provider: true
|
28
|
+
),
|
29
|
+
)
|
30
|
+
end
|
31
|
+
|
32
|
+
on("shutdown") do
|
33
|
+
DiagnosticStore.clear_diagnostics
|
34
|
+
nil
|
35
|
+
end
|
36
|
+
|
37
|
+
on("textDocument/didChange") do |request|
|
38
|
+
uri = request[:params][:textDocument][:uri]
|
39
|
+
text = request[:params][:contentChanges][0][:text]
|
40
|
+
|
41
|
+
send_diagnostics(uri: uri, text: text)
|
42
|
+
|
43
|
+
nil
|
44
|
+
end
|
45
|
+
|
46
|
+
on("textDocument/didOpen") do |request|
|
47
|
+
uri = request[:params][:textDocument][:uri]
|
48
|
+
text = request[:params][:textDocument][:text]
|
49
|
+
|
50
|
+
send_diagnostics(uri: uri, text: text)
|
51
|
+
|
52
|
+
nil
|
53
|
+
end
|
54
|
+
|
55
|
+
on("textDocument/didClose") do |request|
|
56
|
+
uri = request[:params][:textDocument][:uri]
|
57
|
+
|
58
|
+
DiagnosticStore.remove_diagnostics_for(uri)
|
59
|
+
|
60
|
+
send_diagnostics(uri: uri, diagnostics: [])
|
61
|
+
|
62
|
+
nil
|
63
|
+
end
|
64
|
+
|
65
|
+
on("textDocument/codeAction") do |request|
|
66
|
+
uri = request[:params][:textDocument][:uri]
|
67
|
+
range = request[:params][:range]
|
68
|
+
|
69
|
+
DiagnosticStore.code_actions_for(uri, range)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
handler.start
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class DiagnosticCollector < RuboCop::Formatter::BaseFormatter
|
4
|
+
Interface = LanguageServer::Protocol::Interface
|
5
|
+
Constant = LanguageServer::Protocol::Constant
|
6
|
+
|
7
|
+
attr_reader :diagnostics
|
8
|
+
|
9
|
+
def initialize
|
10
|
+
super({}, nil)
|
11
|
+
end
|
12
|
+
|
13
|
+
def run(file:, text:)
|
14
|
+
config_store = ::RuboCop::ConfigStore.new
|
15
|
+
options, paths = ::RuboCop::Options.new.parse(["--stderr"])
|
16
|
+
# config_store.options_config = options[:config] if options[:config]
|
17
|
+
options[:stdin] = text
|
18
|
+
paths << file
|
19
|
+
runner = ::RuboCop::Runner.new(options, config_store)
|
20
|
+
runner.send(:formatter_set).clear.push(self)
|
21
|
+
runner.run(paths)
|
22
|
+
end
|
23
|
+
|
24
|
+
def file_finished(_file, offenses)
|
25
|
+
@diagnostics = offenses.map do |offense|
|
26
|
+
diagnostic_from_offense(offense)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
private
|
31
|
+
|
32
|
+
def diagnostic_from_offense(offense)
|
33
|
+
Interface::Diagnostic.new(
|
34
|
+
message: offense.message,
|
35
|
+
severity: Constant::DiagnosticSeverity::INFORMATION,
|
36
|
+
range: Interface::Range.new(
|
37
|
+
start: Interface::Position.new(line: offense.line - 1, character: offense.column),
|
38
|
+
end: Interface::Position.new(line: offense.last_line - 1, character: offense.last_column)
|
39
|
+
),
|
40
|
+
data: {
|
41
|
+
cop_name: offense.cop_name,
|
42
|
+
edits: replacements_from_offense(offense),
|
43
|
+
}
|
44
|
+
)
|
45
|
+
end
|
46
|
+
|
47
|
+
def replacements_from_offense(offense)
|
48
|
+
return unless offense.correctable?
|
49
|
+
|
50
|
+
offense.corrector.as_replacements.map do |range, replacement|
|
51
|
+
edit_from_replacement(range, replacement)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
def edit_from_replacement(range, replacement)
|
56
|
+
Interface::TextEdit.new(
|
57
|
+
range: Interface::Range.new(
|
58
|
+
start: Interface::Position.new(line: range.line - 1, character: range.column),
|
59
|
+
end: Interface::Position.new(line: range.last_line - 1, character: range.last_column)
|
60
|
+
),
|
61
|
+
new_text: replacement
|
62
|
+
)
|
63
|
+
end
|
64
|
+
end
|
@@ -0,0 +1,79 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module DiagnosticStore
|
4
|
+
@diagnostic_map = {}
|
5
|
+
|
6
|
+
def self.clear_diagnostics
|
7
|
+
@diagnostic_map = {}
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.remove_diagnostics_for(uri)
|
11
|
+
@diagnostic_map.delete(uri)
|
12
|
+
[]
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.set_diagnostics_for(uri, diagnostics)
|
16
|
+
@diagnostic_map[uri] = diagnostics
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.diagnostics_for(uri)
|
20
|
+
@diagnostic_map[uri] || []
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.code_actions_for(uri, range)
|
24
|
+
line_range = Range.new(range[:start][:line], range[:end][:line])
|
25
|
+
|
26
|
+
file_diagnostics = diagnostics_for(uri)
|
27
|
+
line_diagnostics = file_diagnostics.select { |diagnostic| line_range.include?(diagnostic.range.start.line) }
|
28
|
+
actions = line_diagnostics.map { |diagnostic| code_action_from(uri, diagnostic) }
|
29
|
+
|
30
|
+
unless actions.empty?
|
31
|
+
actions << code_action_from_diagnostics(uri, line_diagnostics, title: "Autocorrect all offenses on line")
|
32
|
+
actions << code_action_from_diagnostics(uri, file_diagnostics, title: "Autocorrect all offenses in file")
|
33
|
+
end
|
34
|
+
|
35
|
+
actions
|
36
|
+
end
|
37
|
+
|
38
|
+
def self.code_action_from_diagnostics(uri, diagnostics, title:)
|
39
|
+
diagnostics = diagnostics.sort_by do |diagnostic|
|
40
|
+
[diagnostic.range.start.line, diagnostic.range.start.character]
|
41
|
+
end
|
42
|
+
|
43
|
+
LanguageServer::Protocol::Interface::CodeAction.new(
|
44
|
+
title: title,
|
45
|
+
kind: "rubocop.fix",
|
46
|
+
edit: LanguageServer::Protocol::Interface::WorkspaceEdit.new(
|
47
|
+
document_changes: [
|
48
|
+
LanguageServer::Protocol::Interface::TextDocumentEdit.new(
|
49
|
+
text_document: LanguageServer::Protocol::Interface::OptionalVersionedTextDocumentIdentifier.new(
|
50
|
+
uri: uri,
|
51
|
+
version: nil
|
52
|
+
),
|
53
|
+
edits: diagnostics.flat_map { |d| d.data[:edits] }
|
54
|
+
),
|
55
|
+
]
|
56
|
+
),
|
57
|
+
is_preferred: true,
|
58
|
+
)
|
59
|
+
end
|
60
|
+
|
61
|
+
def self.code_action_from(uri, diagnostic)
|
62
|
+
LanguageServer::Protocol::Interface::CodeAction.new(
|
63
|
+
title: "Autocorrect `#{diagnostic.data[:cop_name]}`",
|
64
|
+
kind: LanguageServer::Protocol::Constant::CodeActionKind::QUICK_FIX,
|
65
|
+
edit: LanguageServer::Protocol::Interface::WorkspaceEdit.new(
|
66
|
+
document_changes: [
|
67
|
+
LanguageServer::Protocol::Interface::TextDocumentEdit.new(
|
68
|
+
text_document: LanguageServer::Protocol::Interface::OptionalVersionedTextDocumentIdentifier.new(
|
69
|
+
uri: uri,
|
70
|
+
version: nil
|
71
|
+
),
|
72
|
+
edits: diagnostic.data[:edits]
|
73
|
+
),
|
74
|
+
]
|
75
|
+
),
|
76
|
+
is_preferred: true,
|
77
|
+
)
|
78
|
+
end
|
79
|
+
end
|
@@ -0,0 +1,72 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "rubocop/lsp/diagnostic_store"
|
4
|
+
require "rubocop/lsp/diagnostic_collector"
|
5
|
+
|
6
|
+
class Handler
|
7
|
+
Interface = LanguageServer::Protocol::Interface
|
8
|
+
Constant = LanguageServer::Protocol::Constant
|
9
|
+
|
10
|
+
attr_reader :writer, :reader
|
11
|
+
|
12
|
+
def initialize
|
13
|
+
@writer = LanguageServer::Protocol::Transport::Stdio::Writer.new
|
14
|
+
@reader = LanguageServer::Protocol::Transport::Stdio::Reader.new
|
15
|
+
@handlers = {}
|
16
|
+
end
|
17
|
+
|
18
|
+
def config(&blk)
|
19
|
+
instance_exec(&blk)
|
20
|
+
end
|
21
|
+
|
22
|
+
def start
|
23
|
+
reader.read do |request|
|
24
|
+
handle(request)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
private
|
29
|
+
|
30
|
+
def on(message, &blk)
|
31
|
+
@handlers[message.to_s] = blk
|
32
|
+
end
|
33
|
+
|
34
|
+
def handler_for(request)
|
35
|
+
@handlers[request[:method]]
|
36
|
+
end
|
37
|
+
|
38
|
+
def handle(request)
|
39
|
+
log("Got request method: #{request[:method]}")
|
40
|
+
handler = handler_for(request)
|
41
|
+
result = handler.call(request) if handler
|
42
|
+
writer.write(id: request[:id], result: result) if result
|
43
|
+
end
|
44
|
+
|
45
|
+
def log(msg)
|
46
|
+
$stderr.puts(msg)
|
47
|
+
end
|
48
|
+
|
49
|
+
def notify(method:, params: {})
|
50
|
+
log("In notify: #{writer}")
|
51
|
+
writer.write(method: method, params: params)
|
52
|
+
end
|
53
|
+
|
54
|
+
def send_diagnostics(uri:, text: nil, diagnostics: [])
|
55
|
+
diagnostics = collect_diagnostics(uri: uri, text: text) if text
|
56
|
+
|
57
|
+
notify(
|
58
|
+
method: "textDocument/publishDiagnostics",
|
59
|
+
params: Interface::PublishDiagnosticsParams.new(
|
60
|
+
uri: uri,
|
61
|
+
diagnostics: diagnostics
|
62
|
+
)
|
63
|
+
)
|
64
|
+
end
|
65
|
+
|
66
|
+
def collect_diagnostics(uri:, text:)
|
67
|
+
file = CGI.unescape(URI.parse(uri).path)
|
68
|
+
collector = DiagnosticCollector.new
|
69
|
+
collector.run(file: file, text: text)
|
70
|
+
DiagnosticStore.set_diagnostics_for(uri, collector.diagnostics)
|
71
|
+
end
|
72
|
+
end
|
data/rubocop-lsp.gemspec
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "lib/rubocop/lsp/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "rubocop-lsp"
|
7
|
+
spec.version = Rubocop::Lsp::VERSION
|
8
|
+
spec.authors = ["Shopify"]
|
9
|
+
spec.email = ["ruby@shopify.com"]
|
10
|
+
|
11
|
+
spec.summary = "A Language Server Provider for RuboCop"
|
12
|
+
spec.homepage = "https://github.com/Shopify/rubocop-lsp"
|
13
|
+
spec.license = "MIT"
|
14
|
+
spec.required_ruby_version = ">= 2.6.0"
|
15
|
+
|
16
|
+
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
17
|
+
|
18
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
19
|
+
spec.metadata["source_code_uri"] = "https://github.com/Shopify/rubocop-lsp"
|
20
|
+
|
21
|
+
# Specify which files should be added to the gem when it is released.
|
22
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
23
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
24
|
+
%x(git ls-files -z).split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
|
25
|
+
end
|
26
|
+
spec.bindir = "exe"
|
27
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
28
|
+
spec.require_paths = ["lib"]
|
29
|
+
|
30
|
+
# Uncomment to register a new dependency of your gem
|
31
|
+
spec.add_dependency("rubocop", ">= 1.0")
|
32
|
+
spec.add_dependency("language_server-protocol", ">= 3.16")
|
33
|
+
end
|
metadata
ADDED
@@ -0,0 +1,93 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rubocop-lsp
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Shopify
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2021-07-22 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rubocop
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: language_server-protocol
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '3.16'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '3.16'
|
41
|
+
description:
|
42
|
+
email:
|
43
|
+
- ruby@shopify.com
|
44
|
+
executables:
|
45
|
+
- rubocop-lsp
|
46
|
+
extensions: []
|
47
|
+
extra_rdoc_files: []
|
48
|
+
files:
|
49
|
+
- ".github/workflows/main.yml"
|
50
|
+
- ".rubocop.yml"
|
51
|
+
- ".vscode/settings.json"
|
52
|
+
- Gemfile
|
53
|
+
- Gemfile.lock
|
54
|
+
- LICENSE.txt
|
55
|
+
- README.md
|
56
|
+
- Rakefile
|
57
|
+
- bin/console
|
58
|
+
- bin/setup
|
59
|
+
- exe/rubocop-lsp
|
60
|
+
- lib/rubocop/lsp.rb
|
61
|
+
- lib/rubocop/lsp/cli.rb
|
62
|
+
- lib/rubocop/lsp/diagnostic_collector.rb
|
63
|
+
- lib/rubocop/lsp/diagnostic_store.rb
|
64
|
+
- lib/rubocop/lsp/handler.rb
|
65
|
+
- lib/rubocop/lsp/version.rb
|
66
|
+
- rubocop-lsp.gemspec
|
67
|
+
homepage: https://github.com/Shopify/rubocop-lsp
|
68
|
+
licenses:
|
69
|
+
- MIT
|
70
|
+
metadata:
|
71
|
+
allowed_push_host: https://rubygems.org
|
72
|
+
homepage_uri: https://github.com/Shopify/rubocop-lsp
|
73
|
+
source_code_uri: https://github.com/Shopify/rubocop-lsp
|
74
|
+
post_install_message:
|
75
|
+
rdoc_options: []
|
76
|
+
require_paths:
|
77
|
+
- lib
|
78
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 2.6.0
|
83
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
84
|
+
requirements:
|
85
|
+
- - ">="
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '0'
|
88
|
+
requirements: []
|
89
|
+
rubygems_version: 3.2.20
|
90
|
+
signing_key:
|
91
|
+
specification_version: 4
|
92
|
+
summary: A Language Server Provider for RuboCop
|
93
|
+
test_files: []
|