mangrove 0.9.1 → 0.10.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -1
  3. data/README.md +1 -2
  4. data/docs/Mangrove/ControlFlow/ControlSignal.html +2 -2
  5. data/docs/Mangrove/ControlFlow.html +2 -2
  6. data/docs/Mangrove/Option/ControlSignal.html +2 -2
  7. data/docs/Mangrove/Option/None.html +2 -2
  8. data/docs/Mangrove/Option/Some.html +2 -2
  9. data/docs/Mangrove/Option.html +2 -2
  10. data/docs/Mangrove/Result/ControlSignal.html +2 -2
  11. data/docs/Mangrove/Result/Err.html +2 -2
  12. data/docs/Mangrove/Result/Ok.html +2 -2
  13. data/docs/Mangrove/Result.html +2 -2
  14. data/docs/Mangrove.html +3 -3
  15. data/docs/_index.html +8 -8
  16. data/docs/file.README.html +3 -5
  17. data/docs/index.html +3 -5
  18. data/docs/method_list.html +106 -106
  19. data/docs/top-level-namespace.html +2 -2
  20. data/lib/mangrove/version.rb +1 -1
  21. data/sorbet/rbi/gems/.gitattributes +1 -0
  22. data/sorbet/rbi/gems/erubi@1.12.0.rbi +2 -1
  23. data/sorbet/rbi/gems/prism@0.15.1.rbi +8 -0
  24. data/sorbet/rbi/gems/{rbi@0.0.17.rbi → rbi@0.1.1.rbi} +202 -248
  25. data/sorbet/rbi/gems/rubocop-capybara@2.19.0.rbi +1125 -0
  26. data/sorbet/rbi/gems/rubocop-factory_bot@2.24.0.rbi +878 -0
  27. data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +328 -0
  28. data/sorbet/rbi/gems/rubocop-rspec@2.24.1.rbi +7991 -0
  29. data/sorbet/rbi/gems/{spoom@1.2.3.rbi → spoom@1.2.4.rbi} +634 -60
  30. data/sorbet/rbi/gems/{syntax_tree@6.1.1.rbi → syntax_tree@6.2.0.rbi} +2495 -2214
  31. data/sorbet/rbi/gems/{tapioca@0.11.8.rbi → tapioca@0.11.9.rbi} +503 -356
  32. data/sorbet/rbi/gems/{thor@1.2.2.rbi → thor@1.3.0.rbi} +775 -395
  33. data/sorbet/rbi/gems/unparser@0.6.9.rbi +8 -0
  34. data/sorbet/rbi/gems/yarp@0.13.0.rbi +21646 -0
  35. metadata +21 -14
  36. data/sorbet/rbi/gems/unparser@0.6.8.rbi +0 -4525
  37. /data/sorbet/rbi/gems/{parser@3.2.2.3.rbi → parser@3.2.2.4.rbi} +0 -0
  38. /data/sorbet/rbi/gems/{regexp_parser@2.8.1.rbi → regexp_parser@2.8.2.rbi} +0 -0
  39. /data/sorbet/rbi/gems/{rubocop@1.56.0.rbi → rubocop@1.57.1.rbi} +0 -0
  40. /data/sorbet/rbi/gems/{ruby-lsp@0.8.0.rbi → ruby-lsp@0.12.0.rbi} +0 -0
  41. /data/sorbet/rbi/gems/{unicode-display_width@2.4.2.rbi → unicode-display_width@2.5.0.rbi} +0 -0
@@ -221,22 +221,22 @@ class Spoom::Cli::Main < ::Thor
221
221
  # source://spoom//lib/spoom/cli.rb#61
222
222
  def __print_version; end
223
223
 
224
- # source://thor/1.2.2/lib/thor.rb#239
224
+ # source://thor/1.3.0/lib/thor.rb#334
225
225
  def bump(*args); end
226
226
 
227
- # source://thor/1.2.2/lib/thor.rb#239
227
+ # source://thor/1.3.0/lib/thor.rb#334
228
228
  def config(*args); end
229
229
 
230
- # source://thor/1.2.2/lib/thor.rb#239
230
+ # source://thor/1.3.0/lib/thor.rb#334
231
231
  def coverage(*args); end
232
232
 
233
233
  # source://spoom//lib/spoom/cli.rb#43
234
234
  def files; end
235
235
 
236
- # source://thor/1.2.2/lib/thor.rb#239
236
+ # source://thor/1.3.0/lib/thor.rb#334
237
237
  def lsp(*args); end
238
238
 
239
- # source://thor/1.2.2/lib/thor.rb#239
239
+ # source://thor/1.3.0/lib/thor.rb#334
240
240
  def tc(*args); end
241
241
 
242
242
  class << self
@@ -958,7 +958,7 @@ class Spoom::Coverage::D3::ColorPalette < ::T::Struct
958
958
  prop :strong, ::String
959
959
 
960
960
  class << self
961
- # source://sorbet-runtime/0.5.10962/lib/types/struct.rb#13
961
+ # source://sorbet-runtime/0.5.11089/lib/types/struct.rb#13
962
962
  def inherited(s); end
963
963
  end
964
964
  end
@@ -1298,7 +1298,7 @@ class Spoom::Coverage::Snapshot < ::T::Struct
1298
1298
  sig { params(obj: T::Hash[::String, T.untyped]).returns(::Spoom::Coverage::Snapshot) }
1299
1299
  def from_obj(obj); end
1300
1300
 
1301
- # source://sorbet-runtime/0.5.10962/lib/types/struct.rb#13
1301
+ # source://sorbet-runtime/0.5.11089/lib/types/struct.rb#13
1302
1302
  def inherited(s); end
1303
1303
  end
1304
1304
  end
@@ -1353,7 +1353,7 @@ end
1353
1353
  # source://spoom//lib/spoom/deadcode/erb.rb#27
1354
1354
  module Spoom::Deadcode
1355
1355
  class << self
1356
- # source://spoom//lib/spoom/deadcode.rb#50
1356
+ # source://spoom//lib/spoom/deadcode.rb#51
1357
1357
  sig do
