packwerk 2.2.0 → 2.2.2

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.
Files changed (188) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +29 -20
  3. data/.github/workflows/cla.yml +22 -0
  4. data/.rubocop.yml +48 -19
  5. data/Gemfile +7 -2
  6. data/Gemfile.lock +202 -175
  7. data/README.md +1 -1
  8. data/RESOLVING_VIOLATIONS.md +81 -0
  9. data/Rakefile +1 -1
  10. data/USAGE.md +14 -5
  11. data/bin/m +1 -1
  12. data/bin/rake +1 -1
  13. data/bin/rubocop +1 -1
  14. data/bin/srb +1 -1
  15. data/bin/tapioca +1 -1
  16. data/gemfiles/Gemfile-rails-6-0 +1 -1
  17. data/gemfiles/Gemfile-rails-6-1 +22 -0
  18. data/lib/packwerk/application_load_paths.rb +1 -1
  19. data/lib/packwerk/application_validator.rb +7 -6
  20. data/lib/packwerk/association_inspector.rb +17 -15
  21. data/lib/packwerk/cache.rb +36 -29
  22. data/lib/packwerk/cli.rb +24 -20
  23. data/lib/packwerk/const_node_inspector.rb +8 -7
  24. data/lib/packwerk/constant_name_inspector.rb +2 -2
  25. data/lib/packwerk/deprecated_references.rb +40 -20
  26. data/lib/packwerk/file_processor.rb +14 -14
  27. data/lib/packwerk/files_for_processing.rb +27 -31
  28. data/lib/packwerk/formatters/offenses_formatter.rb +3 -3
  29. data/lib/packwerk/formatters/progress_formatter.rb +2 -2
  30. data/lib/packwerk/node.rb +1 -294
  31. data/lib/packwerk/node_helpers.rb +335 -0
  32. data/lib/packwerk/node_processor.rb +6 -5
  33. data/lib/packwerk/node_processor_factory.rb +3 -3
  34. data/lib/packwerk/node_visitor.rb +1 -1
  35. data/lib/packwerk/offense_collection.rb +27 -8
  36. data/lib/packwerk/offenses_formatter.rb +2 -2
  37. data/lib/packwerk/package.rb +3 -0
  38. data/lib/packwerk/package_set.rb +2 -0
  39. data/lib/packwerk/parse_run.rb +29 -20
  40. data/lib/packwerk/parsed_constant_definitions.rb +23 -20
  41. data/lib/packwerk/parsers/erb.rb +3 -3
  42. data/lib/packwerk/reference_checking/checkers/checker.rb +16 -3
  43. data/lib/packwerk/reference_checking/checkers/dependency_checker.rb +16 -0
  44. data/lib/packwerk/reference_checking/checkers/privacy_checker.rb +18 -0
  45. data/lib/packwerk/reference_checking/reference_checker.rb +3 -1
  46. data/lib/packwerk/reference_extractor.rb +51 -48
  47. data/lib/packwerk/reference_offense.rb +3 -27
  48. data/lib/packwerk/run_context.rb +9 -8
  49. data/lib/packwerk/spring_command.rb +1 -1
  50. data/lib/packwerk/version.rb +1 -1
  51. data/lib/packwerk.rb +1 -0
  52. data/packwerk.gemspec +5 -12
  53. data/sorbet/rbi/gems/actioncable@7.0.3.1.rbi +2754 -0
  54. data/sorbet/rbi/gems/actionmailbox@7.0.3.1.rbi +1496 -0
  55. data/sorbet/rbi/gems/actionmailer@7.0.3.1.rbi +2362 -0
  56. data/sorbet/rbi/gems/actionpack@7.0.3.1.rbi +19397 -0
  57. data/sorbet/rbi/gems/actiontext@7.0.3.1.rbi +1569 -0
  58. data/sorbet/rbi/gems/actionview@7.0.3.1.rbi +14907 -0
  59. data/sorbet/rbi/gems/activejob@7.0.3.1.rbi +2553 -0
  60. data/sorbet/rbi/gems/activemodel@7.0.3.1.rbi +5999 -0
  61. data/sorbet/rbi/gems/activerecord@7.0.3.1.rbi +37832 -0
  62. data/sorbet/rbi/gems/activestorage@7.0.3.1.rbi +2321 -0
  63. data/sorbet/rbi/gems/activesupport@7.0.3.1.rbi +18818 -0
  64. data/sorbet/rbi/gems/concurrent-ruby@1.1.10.rbi +11722 -0
  65. data/sorbet/rbi/gems/constant_resolver@0.2.0.rbi +90 -0
  66. data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +1079 -0
  67. data/sorbet/rbi/gems/digest@3.1.0.rbi +189 -0
  68. data/sorbet/rbi/gems/erubi@1.11.0.rbi +140 -0
  69. data/sorbet/rbi/gems/globalid@1.0.0.rbi +572 -0
  70. data/sorbet/rbi/gems/i18n@1.12.0.rbi +2296 -0
  71. data/sorbet/rbi/gems/json@2.6.2.rbi +1548 -0
  72. data/sorbet/rbi/gems/language_server-protocol@3.16.0.3.rbi +8 -0
  73. data/sorbet/rbi/gems/loofah@2.18.0.rbi +877 -0
  74. data/sorbet/rbi/gems/m@1.6.0.rbi +257 -0
  75. data/sorbet/rbi/gems/marcel@1.0.2.rbi +220 -0
  76. data/sorbet/rbi/gems/mini_mime@1.1.2.rbi +170 -0
  77. data/sorbet/rbi/gems/mini_portile2@2.8.0.rbi +8 -0
  78. data/sorbet/rbi/gems/minitest-focus@1.3.1.rbi +104 -0
  79. data/sorbet/rbi/gems/minitest@5.16.2.rbi +2136 -0
  80. data/sorbet/rbi/gems/mocha@1.14.0.rbi +4177 -0
  81. data/sorbet/rbi/gems/net-imap@0.2.3.rbi +2147 -0
  82. data/sorbet/rbi/gems/net-pop@0.1.1.rbi +926 -0
  83. data/sorbet/rbi/gems/net-protocol@0.1.3.rbi +11 -0
  84. data/sorbet/rbi/gems/net-smtp@0.3.1.rbi +1108 -0
  85. data/sorbet/rbi/gems/netrc@0.11.0.rbi +153 -0
  86. data/sorbet/rbi/gems/nio4r@2.5.8.rbi +292 -0
  87. data/sorbet/rbi/gems/nokogiri@1.13.8.rbi +6478 -0
  88. data/sorbet/rbi/gems/parallel@1.22.1.rbi +277 -0
  89. data/sorbet/rbi/gems/parser@3.1.2.1.rbi +9029 -0
  90. data/sorbet/rbi/gems/prettier_print@0.1.0.rbi +8 -0
  91. data/sorbet/rbi/gems/pry@0.14.1.rbi +8 -0
  92. data/sorbet/rbi/gems/racc@1.6.0.rbi +152 -0
  93. data/sorbet/rbi/gems/rack-test@2.0.2.rbi +953 -0
  94. data/sorbet/rbi/gems/rack@2.2.4.rbi +5636 -0
  95. data/sorbet/rbi/gems/rails-html-sanitizer@1.4.3.rbi +688 -0
  96. data/sorbet/rbi/gems/rails@7.0.3.1.rbi +8 -0
  97. data/sorbet/rbi/gems/railties@7.0.3.1.rbi +3507 -0
  98. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +392 -0
  99. data/sorbet/rbi/gems/rake@13.0.6.rbi +2924 -0
  100. data/sorbet/rbi/gems/rbi@0.0.15.rbi +3007 -0
  101. data/sorbet/rbi/gems/regexp_parser@2.5.0.rbi +3383 -0
  102. data/sorbet/rbi/gems/rexml@3.2.5.rbi +4714 -0
  103. data/sorbet/rbi/gems/rubocop-ast@1.21.0.rbi +6961 -0
  104. data/sorbet/rbi/gems/rubocop-performance@1.14.3.rbi +2986 -0
  105. data/sorbet/rbi/gems/{rubocop-shopify@2.0.1.rbi → rubocop-shopify@2.9.0.rbi} +4 -4
  106. data/sorbet/rbi/gems/rubocop-sorbet@0.6.11.rbi +992 -0
  107. data/sorbet/rbi/gems/rubocop@1.34.1.rbi +51820 -0
  108. data/sorbet/rbi/gems/ruby-lsp@0.2.1.rbi +11 -0
  109. data/sorbet/rbi/gems/smart_properties@1.17.0.rbi +474 -0
  110. data/sorbet/rbi/gems/spoom@1.1.11.rbi +2181 -0
  111. data/sorbet/rbi/gems/spring@4.0.0.rbi +411 -0
  112. data/sorbet/rbi/gems/strscan@3.0.4.rbi +8 -0
  113. data/sorbet/rbi/gems/syntax_tree@3.3.0.rbi +8 -0
  114. data/sorbet/rbi/gems/tapioca@0.9.2.rbi +3181 -0
  115. data/sorbet/rbi/gems/thor@1.2.1.rbi +3956 -0
  116. data/sorbet/rbi/gems/timeout@0.3.0.rbi +142 -0
  117. data/sorbet/rbi/gems/tzinfo@2.0.5.rbi +5896 -0
  118. data/sorbet/rbi/gems/unicode-display_width@2.2.0.rbi +48 -0
  119. data/sorbet/rbi/gems/unparser@0.6.5.rbi +4529 -0
  120. data/sorbet/rbi/gems/webrick@1.7.0.rbi +2582 -0
  121. data/sorbet/rbi/gems/websocket-driver@0.7.5.rbi +993 -0
  122. data/sorbet/rbi/gems/yard-sorbet@0.6.1.rbi +388 -0
  123. data/sorbet/rbi/gems/yard@0.9.28.rbi +18242 -0
  124. data/sorbet/rbi/gems/zeitwerk@2.6.0.rbi +867 -0
  125. data/sorbet/rbi/shims/psych.rbi +5 -0
  126. data/sorbet/tapioca/require.rb +2 -3
  127. metadata +91 -146
  128. data/.github/probots.yml +0 -2
  129. data/library.yml +0 -6
  130. data/service.yml +0 -1
  131. data/sorbet/rbi/gems/actioncable@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -860
  132. data/sorbet/rbi/gems/actionmailbox@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -568
  133. data/sorbet/rbi/gems/actionmailer@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -587
  134. data/sorbet/rbi/gems/actionpack@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -5314
  135. data/sorbet/rbi/gems/actiontext@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -699
  136. data/sorbet/rbi/gems/actionview@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -2515
  137. data/sorbet/rbi/gems/activejob@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -624
  138. data/sorbet/rbi/gems/activemodel@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -1248
  139. data/sorbet/rbi/gems/activerecord@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -8363
  140. data/sorbet/rbi/gems/activestorage@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -876
  141. data/sorbet/rbi/gems/activesupport@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -3987
  142. data/sorbet/rbi/gems/colorize@0.8.1.rbi +0 -40
  143. data/sorbet/rbi/gems/commander@4.5.2.rbi +0 -8
  144. data/sorbet/rbi/gems/concurrent-ruby@1.1.8.rbi +0 -1969
  145. data/sorbet/rbi/gems/constant_resolver@0.1.5.rbi +0 -26
  146. data/sorbet/rbi/gems/erubi@1.10.0.rbi +0 -41
  147. data/sorbet/rbi/gems/globalid@0.4.2.rbi +0 -178
  148. data/sorbet/rbi/gems/highline@2.0.3.rbi +0 -8
  149. data/sorbet/rbi/gems/i18n@1.8.10.rbi +0 -600
  150. data/sorbet/rbi/gems/loofah@2.9.0.rbi +0 -274
  151. data/sorbet/rbi/gems/m@1.5.1.rbi +0 -108
  152. data/sorbet/rbi/gems/marcel@1.0.0.rbi +0 -70
  153. data/sorbet/rbi/gems/mini_mime@1.0.3.rbi +0 -71
  154. data/sorbet/rbi/gems/minitest-focus@1.2.1.rbi +0 -8
  155. data/sorbet/rbi/gems/minitest@5.14.4.rbi +0 -544
  156. data/sorbet/rbi/gems/mocha@1.12.0.rbi +0 -953
  157. data/sorbet/rbi/gems/nio4r@2.5.7.rbi +0 -90
  158. data/sorbet/rbi/gems/nokogiri@1.11.2.rbi +0 -1647
  159. data/sorbet/rbi/gems/parallel@1.20.1.rbi +0 -117
  160. data/sorbet/rbi/gems/parlour@6.0.0.rbi +0 -1272
  161. data/sorbet/rbi/gems/parser@3.0.0.0.rbi +0 -1745
  162. data/sorbet/rbi/gems/pry@0.14.0.rbi +0 -8
  163. data/sorbet/rbi/gems/psych@3.3.2.rbi +0 -24
  164. data/sorbet/rbi/gems/racc@1.5.2.rbi +0 -57
  165. data/sorbet/rbi/gems/rack-test@1.1.0.rbi +0 -335
  166. data/sorbet/rbi/gems/rack@2.2.3.rbi +0 -1718
  167. data/sorbet/rbi/gems/rails-html-sanitizer@1.3.0.rbi +0 -213
  168. data/sorbet/rbi/gems/rails@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -8
  169. data/sorbet/rbi/gems/railties@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi +0 -880
  170. data/sorbet/rbi/gems/rainbow@3.0.0.rbi +0 -155
  171. data/sorbet/rbi/gems/rake@13.0.3.rbi +0 -837
  172. data/sorbet/rbi/gems/regexp_parser@2.1.1.rbi +0 -8
  173. data/sorbet/rbi/gems/rexml@3.2.4.rbi +0 -8
  174. data/sorbet/rbi/gems/rubocop-ast@1.4.1.rbi +0 -8
  175. data/sorbet/rbi/gems/rubocop-performance@1.10.2.rbi +0 -8
  176. data/sorbet/rbi/gems/rubocop-sorbet@0.6.1.rbi +0 -8
  177. data/sorbet/rbi/gems/rubocop@1.12.0.rbi +0 -8
  178. data/sorbet/rbi/gems/smart_properties@1.15.0.rbi +0 -168
  179. data/sorbet/rbi/gems/spoom@1.1.0.rbi +0 -1061
  180. data/sorbet/rbi/gems/spring@2.1.1.rbi +0 -160
  181. data/sorbet/rbi/gems/sprockets-rails@3.2.2.rbi +0 -451
  182. data/sorbet/rbi/gems/sprockets@4.0.2.rbi +0 -1133
  183. data/sorbet/rbi/gems/tapioca@0.4.19.rbi +0 -603
  184. data/sorbet/rbi/gems/thor@1.1.0.rbi +0 -893
  185. data/sorbet/rbi/gems/tzinfo@2.0.4.rbi +0 -566
  186. data/sorbet/rbi/gems/unicode-display_width@2.0.0.rbi +0 -8
  187. data/sorbet/rbi/gems/websocket-driver@0.7.3.rbi +0 -438
  188. data/sorbet/rbi/gems/zeitwerk@2.4.2.rbi +0 -177
