ruby-lsp 0.26.3 → 0.26.4
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 +4 -4
- data/VERSION +1 -1
- data/lib/ruby_lsp/requests/support/rubocop_runner.rb +6 -10
- 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: 9873a3783f44e51f4631155591716e140f79732f0c1e0bf268aedc09ec670eb7
|
|
4
|
+
data.tar.gz: 2d84a75fc80b719cbf50df63f66c08d096077adbd2256551370664e7f33ad81c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cba3944e32212c7f2376b26659388e5a2b59c04eb454b475e605b543b0e208ea518e99330a942acc3b1ca66dcba829f8b74dbdba5ed63bee263ca6556da06803
|
|
7
|
+
data.tar.gz: 2d10390c082fc925ae90e2cd630c58ac44649086d775d0ca6d0dd046c886fc0dd6577d386b6011e54decacac93d115ccaaf5cad5b1db0f73f76ab0f31110ca0d
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.26.
|
|
1
|
+
0.26.4
|
|
@@ -61,14 +61,6 @@ module RubyLsp
|
|
|
61
61
|
"RuboCop::Formatter::BaseFormatter", # Suppress any output by using the base formatter
|
|
62
62
|
] #: Array[String]
|
|
63
63
|
|
|
64
|
-
# Functionality was introduced in 1.75.0 but had issues with autocorrect
|
|
65
|
-
REUSE_PRISM_RESULT = begin
|
|
66
|
-
gem("rubocop", ">= 1.80.1")
|
|
67
|
-
true
|
|
68
|
-
rescue LoadError
|
|
69
|
-
false
|
|
70
|
-
end #: bool
|
|
71
|
-
|
|
72
64
|
#: Array[::RuboCop::Cop::Offense]
|
|
73
65
|
attr_reader :offenses
|
|
74
66
|
|
|
@@ -89,7 +81,7 @@ module RubyLsp
|
|
|
89
81
|
@offenses = [] #: Array[::RuboCop::Cop::Offense]
|
|
90
82
|
@errors = [] #: Array[String]
|
|
91
83
|
@warnings = [] #: Array[String]
|
|
92
|
-
@prism_result = nil #: Prism::ParseLexResult?
|
|
84
|
+
# @prism_result = nil #: Prism::ParseLexResult?
|
|
93
85
|
|
|
94
86
|
args += DEFAULT_ARGS
|
|
95
87
|
rubocop_options = ::RuboCop::Options.new.parse(args).first
|
|
@@ -109,7 +101,11 @@ module RubyLsp
|
|
|
109
101
|
@warnings = []
|
|
110
102
|
@offenses = []
|
|
111
103
|
@options[:stdin] = contents
|
|
112
|
-
|
|
104
|
+
|
|
105
|
+
# Setting the Prism result before running the RuboCop runner makes it reuse the existing AST and avoids
|
|
106
|
+
# double-parsing. Unfortunately, this leads to a bunch of cops failing to execute properly under LSP mode.
|
|
107
|
+
# Uncomment this once reusing the Prism result is more stable
|
|
108
|
+
# @prism_result = prism_result
|
|
113
109
|
|
|
114
110
|
super([path])
|
|
115
111
|
|