1358
1358
  params(
1359
1359
  index: ::Spoom::Deadcode::Index,
@@ -1364,7 +1364,7 @@ module Spoom::Deadcode
1364
1364
  end
1365
1365
  def index_erb(index, erb, file:, plugins: T.unsafe(nil)); end
1366
1366
 
1367
- # source://spoom//lib/spoom/deadcode.rb#39
1367
+ # source://spoom//lib/spoom/deadcode.rb#40
1368
1368
  sig do
1369
1369
  params(
1370
1370
  index: ::Spoom::Deadcode::Index,
@@ -1374,9 +1374,23 @@ module Spoom::Deadcode
1374
1374
  ).void
1375
1375
  end
1376
1376
  def index_ruby(index, ruby, file:, plugins: T.unsafe(nil)); end
1377
+
1378
+ # source://spoom//lib/spoom/deadcode/plugins.rb#74
1379
+ sig { params(context: ::Spoom::Context).returns(T::Array[::Spoom::Deadcode::Plugins::Base]) }
1380
+ def load_custom_plugins(context); end
1381
+
1382
+ # source://spoom//lib/spoom/deadcode/plugins.rb#60
1383
+ sig { params(context: ::Spoom::Context).returns(T::Array[::Spoom::Deadcode::Plugins::Base]) }
1384
+ def plugins_from_gemfile_lock(context); end
1377
1385
  end
1378
1386
  end
1379
1387
 
1388
+ # source://spoom//lib/spoom/deadcode/plugins.rb#25
1389
+ Spoom::Deadcode::DEFAULT_CUSTOM_PLUGINS_PATH = T.let(T.unsafe(nil), String)
1390
+
1391
+ # source://spoom//lib/spoom/deadcode/plugins.rb#27
1392
+ Spoom::Deadcode::DEFAULT_PLUGINS = T.let(T.unsafe(nil), Set)
1393
+
1380
1394
  # A definition is a class, module, method, constant, etc. being defined in the code
1381
1395
  #
1382
1396
  # source://spoom//lib/spoom/deadcode/definition.rb#7
@@ -1436,7 +1450,7 @@ class Spoom::Deadcode::Definition < ::T::Struct
1436
1450
  def module?; end
1437
1451
 
1438
1452
  class << self
1439
- # source://sorbet-runtime/0.5.10962/lib/types/struct.rb#13
1453
+ # source://sorbet-runtime/0.5.11089/lib/types/struct.rb#13
1440
1454
  def inherited(s); end
1441
1455
  end
1442
1456
  end
@@ -1473,19 +1487,19 @@ class Spoom::Deadcode::ERB < ::Erubi::Engine
1473
1487
  private
1474
1488
 
1475
1489
  # source://spoom//lib/spoom/deadcode/erb.rb#83
1476
- sig { params(code: T.untyped).void }
1490
+ sig { override.params(code: T.untyped).void }
1477
1491
  def add_code(code); end
1478
1492
 
1479
1493
  # source://spoom//lib/spoom/deadcode/erb.rb#66
1480
- sig { params(indicator: T.untyped, code: T.untyped).void }
1494
+ sig { override.params(indicator: T.untyped, code: T.untyped).void }
1481
1495
  def add_expression(indicator, code); end
1482
1496
 
1483
1497
  # source://spoom//lib/spoom/deadcode/erb.rb#89
1484
- sig { params(_: T.untyped).void }
1498
+ sig { override.params(_: T.untyped).void }
1485
1499
  def add_postamble(_); end
1486
1500
 
1487
1501
  # source://spoom//lib/spoom/deadcode/erb.rb#48
1488
- sig { params(text: T.untyped).void }
1502
+ sig { override.params(text: T.untyped).void }
1489
1503
  def add_text(text); end
1490
1504
 
1491
1505
  # source://spoom//lib/spoom/deadcode/erb.rb#95
@@ -1498,11 +1512,11 @@ Spoom::Deadcode::ERB::BLOCK_EXPR = T.let(T.unsafe(nil), Regexp)
1498
1512
 
1499
1513
  # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
1500
1514
  #
1501
- # source://spoom//lib/spoom/deadcode.rb#19
1515
+ # source://spoom//lib/spoom/deadcode.rb#20
1502
1516
  class Spoom::Deadcode::Error < ::Spoom::Error
1503
1517
  abstract!
1504
1518
 
1505
- # source://spoom//lib/spoom/deadcode.rb#26
1519
+ # source://spoom//lib/spoom/deadcode.rb#27
1506
1520
  sig { params(message: ::String, parent: ::Exception).void }
1507
1521
  def initialize(message, parent:); end
1508
1522
  end
@@ -1567,7 +1581,7 @@ class Spoom::Deadcode::Indexer < ::SyntaxTree::Visitor
1567
1581
  end
1568
1582
  def initialize(path, source, index, plugins: T.unsafe(nil)); end
1569
1583
 
1570
- # source://spoom//lib/spoom/deadcode/indexer.rb#391
1584
+ # source://spoom//lib/spoom/deadcode/indexer.rb#459
1571
1585
  sig do
1572
1586
  params(
1573
1587
  node: T.nilable(T.any(::SyntaxTree::ArgParen, ::SyntaxTree::Args, ::SyntaxTree::ArgsForward))
@@ -1575,6 +1589,12 @@ class Spoom::Deadcode::Indexer < ::SyntaxTree::Visitor
1575
1589
  end
1576
1590
  def call_args(node); end
1577
1591
 
1592
+ # Context
1593
+ #
1594
+ # source://spoom//lib/spoom/deadcode/indexer.rb#367
1595
+ sig { returns(::SyntaxTree::Node) }
1596
+ def current_node; end
1597
+
1578
1598
  # Definition indexing
1579
1599
  #
1580
1600
  # source://spoom//lib/spoom/deadcode/indexer.rb#281
@@ -1610,13 +1630,45 @@ class Spoom::Deadcode::Indexer < ::SyntaxTree::Visitor
1610
1630
  sig { returns(::Spoom::Deadcode::Index) }
1611
1631
  def index; end
1612
1632
 
1613
- # source://spoom//lib/spoom/deadcode/indexer.rb#377
1633
+ # source://spoom//lib/spoom/deadcode/indexer.rb#426
1634
+ sig { returns(T.nilable(::String)) }
1635
+ def last_sig; end
1636
+
1637
+ # source://spoom//lib/spoom/deadcode/indexer.rb#386
1638
+ sig { returns(T.nilable(::SyntaxTree::BlockNode)) }
1639
+ def nesting_block; end
1640
+
1641
+ # source://spoom//lib/spoom/deadcode/indexer.rb#391
1642
+ sig { returns(T.nilable(::SyntaxTree::MethodAddBlock)) }
1643
+ def nesting_block_call; end
1644
+
1645
+ # source://spoom//lib/spoom/deadcode/indexer.rb#396
1646
+ sig { returns(T.nilable(::String)) }
1647
+ def nesting_block_call_name; end
1648
+
1649
+ # source://spoom//lib/spoom/deadcode/indexer.rb#381
1650
+ sig { returns(T.nilable(::SyntaxTree::ClassDeclaration)) }
1651
+ def nesting_class; end
1652
+
1653
+ # source://spoom//lib/spoom/deadcode/indexer.rb#410
1654
+ sig { returns(T.nilable(::String)) }
1655
+ def nesting_class_name; end
1656
+
1657
+ # source://spoom//lib/spoom/deadcode/indexer.rb#418
1658
+ sig { returns(T.nilable(::String)) }
1659
+ def nesting_class_superclass_name; end
1660
+
1661
+ # source://spoom//lib/spoom/deadcode/indexer.rb#372
1662
+ sig { type_parameters(:N).params(type: T::Class[T.type_parameter(:N)]).returns(T.nilable(T.type_parameter(:N))) }
1663
+ def nesting_node(type); end
1664
+
1665
+ # source://spoom//lib/spoom/deadcode/indexer.rb#445
1614
1666
  sig { params(node: ::SyntaxTree::Node).returns(::Spoom::Deadcode::Location) }
1615
1667
  def node_location(node); end
1616
1668
 
1617
1669
  # Node utils
1618
1670
  #
1619
- # source://spoom//lib/spoom/deadcode/indexer.rb#367
1671
+ # source://spoom//lib/spoom/deadcode/indexer.rb#435
1620
1672
  sig { params(node: T.any(::Symbol, ::SyntaxTree::Node)).returns(::String) }
1621
1673
  def node_string(node); end
1622
1674
 
@@ -1634,7 +1686,7 @@ class Spoom::Deadcode::Indexer < ::SyntaxTree::Visitor
1634
1686
  sig { params(name: ::String, node: ::SyntaxTree::Node).void }
1635
1687
  def reference_method(name, node); end
1636
1688
 
1637
- # source://spoom//lib/spoom/deadcode/indexer.rb#382
1689
+ # source://spoom//lib/spoom/deadcode/indexer.rb#450
1638
1690
  sig { params(node: ::SyntaxTree::Node).returns(::String) }
1639
1691
  def symbol_string(node); end
1640
1692
 
@@ -1725,14 +1777,14 @@ class Spoom::Deadcode::Indexer < ::SyntaxTree::Visitor
1725
1777
  def visit_vcall(node); end
1726
1778
  end
1727
1779
 
1728
- # source://spoom//lib/spoom/deadcode.rb#33
1780
+ # source://spoom//lib/spoom/deadcode.rb#34
1729
1781
  class Spoom::Deadcode::IndexerError < ::Spoom::Deadcode::Error; end
1730
1782
 
1731
1783
  # source://spoom//lib/spoom/deadcode/location.rb#6
1732
1784
  class Spoom::Deadcode::Location
1733
1785
  include ::Comparable
1734
1786
 
1735
- # source://spoom//lib/spoom/deadcode/location.rb#37
1787
+ # source://spoom//lib/spoom/deadcode/location.rb#54
1736
1788
  sig do
1737
1789
  params(
1738
1790
  file: ::String,
@@ -1744,39 +1796,49 @@ class Spoom::Deadcode::Location
1744
1796
  end
1745
1797
  def initialize(file, start_line, start_column, end_line, end_column); end
1746
1798
 
1747
- # source://spoom//lib/spoom/deadcode/location.rb#46
1799
+ # source://spoom//lib/spoom/deadcode/location.rb#74
1748
1800
  sig { override.params(other: ::BasicObject).returns(T.nilable(::Integer)) }
1749
1801
  def <=>(other); end
1750
1802
 
1751
1803
  # @return [Integer]
1752
1804
  #
1753
- # source://spoom//lib/spoom/deadcode/location.rb#26
1805
+ # source://spoom//lib/spoom/deadcode/location.rb#43
1754
1806
  def end_column; end
1755
1807
 
1756
1808
  # @return [Integer]
1757
1809
  #
1758
- # source://spoom//lib/spoom/deadcode/location.rb#26
1810
+ # source://spoom//lib/spoom/deadcode/location.rb#43
1759
1811
  def end_line; end
1760
1812
 
1761
- # source://spoom//lib/spoom/deadcode/location.rb#23
1813
+ # source://spoom//lib/spoom/deadcode/location.rb#40
1762
1814
  sig { returns(::String) }
1763
1815
  def file; end
1764
1816
 
1817
+ # source://spoom//lib/spoom/deadcode/location.rb#63
1818
+ sig { params(other: ::Spoom::Deadcode::Location).returns(T::Boolean) }
1819
+ def include?(other); end
1820
+
1765
1821
  # @return [Integer]
1766
1822
  #
1767
- # source://spoom//lib/spoom/deadcode/location.rb#26
1823
+ # source://spoom//lib/spoom/deadcode/location.rb#43
1768
1824
  def start_column; end
1769
1825
 
1770
- # source://spoom//lib/spoom/deadcode/location.rb#26
1826
+ # source://spoom//lib/spoom/deadcode/location.rb#43
1771
1827
  sig { returns(::Integer) }
1772
1828
  def start_line; end
1773
1829
 
1774
- # source://spoom//lib/spoom/deadcode/location.rb#53
1830
+ # source://spoom//lib/spoom/deadcode/location.rb#81
1775
1831
  sig { returns(::String) }
1776
1832
  def to_s; end
1777
1833
 
1778
1834
  class << self
1835
+ # @raise [LocationError]
1836
+ #
1779
1837
  # source://spoom//lib/spoom/deadcode/location.rb#17
1838
+ sig { params(location_string: ::String).returns(::Spoom::Deadcode::Location) }
1839
+ def from_string(location_string); end
1840
+
1841
+ # source://spoom//lib/spoom/deadcode/location.rb#34
1780
1842
  sig { params(file: ::String, location: ::SyntaxTree::Location).returns(::Spoom::Deadcode::Location) }
1781
1843
  def from_syntax_tree(file, location); end
1782
1844
  end
@@ -1785,18 +1847,107 @@ end
1785
1847
  # source://spoom//lib/spoom/deadcode/location.rb#11
1786
1848
  class Spoom::Deadcode::Location::LocationError < ::Spoom::Error; end
1787
1849
 
1788
- # source://spoom//lib/spoom/deadcode.rb#32
1850
+ # source://spoom//lib/spoom/deadcode/plugins.rb#35
1851
+ Spoom::Deadcode::PLUGINS_FOR_GEM = T.let(T.unsafe(nil), Hash)
1852
+
1853
+ # source://spoom//lib/spoom/deadcode.rb#33
1789
1854
  class Spoom::Deadcode::ParserError < ::Spoom::Deadcode::Error; end
1790
1855
 
1791
1856
  # source://spoom//lib/spoom/deadcode/plugins/base.rb#8
1792
1857
  module Spoom::Deadcode::Plugins; end
1793
1858
 
1859
+ # source://spoom//lib/spoom/deadcode/plugins/action_mailer.rb#7
1860
+ class Spoom::Deadcode::Plugins::ActionMailer < ::Spoom::Deadcode::Plugins::Base
1861
+ # source://spoom//lib/spoom/deadcode/plugins/action_mailer.rb#11
1862
+ sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void }
1863
+ def on_send(indexer, send); end
1864
+ end
1865
+
1866
+ # source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#7
1867
+ class Spoom::Deadcode::Plugins::ActionPack < ::Spoom::Deadcode::Plugins::Base
1868
+ # source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#31
1869
+ sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
1870
+ def on_define_method(indexer, definition); end
1871
+
1872
+ # source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#36
1873
+ sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void }
1874
+ def on_send(indexer, send); end
1875
+ end
1876
+
1877
+ # source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#10
1878
+ Spoom::Deadcode::Plugins::ActionPack::CALLBACKS = T.let(T.unsafe(nil), Array)
1879
+
1880
+ # source://spoom//lib/spoom/deadcode/plugins/active_job.rb#7
1881
+ class Spoom::Deadcode::Plugins::ActiveJob < ::Spoom::Deadcode::Plugins::Base; end
1882
+
1883
+ # source://spoom//lib/spoom/deadcode/plugins/active_model.rb#7
1884
+ class Spoom::Deadcode::Plugins::ActiveModel < ::Spoom::Deadcode::Plugins::Base
1885
+ # source://spoom//lib/spoom/deadcode/plugins/active_model.rb#14
1886
+ sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void }
1887
+ def on_send(indexer, send); end
1888
+ end
1889
+
1890
+ # source://spoom//lib/spoom/deadcode/plugins/active_record.rb#7
1891
+ class Spoom::Deadcode::Plugins::ActiveRecord < ::Spoom::Deadcode::Plugins::Base
1892
+ # source://spoom//lib/spoom/deadcode/plugins/active_record.rb#74
1893
+ sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void }
1894
+ def on_send(indexer, send); end
1895
+ end
1896
+
1897
+ # source://spoom//lib/spoom/deadcode/plugins/active_record.rb#64
1898
+ Spoom::Deadcode::Plugins::ActiveRecord::ARRAY_METHODS = T.let(T.unsafe(nil), Array)
1899
+
1900
+ # source://spoom//lib/spoom/deadcode/plugins/active_record.rb#20
1901
+ Spoom::Deadcode::Plugins::ActiveRecord::CALLBACKS = T.let(T.unsafe(nil), Array)
1902
+
1903
+ # source://spoom//lib/spoom/deadcode/plugins/active_record.rb#49
1904
+ Spoom::Deadcode::Plugins::ActiveRecord::CRUD_METHODS = T.let(T.unsafe(nil), Array)
1905
+
1906
+ # source://spoom//lib/spoom/deadcode/plugins/active_support.rb#7
1907
+ class Spoom::Deadcode::Plugins::ActiveSupport < ::Spoom::Deadcode::Plugins::Base; end
1908
+
1794
1909
  # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
