spoom 1.2.2 → 1.2.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/README.md +10 -0
- data/lib/spoom/backtrace_filter/minitest.rb +21 -0
- data/lib/spoom/cli/coverage.rb +1 -1
- data/lib/spoom/context/git.rb +4 -4
- data/lib/spoom/context/sorbet.rb +6 -6
- data/lib/spoom/deadcode/erb.rb +4 -4
- data/lib/spoom/deadcode/indexer.rb +83 -6
- data/lib/spoom/deadcode/location.rb +29 -1
- data/lib/spoom/deadcode/plugins/action_mailer.rb +21 -0
- data/lib/spoom/deadcode/plugins/actionpack.rb +61 -0
- data/lib/spoom/deadcode/plugins/active_job.rb +13 -0
- data/lib/spoom/deadcode/plugins/active_model.rb +46 -0
- data/lib/spoom/deadcode/plugins/active_record.rb +111 -0
- data/lib/spoom/deadcode/plugins/active_support.rb +21 -0
- data/lib/spoom/deadcode/plugins/base.rb +354 -0
- data/lib/spoom/deadcode/plugins/graphql.rb +47 -0
- data/lib/spoom/deadcode/plugins/minitest.rb +28 -0
- data/lib/spoom/deadcode/plugins/namespaces.rb +34 -0
- data/lib/spoom/deadcode/plugins/rails.rb +31 -0
- data/lib/spoom/deadcode/plugins/rake.rb +12 -0
- data/lib/spoom/deadcode/plugins/rspec.rb +19 -0
- data/lib/spoom/deadcode/plugins/rubocop.rb +41 -0
- data/lib/spoom/deadcode/plugins/ruby.rb +65 -0
- data/lib/spoom/deadcode/plugins/sorbet.rb +46 -0
- data/lib/spoom/deadcode/plugins/thor.rb +21 -0
- data/lib/spoom/deadcode/plugins.rb +95 -0
- data/lib/spoom/deadcode/remover.rb +616 -0
- data/lib/spoom/deadcode/send.rb +22 -0
- data/lib/spoom/deadcode.rb +8 -6
- data/lib/spoom/sorbet/lsp.rb +2 -2
- data/lib/spoom/sorbet/sigils.rb +2 -2
- data/lib/spoom/sorbet.rb +1 -0
- data/lib/spoom/version.rb +1 -1
- metadata +24 -18
data/lib/spoom/sorbet/sigils.rb
CHANGED
@@ -28,7 +28,7 @@ module Spoom
|
|
28
28
|
T::Array[String],
|
29
29
|
)
|
30
30
|
|
31
|
-
SIGIL_REGEXP = T.let(/^#[
|
31
|
+
SIGIL_REGEXP = T.let(/^#[[:blank:]]*typed:[[:blank:]]*(\S*)/, Regexp)
|
32
32
|
|
33
33
|
class << self
|
34
34
|
extend T::Sig
|
@@ -61,7 +61,7 @@ module Spoom
|
|
61
61
|
# * returns nil if no sigil
|
62
62
|
sig { params(path: T.any(String, Pathname)).returns(T.nilable(String)) }
|
63
63
|
def file_strictness(path)
|
64
|
-
return
|
64
|
+
return unless File.file?(path)
|
65
65
|
|
66
66
|
content = File.read(path, encoding: Encoding::ASCII_8BIT)
|
67
67
|
strictness_in_content(content)
|
data/lib/spoom/sorbet.rb
CHANGED
@@ -35,6 +35,7 @@ module Spoom
|
|
35
35
|
|
36
36
|
CONFIG_PATH = "sorbet/config"
|
37
37
|
GEM_PATH = T.let(Gem::Specification.find_by_name("sorbet-static").full_gem_path, String)
|
38
|
+
GEM_VERSION = T.let(Gem::Specification.find_by_name("sorbet-static-and-runtime").version.to_s, String)
|
38
39
|
BIN_PATH = T.let((Pathname.new(GEM_PATH) / "libexec" / "sorbet").to_s, String)
|
39
40
|
|
40
41
|
KILLED_CODE = 137
|
data/lib/spoom/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spoom
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexandre Terrasa
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -81,7 +81,7 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 1.10.0
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name: sorbet
|
84
|
+
name: sorbet-static-and-runtime
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - ">="
|
@@ -94,20 +94,6 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: 0.5.10187
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: sorbet-runtime
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - ">="
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: 0.5.9204
|
104
|
-
type: :runtime
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - ">="
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: 0.5.9204
|
111
97
|
- !ruby/object:Gem::Dependency
|
112
98
|
name: syntax_tree
|
113
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -149,6 +135,7 @@ files:
|
|
149
135
|
- Rakefile
|
150
136
|
- exe/spoom
|
151
137
|
- lib/spoom.rb
|
138
|
+
- lib/spoom/backtrace_filter/minitest.rb
|
152
139
|
- lib/spoom/cli.rb
|
153
140
|
- lib/spoom/cli/bump.rb
|
154
141
|
- lib/spoom/cli/config.rb
|
@@ -177,7 +164,26 @@ files:
|
|
177
164
|
- lib/spoom/deadcode/index.rb
|
178
165
|
- lib/spoom/deadcode/indexer.rb
|
179
166
|
- lib/spoom/deadcode/location.rb
|
167
|
+
- lib/spoom/deadcode/plugins.rb
|
168
|
+
- lib/spoom/deadcode/plugins/action_mailer.rb
|
169
|
+
- lib/spoom/deadcode/plugins/actionpack.rb
|
170
|
+
- lib/spoom/deadcode/plugins/active_job.rb
|
171
|
+
- lib/spoom/deadcode/plugins/active_model.rb
|
172
|
+
- lib/spoom/deadcode/plugins/active_record.rb
|
173
|
+
- lib/spoom/deadcode/plugins/active_support.rb
|
174
|
+
- lib/spoom/deadcode/plugins/base.rb
|
175
|
+
- lib/spoom/deadcode/plugins/graphql.rb
|
176
|
+
- lib/spoom/deadcode/plugins/minitest.rb
|
177
|
+
- lib/spoom/deadcode/plugins/namespaces.rb
|
178
|
+
- lib/spoom/deadcode/plugins/rails.rb
|
179
|
+
- lib/spoom/deadcode/plugins/rake.rb
|
180
|
+
- lib/spoom/deadcode/plugins/rspec.rb
|
181
|
+
- lib/spoom/deadcode/plugins/rubocop.rb
|
182
|
+
- lib/spoom/deadcode/plugins/ruby.rb
|
183
|
+
- lib/spoom/deadcode/plugins/sorbet.rb
|
184
|
+
- lib/spoom/deadcode/plugins/thor.rb
|
180
185
|
- lib/spoom/deadcode/reference.rb
|
186
|
+
- lib/spoom/deadcode/remover.rb
|
181
187
|
- lib/spoom/deadcode/send.rb
|
182
188
|
- lib/spoom/file_collector.rb
|
183
189
|
- lib/spoom/file_tree.rb
|
@@ -216,7 +222,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
216
222
|
- !ruby/object:Gem::Version
|
217
223
|
version: '0'
|
218
224
|
requirements: []
|
219
|
-
rubygems_version: 3.4.
|
225
|
+
rubygems_version: 3.4.19
|
220
226
|
signing_key:
|
221
227
|
specification_version: 4
|
222
228
|
summary: Useful tools for Sorbet enthusiasts.
|