@@ -0,0 +1,992 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `rubocop-sorbet` gem.
5
+ # Please instead update this file by running `bin/tapioca gem rubocop-sorbet`.
6
+
7
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/sorbet/version.rb:2
8
+ module RuboCop; end
9
+
10
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb:6
11
+ module RuboCop::Cop; end
12
+
13
+ # @deprecated IgnoredMethods class has been replaced with AllowedMethods.
14
+ #
15
+ # source://rubocop-1.34.1/lib/rubocop/cop/mixin/allowed_methods.rb:33
16
+ RuboCop::Cop::IgnoredMethods = RuboCop::Cop::AllowedMethods
17
+
18
+ # @deprecated IgnoredPattern class has been replaced with AllowedPattern.
19
+ #
20
+ # source://rubocop-1.34.1/lib/rubocop/cop/mixin/allowed_pattern.rb:46
21
+ RuboCop::Cop::IgnoredPattern = RuboCop::Cop::AllowedPattern
22
+
23
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb:7
24
+ module RuboCop::Cop::Sorbet; end
25
+
26
+ # This cop disallows using `.override(allow_incompatible: true)`.
27
+ # Using `allow_incompatible` suggests a violation of the Liskov
28
+ # Substitution Principle, meaning that a subclass is not a valid
29
+ # subtype of it's superclass. This Cop prevents these design smells
30
+ # from occurring.
31
+ #
32
+ # @example
33
+ #
34
+ # # bad
35
+ # sig.override(allow_incompatible: true)
36
+ #
37
+ # # good
38
+ # sig.override
39
+ #
40
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:21
41
+ class RuboCop::Cop::Sorbet::AllowIncompatibleOverride < ::RuboCop::Cop::Cop
42
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:35
43
+ def allow_incompatible?(param0); end
44
+
45
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:39
46
+ def allow_incompatible_override?(param0 = T.unsafe(nil)); end
47
+
48
+ # @return [Boolean]
49
+ #
50
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:31
51
+ def not_nil?(node); end
52
+
53
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:48
54
+ def on_send(node); end
55
+
56
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:22
57
+ def sig?(param0); end
58
+ end
59
+
60
+ # This cop disallows binding the return value of `T.any`, `T.all`, `T.enum`
61
+ # to a constant directly. To bind the value, one must use `T.type_alias`.
62
+ #
63
+ # @example
64
+ #
65
+ # # bad
66
+ # FooOrBar = T.any(Foo, Bar)
67
+ #
68
+ # # good
69
+ # FooOrBar = T.type_alias { T.any(Foo, Bar) }
70
+ #
71
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb:18
72
+ class RuboCop::Cop::Sorbet::BindingConstantWithoutTypeAlias < ::RuboCop::Cop::Cop
73
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb:116
74
+ def autocorrect(node); end
75
+
76
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb:19
77
+ def binding_unaliased_type?(param0 = T.unsafe(nil)); end
78
+
79
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb:51
80
+ def dynamic_type_creation_with_block?(param0 = T.unsafe(nil)); end
81
+
82
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb:66
83
+ def generic_parameter_decl_block_call?(param0 = T.unsafe(nil)); end
84
+
85
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb:60
86
+ def generic_parameter_decl_call?(param0 = T.unsafe(nil)); end
87
+
88
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb:72
89
+ def method_needing_aliasing_on_t?(param0); end
90
+
91
+ # @return [Boolean]
92
+ #
93
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb:85
94
+ def not_dynamic_type_creation_with_block?(node); end
95
+
96
+ # @return [Boolean]
97
+ #
98
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb:89
99
+ def not_generic_parameter_decl?(node); end
100
+
101
+ # @return [Boolean]
102
+ #
103
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb:93
104
+ def not_nil?(node); end
105
+
106
+ # @return [Boolean]
107
+ #
108
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb:81
109
+ def not_t_let?(node); end
110
+
111
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb:97
112
+ def on_casgn(node); end
113
+
114
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb:41
115
+ def t_let?(param0 = T.unsafe(nil)); end
116
+
117
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb:32
118
+ def using_deprecated_type_alias_syntax?(param0 = T.unsafe(nil)); end
119
+
120
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb:23
121
+ def using_type_alias?(param0 = T.unsafe(nil)); end
122
+ end
123
+
124
+ # This cop ensures that callback conditionals are bound to the right type
125
+ # so that they are type checked properly.
126
+ #
127
+ # Auto-correction is unsafe because other libraries define similar style callbacks as Rails, but don't always need
128
+ # binding to the attached class. Auto-correcting those usages can lead to false positives and auto-correction
129
+ # introduces new typing errors.
130
+ #
131
+ # @example
132
+ #
133
+ # # bad
134
+ # class Post < ApplicationRecord
135
+ # before_create :do_it, if: -> { should_do_it? }
136
+ #
137
+ # def should_do_it?
138
+ # true
139
+ # end
140
+ # end
141
+ #
142
+ # # good
143
+ # class Post < ApplicationRecord
144
+ # before_create :do_it, if: -> {
145
+ # T.bind(self, Post)
146
+ # should_do_it?
147
+ # }
148
+ #
149
+ # def should_do_it?
150
+ # true
151
+ # end
152
+ # end
153
+ #
154
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/callback_conditionals_binding.rb:35
155
+ class RuboCop::Cop::Sorbet::CallbackConditionalsBinding < ::RuboCop::Cop::Cop
156
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/callback_conditionals_binding.rb:47
157
+ def autocorrect(node); end
158
+
159
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/callback_conditionals_binding.rb:99
160
+ def on_send(node); end
161
+ end
162
+
163
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/callback_conditionals_binding.rb:36
164
+ RuboCop::Cop::Sorbet::CallbackConditionalsBinding::CALLBACKS = T.let(T.unsafe(nil), Array)
165
+
166
+ # This cop disallows the usage of `checked(true)`. This usage could cause
167
+ # confusion; it could lead some people to believe that a method would be checked
168
+ # even if runtime checks have not been enabled on the class or globally.
169
+ # Additionally, in the event where checks are enabled, `checked(true)` would
170
+ # be redundant; only `checked(false)` or `soft` would change the behaviour.
171
+ #
172
+ # @example
173
+ #
174
+ # # bad
175
+ # sig { void.checked(true) }
176
+ #
177
+ # # good
178
+ # sig { void }
179
+ #
180
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb:22
181
+ class RuboCop::Cop::Sorbet::CheckedTrueInSignature < ::RuboCop::Cop::Sorbet::SignatureCop
182
+ include ::RuboCop::Cop::RangeHelp
183
+
184
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb:25
185
+ def offending_node(param0); end
186
+
187
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb:36
188
+ def on_signature(node); end
189
+ end
190
+
191
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb:29
192
+ RuboCop::Cop::Sorbet::CheckedTrueInSignature::MESSAGE = T.let(T.unsafe(nil), String)
193
+
194
+ # This cop disallows the calls that are used to get constants fom Strings
195
+ # such as +constantize+, +const_get+, and +constants+.
196
+ #
197
+ # The goal of this cop is to make the code easier to statically analyze,
198
+ # more IDE-friendly, and more predictable. It leads to code that clearly
199
+ # expresses which values the constant can have.
200
+ #
201
+ # @example
202
+ #
203
+ # # bad
204
+ # class_name.constantize
205
+ #
206
+ # # bad
207
+ # constants.detect { |c| c.name == "User" }
208
+ #
209
+ # # bad
210
+ # const_get(class_name)
211
+ #
212
+ # # good
213
+ # case class_name
214
+ # when "User"
215
+ # User
216
+ # else
217
+ # raise ArgumentError
218
+ # end
219
+ #
220
+ # # good
221
+ # { "User" => User }.fetch(class_name)
222
+ #
223
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/constants_from_strings.rb:36
224
+ class RuboCop::Cop::Sorbet::ConstantsFromStrings < ::RuboCop::Cop::Cop
225
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/constants_from_strings.rb:37
226
+ def constant_from_string?(param0 = T.unsafe(nil)); end
227
+
228
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/constants_from_strings.rb:41
229
+ def on_send(node); end
230
+ end
231
+
232
+ # This cop checks that the Sorbet sigil comes as the first magic comment in the file.
233
+ #
234
+ # The expected order for magic comments is: typed, (en)?coding, warn_indent then frozen_string_literal.
235
+ #
236
+ # For example, the following bad ordering:
237
+ #
238
+ # ```ruby
239
+ # class Foo; end
240
+ # ```
241
+ #
242
+ # Will be corrected as:
243
+ #
244
+ # ```ruby
245
+ # class Foo; end
246
+ # ```
247
+ #
248
+ # Only `typed`, `(en)?coding`, `warn_indent` and `frozen_string_literal` magic comments are considered,
249
+ # other comments or magic comments are left in the same place.
250
+ #
251
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:30
252
+ class RuboCop::Cop::Sorbet::EnforceSigilOrder < ::RuboCop::Cop::Sorbet::ValidSigil
253
+ include ::RuboCop::Cop::RangeHelp
254
+
255
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:42
256
+ def autocorrect(_node); end
257
+
258
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:33
259
+ def investigate(processed_source); end
260
+
261
+ protected
262
+
263
+ # checks
264
+ #
265
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:91
266
+ def check_magic_comments_order(tokens); end
267
+
268
+ # Get all the tokens in `processed_source` that match `MAGIC_REGEX`
269
+ #
270
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:83
271
+ def extract_magic_comments(processed_source); end
272
+ end
273
+
274
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:67
275
+ RuboCop::Cop::Sorbet::EnforceSigilOrder::CODING_REGEX = T.let(T.unsafe(nil), Regexp)
276
+
277
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:69
278
+ RuboCop::Cop::Sorbet::EnforceSigilOrder::FROZEN_REGEX = T.let(T.unsafe(nil), Regexp)
279
+
280
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:68
281
+ RuboCop::Cop::Sorbet::EnforceSigilOrder::INDENT_REGEX = T.let(T.unsafe(nil), Regexp)
282
+
283
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:78
284
+ RuboCop::Cop::Sorbet::EnforceSigilOrder::MAGIC_REGEX = T.let(T.unsafe(nil), Regexp)
285
+
286
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:71
287
+ RuboCop::Cop::Sorbet::EnforceSigilOrder::PREFERRED_ORDER = T.let(T.unsafe(nil), Hash)
288
+
289
+ # This cop checks that every method definition and attribute accessor has a Sorbet signature.
290
+ #
291
+ # It also suggest an autocorrect with placeholders so the following code:
292
+ #
293
+ # ```
294
+ # def foo(a, b, c); end
295
+ # ```
296
+ #
297
+ # Will be corrected as:
298
+ #
299
+ # ```
300
+ # sig { params(a: T.untyped, b: T.untyped, c: T.untyped).returns(T.untyped)
301
+ # def foo(a, b, c); end
302
+ # ```
303
+ #
304
+ # You can configure the placeholders used by changing the following options:
305
+ #
306
+ # * `ParameterTypePlaceholder`: placeholders used for parameter types (default: 'T.untyped')
307
+ # * `ReturnTypePlaceholder`: placeholders used for return types (default: 'T.untyped')
308
+ #
309
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:29
310
+ class RuboCop::Cop::Sorbet::EnforceSignatures < ::RuboCop::Cop::Sorbet::SignatureCop
311
+ # @return [EnforceSignatures] a new instance of EnforceSignatures
312
+ #
313
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:30
314
+ def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end
315
+
316
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:35
317
+ def accessor?(param0 = T.unsafe(nil)); end
318
+
319
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:55
320
+ def autocorrect(node); end
321
+
322
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:39
323
+ def on_def(node); end
324
+
325
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:43
326
+ def on_defs(node); end
327
+
328
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:47
329
+ def on_send(node); end
330
+
331
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:51
332
+ def on_signature(node); end
333
+
334
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:74
335
+ def scope(node); end
336
+
337
+ private
338
+
339
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:82
340
+ def check_node(node); end
341
+
342
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:93
343
+ def param_type_placeholder; end
344
+
345
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:97
346
+ def return_type_placeholder; end
347
+ end
348
+
349
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:101
350
+ class RuboCop::Cop::Sorbet::EnforceSignatures::SigSuggestion
351
+ # @return [SigSuggestion] a new instance of SigSuggestion
352
+ #
353
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:104
354
+ def initialize(indent, param_placeholder, return_placeholder); end
355
+
356
+ # Returns the value of attribute params.
357
+ #
358
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:102
359
+ def params; end
360
+
361
+ # Sets the attribute params
362
+ #
363
+ # @param value the value to set the attribute params to.
364
+ #
365
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:102
366
+ def params=(_arg0); end
367
+
368
+ # Returns the value of attribute returns.
369
+ #
370
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:102
371
+ def returns; end
372
+
373
+ # Sets the attribute returns
374
+ #
375
+ # @param value the value to set the attribute returns to.
376
+ #
377
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:102
378
+ def returns=(_arg0); end
379
+
380
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:112
381
+ def to_autocorrect; end
382
+
383
+ private
384
+
385
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:124
386
+ def generate_params; end
387
+
388
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:135
389
+ def generate_return; end
390
+ end
391
+
392
+ # This cop checks that there is only one Sorbet sigil in a given file
393
+ #
394
+ # For example, the following class with two sigils
395
+ #
396
+ # ```ruby
397
+ # class Foo; end
398
+ # ```
399
+ #
400
+ # Will be corrected as:
401
+ #
402
+ # ```ruby
403
+ # class Foo; end
404
+ # ```
405
+ #
406
+ # Other comments or magic comments are left in place.
407
+ #
408
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb:26
409
+ class RuboCop::Cop::Sorbet::EnforceSingleSigil < ::RuboCop::Cop::Sorbet::ValidSigil
410
+ include ::RuboCop::Cop::RangeHelp
411
+
412
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb:39
413
+ def autocorrect(_node); end
414
+
415
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb:29
416
+ def investigate(processed_source); end
417
+
418
+ protected
419
+
420
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb:55
421
+ def extract_all_sigils(processed_source); end
422
+ end
423
+
424
+ # This cop makes the Sorbet `false` sigil mandatory in all files.
425
+ #
426
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/sigils/false_sigil.rb:10
427
+ class RuboCop::Cop::Sorbet::FalseSigil < ::RuboCop::Cop::Sorbet::HasSigil
428
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/sigils/false_sigil.rb:11
429
+ def minimum_strictness; end
430
+ end
431
+
432
+ # This cop ensures RBI shims do not include a call to extend T::Sig
433
+ # or to extend T::Helpers
434
+ #
435
+ # @example
436
+ #
437
+ # # bad
438
+ # module SomeModule
439
+ # extend T::Sig
440
+ # extend T::Helpers
441
+ #
442
+ # sig { returns(String) }
443
+ # def foo; end
444
+ # end
445
+ #
446
+ # # good
447
+ # module SomeModule
448
+ # sig { returns(String) }
449
+ # def foo; end
450
+ # end
451
+ #
452
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb:25
453
+ class RuboCop::Cop::Sorbet::ForbidExtendTSigHelpersInShims < ::RuboCop::Cop::Cop
454
+ include ::RuboCop::Cop::RangeHelp
455
+
456
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb:39
457
+ def autocorrect(node); end
458
+
459
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb:35
460
+ def extend_t_helpers?(param0 = T.unsafe(nil)); end
461
+
462
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb:31
463
+ def extend_t_sig?(param0 = T.unsafe(nil)); end
464
+
465
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb:47
466
+ def on_send(node); end
467
+ end
468
+
469
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb:28
470
+ RuboCop::Cop::Sorbet::ForbidExtendTSigHelpersInShims::MSG = T.let(T.unsafe(nil), String)
471
+
472
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb:29
473
+ RuboCop::Cop::Sorbet::ForbidExtendTSigHelpersInShims::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
474
+
475
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/forbid_include_const_literal.rb:29
476
+ class RuboCop::Cop::Sorbet::ForbidIncludeConstLiteral < ::RuboCop::Cop::Cop
477
+ # @return [ForbidIncludeConstLiteral] a new instance of ForbidIncludeConstLiteral
478
+ #
479
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/forbid_include_const_literal.rb:40
480
+ def initialize(*_arg0); end
481
+
482
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/forbid_include_const_literal.rb:56
483
+ def autocorrect(node); end
484
+
485
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/forbid_include_const_literal.rb:34
486
+ def not_lit_const_include?(param0 = T.unsafe(nil)); end
487
+
488
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/forbid_include_const_literal.rb:45
489
+ def on_send(node); end
490
+
491
+ # Returns the value of attribute used_names.
492
+ #
493
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/forbid_include_const_literal.rb:32
494
+ def used_names; end
495
+
496
+ # Sets the attribute used_names
497
+ #
498
+ # @param value the value to set the attribute used_names to.
499
+ #
500
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/forbid_include_const_literal.rb:32
501
+ def used_names=(_arg0); end
502
+ end
503
+
504
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/forbid_include_const_literal.rb:30
505
+ RuboCop::Cop::Sorbet::ForbidIncludeConstLiteral::MSG = T.let(T.unsafe(nil), String)
506
+
507
+ # This cop makes sure that RBI files are always located under the defined allowed paths.
508
+ #
509
+ # Options:
510
+ #
511
+ # * `AllowedPaths`: A list of the paths where RBI files are allowed (default: ["sorbet/rbi/**"])
512
+ #
513
+ # @example
514
+ # # bad
515
+ # # lib/some_file.rbi
516
+ # # other_file.rbi
517
+ #
518
+ # # good
519
+ # # sorbet/rbi/some_file.rbi
520
+ # # sorbet/rbi/any/path/for/file.rbi
521
+ #
522
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_allowed_paths.rb:22
523
+ class RuboCop::Cop::Sorbet::ForbidRBIOutsideOfAllowedPaths < ::RuboCop::Cop::Cop
524
+ include ::RuboCop::Cop::RangeHelp
525
+
526
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_allowed_paths.rb:25
527
+ def investigate(processed_source); end
528
+
529
+ private
530
+
531
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_allowed_paths.rb:57
532
+ def allowed_paths; end
533
+ end
534
+
535
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb:27
536
+ class RuboCop::Cop::Sorbet::ForbidSuperclassConstLiteral < ::RuboCop::Cop::Cop
537
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb:30
538
+ def not_lit_const_superclass?(param0 = T.unsafe(nil)); end
539
+
540
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb:38
541
+ def on_class(node); end
542
+ end
543
+
544
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb:28
545
+ RuboCop::Cop::Sorbet::ForbidSuperclassConstLiteral::MSG = T.let(T.unsafe(nil), String)
546
+
547
+ # This cop disallows using `T.unsafe` anywhere.
548
+ #
549
+ # @example
550
+ #
551
+ # # bad
552
+ # T.unsafe(foo)
553
+ #
554
+ # # good
555
+ # foo
556
+ #
557
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/forbid_t_unsafe.rb:17
558
+ class RuboCop::Cop::Sorbet::ForbidTUnsafe < ::RuboCop::Cop::Cop
559
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/forbid_t_unsafe.rb:20
560
+ def on_send(node); end
561
+
562
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/forbid_t_unsafe.rb:18
563
+ def t_unsafe?(param0 = T.unsafe(nil)); end
564
+ end
565
+
566
+ # This cop disallows using `T.untyped` anywhere.
567
+ #
568
+ # @example
569
+ #
570
+ # # bad
571
+ # sig { params(my_argument: T.untyped).void }
572
+ # def foo(my_argument); end
573
+ #
574
+ # # good
575
+ # sig { params(my_argument: String).void }
576
+ # def foo(my_argument); end
577
+ #
578
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/forbid_t_untyped.rb:20
579
+ class RuboCop::Cop::Sorbet::ForbidTUntyped < ::RuboCop::Cop::Cop
580
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/forbid_t_untyped.rb:23
581
+ def on_send(node); end
582
+
583
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/forbid_t_untyped.rb:21
584
+ def t_untyped?(param0 = T.unsafe(nil)); end
585
+ end
586
+
587
+ # This cop disallows use of `T.untyped` or `T.nilable(T.untyped)`
588
+ # as a prop type for `T::Struct`.
589
+ #
590
+ # @example
591
+ #
592
+ # # bad
593
+ # class SomeClass
594
+ # const :foo, T.untyped
595
+ # prop :bar, T.nilable(T.untyped)
596
+ # end
597
+ #
598
+ # # good
599
+ # class SomeClass
600
+ # const :foo, Integer
601
+ # prop :bar, T.nilable(String)
602
+ # end
603
+ #
604
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb:25
605
+ class RuboCop::Cop::Sorbet::ForbidUntypedStructProps < ::RuboCop::Cop::Cop
606
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb:48
607
+ def on_class(node); end
608
+
609
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb:40
610
+ def subclass_of_t_struct?(param0 = T.unsafe(nil)); end
611
+
612
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb:36
613
+ def t_nilable_untyped(param0 = T.unsafe(nil)); end
614
+
615
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb:28
616
+ def t_struct(param0 = T.unsafe(nil)); end
617
+
618
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb:32
619
+ def t_untyped(param0 = T.unsafe(nil)); end
620
+
621
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb:44
622
+ def untyped_props(param0); end
623
+ end
624
+
625
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb:26
626
+ RuboCop::Cop::Sorbet::ForbidUntypedStructProps::MSG = T.let(T.unsafe(nil), String)
627
+
628
+ # This cop makes the Sorbet typed sigil mandatory in all files.
629
+ #
630
+ # Options:
631
+ #
632
+ # * `SuggestedStrictness`: Sorbet strictness level suggested in offense messages (default: 'false')
633
+ # * `MinimumStrictness`: If set, make offense if the strictness level in the file is below this one
634
+ #
635
+ # If a `MinimumStrictness` level is specified, it will be used in offense messages and autocorrect.
636
+ #
637
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/sigils/has_sigil.rb:17
638
+ class RuboCop::Cop::Sorbet::HasSigil < ::RuboCop::Cop::Sorbet::ValidSigil
639
+ # @return [Boolean]
640
+ #
641
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/sigils/has_sigil.rb:20
642
+ def require_sigil_on_all_files?; end
643
+ end
644
+
645
+ # This cop makes the Sorbet `ignore` sigil mandatory in all files.
646
+ #
647
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/sigils/ignore_sigil.rb:10
648
+ class RuboCop::Cop::Sorbet::IgnoreSigil < ::RuboCop::Cop::Sorbet::HasSigil
649
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/sigils/ignore_sigil.rb:11
650
+ def minimum_strictness; end
651
+ end
652
+
653
+ # This cop checks for the ordering of keyword arguments required by
654
+ # sorbet-runtime. The ordering requires that all keyword arguments
655
+ # are at the end of the parameters list, and all keyword arguments
656
+ # with a default value must be after those without default values.
657
+ #
658
+ # @example
659
+ #
660
+ # # bad
661
+ # sig { params(a: Integer, b: String).void }
662
+ # def foo(a: 1, b:); end
663
+ #
664
+ # # good
665
+ # sig { params(b: String, a: Integer).void }
666
+ # def foo(b:, a: 1); end
667
+ #
668
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb:23
669
+ class RuboCop::Cop::Sorbet::KeywordArgumentOrdering < ::RuboCop::Cop::Sorbet::SignatureCop
670
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb:24
671
+ def on_signature(node); end
672
+
673
+ private
674
+
675
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb:34
676
+ def check_order_for_kwoptargs(parameters); end
677
+ end
678
+
679
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb:8
680
+ module RuboCop::Cop::Sorbet::MutableConstantSorbetAwareBehaviour
681
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb:15
682
+ def on_assignment(value); end
683
+
684
+ class << self
685
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb:9
686
+ def prepended(base); end
687
+ end
688
+ end
689
+
690
+ # This cop ensures one ancestor per requires_ancestor line
691
+ # rather than chaining them as a comma-separated list.
692
+ #
693
+ # @example
694
+ #
695
+ # # bad
696
+ # module SomeModule
697
+ # requires_ancestor Kernel, Minitest::Assertions
698
+ # end
699
+ #
700
+ # # good
701
+ # module SomeModule
702
+ # requires_ancestor Kernel
703
+ # requires_ancestor Minitest::Assertions
704
+ # end
705
+ #
706
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/one_ancestor_per_line.rb:24
707
+ class RuboCop::Cop::Sorbet::OneAncestorPerLine < ::RuboCop::Cop::Cop
708
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/one_ancestor_per_line.rb:35
709
+ def abstract?(param0); end
710
+
711
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/one_ancestor_per_line.rb:51
712
+ def autocorrect(node); end
713
+
714
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/one_ancestor_per_line.rb:31
715
+ def more_than_one_ancestor(param0 = T.unsafe(nil)); end
716
+
717
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/one_ancestor_per_line.rb:45
718
+ def on_class(node); end
719
+
720
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/one_ancestor_per_line.rb:39
721
+ def on_module(node); end
722
+
723
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/one_ancestor_per_line.rb:27
724
+ def requires_ancestors(param0); end
725
+
726
+ private
727
+
728
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/one_ancestor_per_line.rb:67
729
+ def new_ra_line(indent_count); end
730
+
731
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/one_ancestor_per_line.rb:61
732
+ def process_node(node); end
733
+ end
734
+
735
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/one_ancestor_per_line.rb:25
736
+ RuboCop::Cop::Sorbet::OneAncestorPerLine::MSG = T.let(T.unsafe(nil), String)
737
+
738
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/signature_build_order.rb:15
739
+ class RuboCop::Cop::Sorbet::SignatureBuildOrder < ::RuboCop::Cop::Sorbet::SignatureCop
740
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/signature_build_order.rb:54
741
+ def autocorrect(node); end
742
+
743
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/signature_build_order.rb:34
744
+ def on_signature(node); end
745
+
746
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/signature_build_order.rb:30
747
+ def root_call(param0); end
748
+
749
+ private
750
+
751
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/signature_build_order.rb:96
752
+ def call_chain(sig_child_node); end
753
+
754
+ # @return [Boolean]
755
+ #
756
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/signature_build_order.rb:92
757
+ def can_autocorrect?; end
758
+
759
+ # This method exists to reparse the current node with modern features enabled.
760
+ # Modern features include "index send" emitting, which is necessary to unparse
761
+ # "index sends" (i.e. `[]` calls) back to index accessors (i.e. as `foo[bar]``).
762
+ # Otherwise, we would get the unparsed node as `foo.[](bar)`.
763
+ #
764
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/signature_build_order.rb:83
765
+ def node_reparsed_with_modern_features(node); end
766
+ end
767
+
768
+ # Create a subclass of AST Builder that has modern features turned on
769
+ #
770
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/signature_build_order.rb:72
771
+ class RuboCop::Cop::Sorbet::SignatureBuildOrder::ModernBuilder < ::RuboCop::AST::Builder; end
772
+
773
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/signature_build_order.rb:16
774
+ RuboCop::Cop::Sorbet::SignatureBuildOrder::ORDER = T.let(T.unsafe(nil), Hash)
775
+
776
+ # Abstract cop specific to Sorbet signatures
777
+ #
778
+ # You can subclass it to use the `on_signature` trigger and the `signature?` node matcher.
779
+ #
780
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/signature_cop.rb:11
781
+ class RuboCop::Cop::Sorbet::SignatureCop < ::RuboCop::Cop::Cop
782
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/signature_cop.rb:26
783
+ def allowed_recv(recv); end
784
+
785
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/signature_cop.rb:33
786
+ def on_block(node); end
787
+
788
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/signature_cop.rb:37
789
+ def on_signature(_); end
790
+
791
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/signature_cop.rb:14
792
+ def signature?(param0 = T.unsafe(nil)); end
793
+
794
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/signature_cop.rb:18
795
+ def with_runtime?(param0 = T.unsafe(nil)); end
796
+
797
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/signatures/signature_cop.rb:22
798
+ def without_runtime?(param0 = T.unsafe(nil)); end
799
+ end
800
+
801
+ # This cop ensures empty class/module definitions in RBI files are
802
+ # done on a single line rather than being split across multiple lines.
803
+ #
804
+ # @example
805
+ #
806
+ # # bad
807
+ # module SomeModule
808
+ # end
809
+ #
810
+ # # good
811
+ # module SomeModule; end
812
+ #
813
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb:17
814
+ class RuboCop::Cop::Sorbet::SingleLineRbiClassModuleDefinitions < ::RuboCop::Cop::Cop
815
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb:28
816
+ def autocorrect(node); end
817
+
818
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb:24
819
+ def on_class(node); end
820
+
821
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb:20
822
+ def on_module(node); end
823
+
824
+ protected
825
+
826
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb:34
827
+ def convert_newlines(source); end
828
+
829
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb:38
830
+ def process_node(node); end
831
+ end
832
+
833
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb:18
834
+ RuboCop::Cop::Sorbet::SingleLineRbiClassModuleDefinitions::MSG = T.let(T.unsafe(nil), String)
835
+
836
+ # This cop makes the Sorbet `strict` sigil mandatory in all files.
837
+ #
838
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/sigils/strict_sigil.rb:10
839
+ class RuboCop::Cop::Sorbet::StrictSigil < ::RuboCop::Cop::Sorbet::HasSigil
840
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/sigils/strict_sigil.rb:11
841
+ def minimum_strictness; end
842
+ end
843
+
844
+ # This cop makes the Sorbet `strong` sigil mandatory in all files.
845
+ #
846
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/sigils/strong_sigil.rb:10
847
+ class RuboCop::Cop::Sorbet::StrongSigil < ::RuboCop::Cop::Sorbet::HasSigil
848
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/sigils/strong_sigil.rb:11
849
+ def minimum_strictness; end
850
+ end
851
+
852
+ # This cop makes the Sorbet `true` sigil mandatory in all files.
853
+ #
854
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/sigils/true_sigil.rb:10
855
+ class RuboCop::Cop::Sorbet::TrueSigil < ::RuboCop::Cop::Sorbet::HasSigil
856
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/sigils/true_sigil.rb:11
857
+ def minimum_strictness; end
858
+ end
859
+
860
+ # This cop ensures all constants used as `T.type_alias` are using CamelCase.
861
+ #
862
+ # @example
863
+ #
864
+ # # bad
865
+ # FOO_OR_BAR = T.type_alias { T.any(Foo, Bar) }
866
+ #
867
+ # # good
868
+ # FooOrBar = T.type_alias { T.any(Foo, Bar) }
869
+ #
870
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/type_alias_name.rb:17
871
+ class RuboCop::Cop::Sorbet::TypeAliasName < ::RuboCop::Cop::Cop
872
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/type_alias_name.rb:20
873
+ def casgn_type_alias?(param0 = T.unsafe(nil)); end
874
+
875
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/type_alias_name.rb:32
876
+ def on_casgn(node); end
877
+ end
878
+
879
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/type_alias_name.rb:18
880
+ RuboCop::Cop::Sorbet::TypeAliasName::MSG = T.let(T.unsafe(nil), String)
881
+
882
+ # This cop checks that every Ruby file contains a valid Sorbet sigil.
883
+ # Adapted from: https://gist.github.com/clarkdave/85aca4e16f33fd52aceb6a0a29936e52
884
+ #
885
+ # Options:
886
+ #
887
+ # * `RequireSigilOnAllFiles`: make offense if the Sorbet typed is not found in the file (default: false)
888
+ # * `SuggestedStrictness`: Sorbet strictness level suggested in offense messages (default: 'false')
889
+ # * `MinimumStrictness`: If set, make offense if the strictness level in the file is below this one
890
+ #
891
+ # If a `MinimumStrictness` level is specified, it will be used in offense messages and autocorrect.
892
+ #
893
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:18
894
+ class RuboCop::Cop::Sorbet::ValidSigil < ::RuboCop::Cop::Cop
895
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:33
896
+ def autocorrect(_node); end
897
+
898
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:21
899
+ def investigate(processed_source); end
900
+
901
+ protected
902
+
903
+ # checks
904
+ #
905
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:68
906
+ def check_sigil_present(sigil); end
907
+
908
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:125
909
+ def check_strictness_level(sigil, strictness); end
910
+
911
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:103
912
+ def check_strictness_not_empty(sigil, strictness); end
913
+
914
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:114
915
+ def check_strictness_valid(sigil, strictness); end
916
+
917
+ # extraction
918
+ #
919
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:56
920
+ def extract_sigil(processed_source); end
921
+
922
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:62
923
+ def extract_strictness(sigil); end
924
+
925
+ # Default is `nil`
926
+ #
927
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:155
928
+ def minimum_strictness; end
929
+
930
+ # Default is `false`
931
+ #
932
+ # @return [Boolean]
933
+ #
934
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:144
935
+ def require_sigil_on_all_files?; end
936
+
937
+ # Default is `'false'`
938
+ #
939
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:149
940
+ def suggested_strictness; end
941
+
942
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:84
943
+ def suggested_strictness_level(minimum_strictness, suggested_strictness); end
944
+ end
945
+
946
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:52
947
+ RuboCop::Cop::Sorbet::ValidSigil::SIGIL_REGEX = T.let(T.unsafe(nil), Regexp)
948
+
949
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:51
950
+ RuboCop::Cop::Sorbet::ValidSigil::STRICTNESS_LEVELS = T.let(T.unsafe(nil), Array)
951
+
952
+ class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base
953
+ include ::RuboCop::Cop::Sorbet::MutableConstantSorbetAwareBehaviour
954
+ end
955
+
956
+ # source://rubocop-1.34.1/lib/rubocop/ast_aliases.rb:5
957
+ RuboCop::NodePattern = RuboCop::AST::NodePattern
958
+
959
+ # source://rubocop-1.34.1/lib/rubocop/ast_aliases.rb:6
960
+ RuboCop::ProcessedSource = RuboCop::AST::ProcessedSource
961
+
962
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/sorbet/version.rb:3
963
+ module RuboCop::Sorbet; end
964
+
965
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/sorbet.rb:11
966
+ RuboCop::Sorbet::CONFIG = T.let(T.unsafe(nil), Hash)
967
+
968
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/sorbet.rb:10
969
+ RuboCop::Sorbet::CONFIG_DEFAULT = T.let(T.unsafe(nil), Pathname)
970
+
971
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/sorbet.rb:7
972
+ class RuboCop::Sorbet::Error < ::StandardError; end
973
+
974
+ # Because RuboCop doesn't yet support plugins, we have to monkey patch in a
975
+ # bit of our configuration.
976
+ #
977
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/sorbet/inject.rb:9
978
+ module RuboCop::Sorbet::Inject
979
+ class << self
980
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/sorbet/inject.rb:10
981
+ def defaults!; end
982
+ end
983
+ end
984
+
985
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/sorbet.rb:9
986
+ RuboCop::Sorbet::PROJECT_ROOT = T.let(T.unsafe(nil), Pathname)
987
+
988
+ # source://rubocop-sorbet-0.6.11/lib/rubocop/sorbet/version.rb:4
989
+ RuboCop::Sorbet::VERSION = T.let(T.unsafe(nil), String)
990
+
991
+ # source://rubocop-1.34.1/lib/rubocop/ast_aliases.rb:7
992
+ RuboCop::Token = RuboCop::AST::Token