1795
1910
  #
1796
1911
  # source://spoom//lib/spoom/deadcode/plugins/base.rb#9
1797
1912
  class Spoom::Deadcode::Plugins::Base
1798
1913
  abstract!
1799
1914
 
1915
+ # Do not override this method, use `on_define_accessor` instead.
1916
+ #
1917
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#150
1918
+ sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
1919
+ def internal_on_define_accessor(indexer, definition); end
1920
+
1921
+ # Do not override this method, use `on_define_class` instead.
1922
+ #
1923
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#174
1924
+ sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
1925
+ def internal_on_define_class(indexer, definition); end
1926
+
1927
+ # Do not override this method, use `on_define_constant` instead.
1928
+ #
1929
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#204
1930
+ sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
1931
+ def internal_on_define_constant(indexer, definition); end
1932
+
1933
+ # Do not override this method, use `on_define_method` instead.
1934
+ #
1935
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#232
1936
+ sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
1937
+ def internal_on_define_method(indexer, definition); end
1938
+
1939
+ # Do not override this method, use `on_define_module` instead.
1940
+ #
1941
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#258
1942
+ sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
1943
+ def internal_on_define_module(indexer, definition); end
1944
+
1945
+ # Do not override this method, use `on_send` instead.
1946
+ #
1947
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#284
1948
+ sig { params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void }
1949
+ def internal_on_send(indexer, send); end
1950
+
1800
1951
  # Called when an accessor is defined.
1801
1952
  #
1802
1953
  # Will be called when the indexer processes a `attr_reader`, `attr_writer` or `attr_accessor` node.
@@ -1811,7 +1962,7 @@ class Spoom::Deadcode::Plugins::Base
1811
1962
  # end
1812
1963
  # ~~~
1813
1964
  #
1814
- # source://spoom//lib/spoom/deadcode/plugins/base.rb#72
1965
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#144
1815
1966
  sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
1816
1967
  def on_define_accessor(indexer, definition); end
1817
1968
 
@@ -1829,7 +1980,7 @@ class Spoom::Deadcode::Plugins::Base
1829
1980
  # end
1830
1981
  # ~~~
1831
1982
  #
1832
- # source://spoom//lib/spoom/deadcode/plugins/base.rb#90
1983
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#168
1833
1984
  sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
1834
1985
  def on_define_class(indexer, definition); end
1835
1986
 
@@ -1847,7 +1998,7 @@ class Spoom::Deadcode::Plugins::Base
1847
1998
  # end
1848
1999
  # ~~~
1849
2000
  #
1850
- # source://spoom//lib/spoom/deadcode/plugins/base.rb#108
2001
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#198
1851
2002
  sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
1852
2003
  def on_define_constant(indexer, definition); end
1853
2004
 
@@ -1867,7 +2018,7 @@ class Spoom::Deadcode::Plugins::Base
1867
2018
  # end
1868
2019
  # ~~~
1869
2020
  #
1870
- # source://spoom//lib/spoom/deadcode/plugins/base.rb#128
2021
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#226
1871
2022
  sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
1872
2023
  def on_define_method(indexer, definition); end
1873
2024
 
@@ -1885,7 +2036,7 @@ class Spoom::Deadcode::Plugins::Base
1885
2036
  # end
1886
2037
  # ~~~
1887
2038
  #
1888
- # source://spoom//lib/spoom/deadcode/plugins/base.rb#146
2039
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#252
1889
2040
  sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
1890
2041
  def on_define_module(indexer, definition); end
1891
2042
 
@@ -1903,33 +2054,107 @@ class Spoom::Deadcode::Plugins::Base
1903
2054
  # end
1904
2055
  # ~~~
1905
2056
  #
1906
- # source://spoom//lib/spoom/deadcode/plugins/base.rb#164
2057
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#278
1907
2058
  sig { params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void }
1908
2059
  def on_send(indexer, send); end
1909
2060
 
1910
2061
  private
1911
2062
 
1912
- # source://spoom//lib/spoom/deadcode/plugins/base.rb#171
2063
+ # Plugin utils
2064
+ #
2065
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#339
2066
+ sig { params(name: ::String).returns(::String) }
2067
+ def camelize(name); end
2068
+
2069
+ # DSL support
2070
+ #
2071
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#293
2072
+ sig { params(name: T.nilable(::String)).returns(T::Boolean) }
2073
+ def ignored_class_name?(name); end
2074
+
2075
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#307
2076
+ sig { params(name: ::String).returns(T::Boolean) }
2077
+ def ignored_constant_name?(name); end
2078
+
2079
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#312
1913
2080
  sig { params(name: ::String).returns(T::Boolean) }
1914
2081
  def ignored_method_name?(name); end
1915
2082
 
1916
- # source://spoom//lib/spoom/deadcode/plugins/base.rb#181
2083
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#317
2084
+ sig { params(name: ::String).returns(T::Boolean) }
2085
+ def ignored_module_name?(name); end
2086
+
2087
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#322
1917
2088
  sig { params(name: ::String, names_variable: ::Symbol, patterns_variable: ::Symbol).returns(T::Boolean) }
1918
2089
  def ignored_name?(name, names_variable, patterns_variable); end
1919
2090
 
1920
- # source://spoom//lib/spoom/deadcode/plugins/base.rb#176
2091
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#300
2092
+ sig { params(superclass_name: T.nilable(::String)).returns(T::Boolean) }
2093
+ def ignored_subclass?(superclass_name); end
2094
+
2095
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#327
1921
2096
  sig { params(const: ::Symbol).returns(T::Set[::String]) }
1922
2097
  def names(const); end
1923
2098
 
1924
- # source://spoom//lib/spoom/deadcode/plugins/base.rb#186
2099
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#332
1925
2100
  sig { params(const: ::Symbol).returns(T::Array[::Regexp]) }
1926
2101
  def patterns(const); end
1927
2102
 
1928
- # source://spoom//lib/spoom/deadcode/plugins/base.rb#191
1929
- sig { params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void }
1930
- def reference_send_first_symbol_as_method(indexer, send); end
1931
-
1932
2103
  class << self
2104
+ # Mark classes directly subclassing a class matching `names` as ignored.
2105
+ #
2106
+ # Names can be either strings or regexps:
2107
+ #
2108
+ # ~~~rb
2109
+ # class MyPlugin < Spoom::Deadcode::Plugins::Base
2110
+ # ignore_classes_inheriting_from(
2111
+ # "Foo",
2112
+ # "Bar",
2113
+ # /Baz.*/,
2114
+ # )
2115
+ # end
2116
+ # ~~~
2117
+ #
2118
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#52
2119
+ sig { params(names: T.any(::Regexp, ::String)).void }
2120
+ def ignore_classes_inheriting_from(*names); end
2121
+
2122
+ # Mark classes matching `names` as ignored.
2123
+ #
2124
+ # Names can be either strings or regexps:
2125
+ #
2126
+ # ~~~rb
2127
+ # class MyPlugin < Spoom::Deadcode::Plugins::Base
2128
+ # ignore_class_names(
2129
+ # "Foo",
2130
+ # "Bar",
2131
+ # /Baz.*/,
2132
+ # )
2133
+ # end
2134
+ # ~~~
2135
+ #
2136
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#34
2137
+ sig { params(names: T.any(::Regexp, ::String)).void }
2138
+ def ignore_classes_named(*names); end
2139
+
2140
+ # Mark constants matching `names` as ignored.
2141
+ #
2142
+ # Names can be either strings or regexps:
2143
+ #
2144
+ # ~~~rb
2145
+ # class MyPlugin < Spoom::Deadcode::Plugins::Base
2146
+ # ignore_class_names(
2147
+ # "FOO",
2148
+ # "BAR",
2149
+ # /BAZ.*/,
2150
+ # )
2151
+ # end
2152
+ # ~~~
2153
+ #
2154
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#70
2155
+ sig { params(names: T.any(::Regexp, ::String)).void }
2156
+ def ignore_constants_named(*names); end
2157
+
1933
2158
  # Mark methods matching `names` as ignored.
1934
2159
  #
1935
2160
  # Names can be either strings or regexps:
@@ -1944,13 +2169,31 @@ class Spoom::Deadcode::Plugins::Base
1944
2169
  # end
1945
2170
  # ~~~
1946
2171
  #
1947
- # source://spoom//lib/spoom/deadcode/plugins/base.rb#34
2172
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#88
2173
+ sig { params(names: T.any(::Regexp, ::String)).void }
2174
+ def ignore_methods_named(*names); end
2175
+
2176
+ # Mark modules matching `names` as ignored.
2177
+ #
2178
+ # Names can be either strings or regexps:
2179
+ #
2180
+ # ~~~rb
2181
+ # class MyPlugin < Spoom::Deadcode::Plugins::Base
2182
+ # ignore_class_names(
2183
+ # "Foo",
2184
+ # "Bar",
2185
+ # /Baz.*/,
2186
+ # )
2187
+ # end
2188
+ # ~~~
2189
+ #
2190
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#106
1948
2191
  sig { params(names: T.any(::Regexp, ::String)).void }
1949
- def ignore_method_names(*names); end
2192
+ def ignore_modules_named(*names); end
1950
2193
 
1951
2194
  private
1952
2195
 
1953
- # source://spoom//lib/spoom/deadcode/plugins/base.rb#41
2196
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#113
1954
2197
  sig do
1955
2198
  params(
1956
2199
  names: T::Array[T.any(::Regexp, ::String)],
@@ -1962,6 +2205,84 @@ class Spoom::Deadcode::Plugins::Base
1962
2205
  end
1963
2206
  end
1964
2207
 
2208
+ # source://spoom//lib/spoom/deadcode/plugins/graphql.rb#7
2209
+ class Spoom::Deadcode::Plugins::GraphQL < ::Spoom::Deadcode::Plugins::Base
2210
+ # source://spoom//lib/spoom/deadcode/plugins/graphql.rb#28
2211
+ sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void }
2212
+ def on_send(indexer, send); end
2213
+ end
2214
+
2215
+ # source://spoom//lib/spoom/deadcode/plugins/minitest.rb#7
2216
+ class Spoom::Deadcode::Plugins::Minitest < ::Spoom::Deadcode::Plugins::Base
2217
+ # source://spoom//lib/spoom/deadcode/plugins/minitest.rb#22
2218
+ sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
2219
+ def on_define_method(indexer, definition); end
2220
+ end
2221
+
2222
+ # source://spoom//lib/spoom/deadcode/plugins/namespaces.rb#7
2223
+ class Spoom::Deadcode::Plugins::Namespaces < ::Spoom::Deadcode::Plugins::Base
2224
+ # source://spoom//lib/spoom/deadcode/plugins/namespaces.rb#11
2225
+ sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
2226
+ def on_define_class(indexer, definition); end
2227
+
2228
+ # source://spoom//lib/spoom/deadcode/plugins/namespaces.rb#16
2229
+ sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
2230
+ def on_define_module(indexer, definition); end
2231
+
2232
+ private
2233
+
2234
+ # source://spoom//lib/spoom/deadcode/plugins/namespaces.rb#23
2235
+ sig { params(indexer: ::Spoom::Deadcode::Indexer).returns(T::Boolean) }
2236
+ def used_as_namespace?(indexer); end
2237
+ end
2238
+
2239
+ # source://spoom//lib/spoom/deadcode/plugins/rspec.rb#7
2240
+ class Spoom::Deadcode::Plugins::RSpec < ::Spoom::Deadcode::Plugins::Base; end
2241
+
2242
+ # source://spoom//lib/spoom/deadcode/plugins/rails.rb#7
2243
+ class Spoom::Deadcode::Plugins::Rails < ::Spoom::Deadcode::Plugins::Base
2244
+ # source://spoom//lib/spoom/deadcode/plugins/rails.rb#13
2245
+ sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
2246
+ def on_define_class(indexer, definition); end
2247
+
2248
+ # source://spoom//lib/spoom/deadcode/plugins/rails.rb#18
2249
+ sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
2250
+ def on_define_module(indexer, definition); end
2251
+
2252
+ private
2253
+
2254
+ # source://spoom//lib/spoom/deadcode/plugins/rails.rb#25
2255
+ sig { params(indexer: ::Spoom::Deadcode::Indexer).returns(T::Boolean) }
2256
+ def file_is_helper?(indexer); end
2257
+ end
2258
+
2259
+ # source://spoom//lib/spoom/deadcode/plugins/rake.rb#7
2260
+ class Spoom::Deadcode::Plugins::Rake < ::Spoom::Deadcode::Plugins::Base; end
2261
+
2262
+ # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#7
2263
+ class Spoom::Deadcode::Plugins::Rubocop < ::Spoom::Deadcode::Plugins::Base
2264
+ # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#18
2265
+ sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
2266
+ def on_define_constant(indexer, definition); end
2267
+
2268
+ # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#23
2269
+ sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
2270
+ def on_define_method(indexer, definition); end
2271
+
2272
+ private
2273
+
2274
+ # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#30
2275
+ sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).returns(T::Boolean) }
2276
+ def rubocop_constant?(indexer, definition); end
2277
+
2278
+ # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#35
2279
+ sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).returns(T::Boolean) }
2280
+ def rubocop_method?(indexer, definition); end
2281
+ end
2282
+
2283
+ # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#10
2284
+ Spoom::Deadcode::Plugins::Rubocop::RUBOCOP_CONSTANTS = T.let(T.unsafe(nil), Set)
2285
+
1965
2286
  # source://spoom//lib/spoom/deadcode/plugins/ruby.rb#7
1966
2287
  class Spoom::Deadcode::Plugins::Ruby < ::Spoom::Deadcode::Plugins::Base
1967
2288
  # source://spoom//lib/spoom/deadcode/plugins/ruby.rb#24
@@ -1970,11 +2291,39 @@ class Spoom::Deadcode::Plugins::Ruby < ::Spoom::Deadcode::Plugins::Base
1970
2291
 
1971
2292
  private
1972
2293
 
1973
- # source://spoom//lib/spoom/deadcode/plugins/ruby.rb#49
2294
+ # source://spoom//lib/spoom/deadcode/plugins/ruby.rb#50
1974
2295
  sig { params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send, node: ::SyntaxTree::Node).void }
1975
2296
  def reference_symbol_as_constant(indexer, send, node); end
1976
2297
  end
1977
2298
 
2299
+ # source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#7
2300
+ class Spoom::Deadcode::Plugins::Sorbet < ::Spoom::Deadcode::Plugins::Base
2301
+ # source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#11
2302
+ sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
2303
+ def on_define_constant(indexer, definition); end
2304
+
2305
+ # source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#16
2306
+ sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
2307
+ def on_define_method(indexer, definition); end
2308
+
2309
+ private
2310
+
2311
+ # source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#40
2312
+ sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).returns(T::Boolean) }
2313
+ def sorbet_enum_constant?(indexer, definition); end
2314
+
2315
+ # source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#23
2316
+ sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).returns(T::Boolean) }
2317
+ def sorbet_type_member?(indexer, definition); end
2318
+ end
2319
+
2320
+ # source://spoom//lib/spoom/deadcode/plugins/thor.rb#7
2321
+ class Spoom::Deadcode::Plugins::Thor < ::Spoom::Deadcode::Plugins::Base
2322
+ # source://spoom//lib/spoom/deadcode/plugins/thor.rb#13
2323
+ sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
2324
+ def on_define_method(indexer, definition); end
2325
+ end
2326
+
1978
2327
  # A reference is a call to a method or a constant
1979
2328
  #
1980
2329
  # source://spoom//lib/spoom/deadcode/reference.rb#7
@@ -1994,7 +2343,7 @@ class Spoom::Deadcode::Reference < ::T::Struct
1994
2343
  def method?; end
1995
2344
 
1996
2345
  class << self
1997
- # source://sorbet-runtime/0.5.10962/lib/types/struct.rb#13
2346
+ # source://sorbet-runtime/0.5.11089/lib/types/struct.rb#13
1998
2347
  def inherited(s); end
1999
2348
  end
2000
2349
  end
@@ -2007,6 +2356,217 @@ class Spoom::Deadcode::Reference::Kind < ::T::Enum
2007
2356
  end
2008
2357
  end
2009
2358
 
2359
+ # source://spoom//lib/spoom/deadcode/remover.rb#6
2360
+ class Spoom::Deadcode::Remover
2361
+ # source://spoom//lib/spoom/deadcode/remover.rb#12
2362
+ sig { params(context: ::Spoom::Context).void }
2363
+ def initialize(context); end
2364
+
2365
+ # source://spoom//lib/spoom/deadcode/remover.rb#17
2366
+ sig { params(kind: ::Spoom::Deadcode::Definition::Kind, location: ::Spoom::Deadcode::Location).void }
2367
+ def remove_location(kind, location); end
2368
+ end
2369
+
2370
+ # source://spoom//lib/spoom/deadcode/remover.rb#9
2371
+ class Spoom::Deadcode::Remover::Error < ::Spoom::Error; end
2372
+
2373
+ # source://spoom//lib/spoom/deadcode/remover.rb#348
2374
+ class Spoom::Deadcode::Remover::NodeContext
2375
+ # source://spoom//lib/spoom/deadcode/remover.rb#358
2376
+ sig { params(source: ::String, node: ::SyntaxTree::Node, nesting: T::Array[::SyntaxTree::Node]).void }
2377
+ def initialize(source, node, nesting); end
2378
+
2379
+ # source://spoom//lib/spoom/deadcode/remover.rb#467
2380
+ sig { returns(T::Array[::SyntaxTree::Node]) }
2381
+ def attached_comments_and_sigs; end
2382
+
2383
+ # source://spoom//lib/spoom/deadcode/remover.rb#480
2384
+ sig { returns(T.nilable(::SyntaxTree::MethodAddBlock)) }
2385
+ def attached_sig; end
2386
+
2387
+ # source://spoom//lib/spoom/deadcode/remover.rb#460
2388
+ sig { params(comment: ::SyntaxTree::Node, node: ::SyntaxTree::Node).returns(T::Boolean) }
2389
+ def comment_for_node?(comment, node); end
2390
+
2391
+ # source://spoom//lib/spoom/deadcode/remover.rb#355
2392
+ sig { returns(T::Array[::SyntaxTree::Node]) }
2393
+ def nesting; end
2394
+
2395
+ # @return [Array<SyntaxTree::Node>]
2396
+ #
2397
+ # source://spoom//lib/spoom/deadcode/remover.rb#355
2398
+ def nesting=(_arg0); end
2399
+
2400
+ # source://spoom//lib/spoom/deadcode/remover.rb#407
2401
+ sig { returns(T.nilable(::SyntaxTree::Node)) }
2402
+ def next_node; end
2403
+
2404
+ # source://spoom//lib/spoom/deadcode/remover.rb#397
2405
+ sig { returns(T::Array[::SyntaxTree::Node]) }
2406
+ def next_nodes; end
2407
+
2408
+ # source://spoom//lib/spoom/deadcode/remover.rb#352
2409
+ sig { returns(::SyntaxTree::Node) }
2410
+ def node; end
2411
+
2412
+ # source://spoom//lib/spoom/deadcode/remover.rb#495
2413
+ sig { params(node: T.any(::Symbol, ::SyntaxTree::Node)).returns(::String) }
2414
+ def node_string(node); end
2415
+
2416
+ # source://spoom//lib/spoom/deadcode/remover.rb#373
2417
+ sig { returns(::Spoom::Deadcode::Remover::NodeContext) }
2418
+ def parent_context; end
2419
+
2420
+ # source://spoom//lib/spoom/deadcode/remover.rb#365
2421
+ sig { returns(::SyntaxTree::Node) }
2422
+ def parent_node; end
2423
+
2424
+ # source://spoom//lib/spoom/deadcode/remover.rb#392
2425
+ sig { returns(T.nilable(::SyntaxTree::Node)) }
2426
+ def previous_node; end
2427
+
2428
+ # source://spoom//lib/spoom/deadcode/remover.rb#382
2429
+ sig { returns(T::Array[::SyntaxTree::Node]) }
2430
+ def previous_nodes; end
2431
+
2432
+ # source://spoom//lib/spoom/deadcode/remover.rb#412
2433
+ sig { returns(T.nilable(::Spoom::Deadcode::Remover::NodeContext)) }
2434
+ def sclass_context; end
2435
+
2436
+ # source://spoom//lib/spoom/deadcode/remover.rb#451
2437
+ sig { params(node: T.nilable(::SyntaxTree::Node)).returns(T::Boolean) }
2438
+ def sorbet_extend_sig?(node); end
2439
+
2440
+ # source://spoom//lib/spoom/deadcode/remover.rb#438
2441
+ sig { params(node: T.nilable(::SyntaxTree::Node)).returns(T::Boolean) }
2442
+ def sorbet_signature?(node); end
2443
+ end
2444
+
2445
+ # source://spoom//lib/spoom/deadcode/remover.rb#505
2446
+ class Spoom::Deadcode::Remover::NodeFinder < ::SyntaxTree::Visitor
2447
+ # source://spoom//lib/spoom/deadcode/remover.rb#554
2448
+ sig { params(location: ::Spoom::Deadcode::Location).void }
2449
+ def initialize(location); end
2450
+
2451
+ # source://spoom//lib/spoom/deadcode/remover.rb#548
2452
+ sig { returns(T.nilable(::SyntaxTree::Node)) }
2453
+ def node; end
2454
+
2455
+ # source://spoom//lib/spoom/deadcode/remover.rb#551
2456
+ sig { returns(T::Array[::SyntaxTree::Node]) }
2457
+ def nodes_nesting; end
2458
+
2459
+ # @return [Array<SyntaxTree::Node>]
2460
+ #
2461
+ # source://spoom//lib/spoom/deadcode/remover.rb#551
2462
+ def nodes_nesting=(_arg0); end
2463
+
2464
+ # source://spoom//lib/spoom/deadcode/remover.rb#562
2465
+ sig { override.params(node: T.nilable(::SyntaxTree::Node)).void }
2466
+ def visit(node); end
2467
+
2468
+ private
2469
+
2470
+ # TODO: remove once SyntaxTree location are fixed
2471
+ #
2472
+ # source://spoom//lib/spoom/deadcode/remover.rb#601
2473
+ sig { params(node: ::SyntaxTree::Node, nodes: T::Array[::SyntaxTree::Node]).returns(::Spoom::Deadcode::Location) }
2474
+ def location_from_children(node, nodes); end
2475
+
2476
+ # TODO: remove once SyntaxTree location are fixed
2477
+ #
2478
+ # source://spoom//lib/spoom/deadcode/remover.rb#586
2479
+ sig { params(node: ::SyntaxTree::Node).returns(::Spoom::Deadcode::Location) }
2480
+ def location_from_node(node); end
2481
+
2482
+ class << self
2483
+ # source://spoom//lib/spoom/deadcode/remover.rb#512
2484
+ sig do
2485
+ params(
2486
+ source: ::String,
2487
+ location: ::Spoom::Deadcode::Location,
2488
+ kind: ::Spoom::Deadcode::Definition::Kind
2489
+ ).returns(::Spoom::Deadcode::Remover::NodeContext)
2490
+ end
2491
+ def find(source, location, kind); end
2492
+
2493
+ # source://spoom//lib/spoom/deadcode/remover.rb#531
2494
+ sig { params(node: ::SyntaxTree::Node, kind: ::Spoom::Deadcode::Definition::Kind).returns(T::Boolean) }
2495
+ def node_match_kind?(node, kind); end
2496
+ end
2497
+ end
2498
+
2499
+ # source://spoom//lib/spoom/deadcode/remover.rb#29
2500
+ class Spoom::Deadcode::Remover::NodeRemover
2501
+ # source://spoom//lib/spoom/deadcode/remover.rb#36
2502
+ sig do
2503
+ params(
2504
+ source: ::String,
2505
+ kind: ::Spoom::Deadcode::Definition::Kind,
2506
+ location: ::Spoom::Deadcode::Location
2507
+ ).void
2508
+ end
2509
+ def initialize(source, kind, location); end
2510
+
2511
+ # source://spoom//lib/spoom/deadcode/remover.rb#46
2512
+ sig { void }
2513
+ def apply_edit; end
2514
+
2515
+ # source://spoom//lib/spoom/deadcode/remover.rb#33
2516
+ sig { returns(::String) }
2517
+ def new_source; end
2518
+
2519
+ private
2520
+
2521
+ # source://spoom//lib/spoom/deadcode/remover.rb#142
2522
+ sig { params(context: ::Spoom::Deadcode::Remover::NodeContext).void }
2523
+ def delete_attr_accessor(context); end
2524
+
2525
+ # source://spoom//lib/spoom/deadcode/remover.rb#290
2526
+ sig { params(start_char: ::Integer, end_char: ::Integer).void }
2527
+ def delete_chars(start_char, end_char); end
2528
+
2529
+ # source://spoom//lib/spoom/deadcode/remover.rb#69
2530
+ sig { params(context: ::Spoom::Deadcode::Remover::NodeContext).void }
2531
+ def delete_constant_assignment(context); end
2532
+
2533
+ # source://spoom//lib/spoom/deadcode/remover.rb#300
2534
+ sig { params(line_number: ::Integer, start_column: ::Integer, end_column: ::Integer).void }
2535
+ def delete_line_part(line_number, start_column, end_column); end
2536
+
2537
+ # source://spoom//lib/spoom/deadcode/remover.rb#283
2538
+ sig { params(start_line: ::Integer, end_line: ::Integer).void }
2539
+ def delete_lines(start_line, end_line); end
2540
+
2541
+ # source://spoom//lib/spoom/deadcode/remover.rb#250
2542
+ sig { params(context: ::Spoom::Deadcode::Remover::NodeContext).void }
2543
+ def delete_node_and_comments_and_sigs(context); end
2544
+
2545
+ # source://spoom//lib/spoom/deadcode/remover.rb#207
2546
+ sig do
2547
+ params(
2548
+ node: ::SyntaxTree::Node,
2549
+ send_context: ::Spoom::Deadcode::Remover::NodeContext,
2550
+ was_removed: T::Boolean
2551
+ ).void
2552
+ end
2553
+ def insert_accessor(node, send_context, was_removed:); end
2554
+
2555
+ # source://spoom//lib/spoom/deadcode/remover.rb#295
2556
+ sig { params(start_char: ::Integer, end_char: ::Integer, replacement: ::String).void }
2557
+ def replace_chars(start_char, end_char, replacement); end
2558
+
2559
+ # source://spoom//lib/spoom/deadcode/remover.rb#315
2560
+ sig do
2561
+ params(
2562
+ node: ::SyntaxTree::MethodAddBlock,
2563
+ name: ::String,
2564
+ kind: ::Spoom::Deadcode::Definition::Kind
2565
+ ).returns(::String)
2566
+ end
2567
+ def transform_sig(node, name:, kind:); end
2568
+ end
2569
+
2010
2570
  # An abstraction to simplify handling of SyntaxTree::CallNode, SyntaxTree::Command, SyntaxTree::CommandCall and
2011
2571
  # SyntaxTree::VCall nodes.
2012
2572
  #
@@ -2018,8 +2578,22 @@ class Spoom::Deadcode::Send < ::T::Struct
2018
2578
  const :args, T::Array[::SyntaxTree::Node], default: T.unsafe(nil)
2019
2579
  const :block, T.nilable(::SyntaxTree::Node), default: T.unsafe(nil)
2020
2580
 
2581
+ # source://spoom//lib/spoom/deadcode/send.rb#22
2582
+ sig do
2583
+ type_parameters(:T)
2584
+ .params(
2585
+ arg_type: T::Class[T.type_parameter(:T)],
2586
+ block: T.proc.params(arg: T.type_parameter(:T)).void
2587
+ ).void
2588
+ end
2589
+ def each_arg(arg_type, &block); end
2590
+
2591
+ # source://spoom//lib/spoom/deadcode/send.rb#29
2592
+ sig { params(block: T.proc.params(key: ::SyntaxTree::Node, value: T.nilable(::SyntaxTree::Node)).void).void }
2593
+ def each_arg_assoc(&block); end
2594
+
2021
2595
  class << self
2022
- # source://sorbet-runtime/0.5.10962/lib/types/struct.rb#13
2596
+ # source://sorbet-runtime/0.5.11089/lib/types/struct.rb#13
2023
2597
  def inherited(s); end
2024
2598
  end
2025
2599
  end
@@ -2039,7 +2613,7 @@ class Spoom::ExecResult < ::T::Struct
2039
2613
  def to_s; end
2040
2614
 
2041
2615
  class << self
2042
- # source://sorbet-runtime/0.5.10962/lib/types/struct.rb#13
2616
+ # source://sorbet-runtime/0.5.11089/lib/types/struct.rb#13
2043
2617
  def inherited(s); end
2044
2618
  end
2045
2619
  end
@@ -2247,7 +2821,7 @@ class Spoom::FileTree::Node < ::T::Struct
2247
2821
  def path; end
2248
2822
 
2249
2823
  class << self
2250
- # source://sorbet-runtime/0.5.10962/lib/types/struct.rb#13
2824
+ # source://sorbet-runtime/0.5.11089/lib/types/struct.rb#13
2251
2825
  def inherited(s); end
2252
2826
  end
2253
2827
  end
@@ -2313,7 +2887,7 @@ class Spoom::Git::Commit < ::T::Struct
2313
2887
  def timestamp; end
2314
2888
 
2315
2889
  class << self
2316
- # source://sorbet-runtime/0.5.10962/lib/types/struct.rb#13
2890
+ # source://sorbet-runtime/0.5.11089/lib/types/struct.rb#13
2317
2891
  def inherited(s); end
2318
2892
 
2319
2893
  # Parse a line formated as `%h %at` into a `Commit`
@@ -2425,7 +2999,7 @@ class Spoom::LSP::Diagnostic < ::T::Struct
2425
2999
  sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Diagnostic) }
2426
3000
  def from_json(json); end
2427
3001
 
2428
- # source://sorbet-runtime/0.5.10962/lib/types/struct.rb#13
3002
+ # source://sorbet-runtime/0.5.11089/lib/types/struct.rb#13
2429
3003
  def inherited(s); end
2430
3004
  end
2431
3005
  end
@@ -2458,7 +3032,7 @@ class Spoom::LSP::DocumentSymbol < ::T::Struct
2458
3032
  sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::DocumentSymbol) }
2459
3033
  def from_json(json); end
2460
3034
 
2461
- # source://sorbet-runtime/0.5.10962/lib/types/struct.rb#13
3035
+ # source://sorbet-runtime/0.5.11089/lib/types/struct.rb#13
2462
3036
  def inherited(s); end
2463
3037
  end
2464
3038
  end
@@ -2516,7 +3090,7 @@ class Spoom::LSP::Hover < ::T::Struct
2516
3090
  sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Hover) }
2517
3091
  def from_json(json); end
2518
3092
 
2519
- # source://sorbet-runtime/0.5.10962/lib/types/struct.rb#13
3093
+ # source://sorbet-runtime/0.5.11089/lib/types/struct.rb#13
2520
3094
  def inherited(s); end
2521
3095
  end
2522
3096
  end
@@ -2541,7 +3115,7 @@ class Spoom::LSP::Location < ::T::Struct
2541
3115
  sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Location) }
2542
3116
  def from_json(json); end
2543
3117
 
2544
- # source://sorbet-runtime/0.5.10962/lib/types/struct.rb#13
3118
+ # source://sorbet-runtime/0.5.11089/lib/types/struct.rb#13
2545
3119
  def inherited(s); end
2546
3120
  end
2547
3121
  end
@@ -2604,7 +3178,7 @@ class Spoom::LSP::Position < ::T::Struct
2604
3178
  sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Position) }
2605
3179
  def from_json(json); end
2606
3180
 
2607
- # source://sorbet-runtime/0.5.10962/lib/types/struct.rb#13
3181
+ # source://sorbet-runtime/0.5.11089/lib/types/struct.rb#13
2608
3182
  def inherited(s); end
2609
3183
  end
2610
3184
  end
@@ -2642,7 +3216,7 @@ class Spoom::LSP::Range < ::T::Struct
2642
3216
  sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Range) }
2643
3217
  def from_json(json); end
2644
3218
 
2645
- # source://sorbet-runtime/0.5.10962/lib/types/struct.rb#13
3219
+ # source://sorbet-runtime/0.5.11089/lib/types/struct.rb#13
2646
3220
  def inherited(s); end
2647
3221
  end
2648
3222
  end
@@ -2708,7 +3282,7 @@ class Spoom::LSP::SignatureHelp < ::T::Struct
2708
3282
  sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::SignatureHelp) }
2709
3283
  def from_json(json); end
2710
3284
 
2711
- # source://sorbet-runtime/0.5.10962/lib/types/struct.rb#13
3285
+ # source://sorbet-runtime/0.5.11089/lib/types/struct.rb#13
2712
3286
  def inherited(s); end
2713
3287
  end
2714
3288
  end