rigortype 0.2.9 → 0.3.1

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 (222) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/data/builtins/ruby_core/array.yml +416 -392
  4. data/data/builtins/ruby_core/file.yml +42 -42
  5. data/data/builtins/ruby_core/hash.yml +302 -302
  6. data/data/builtins/ruby_core/io.yml +191 -191
  7. data/data/builtins/ruby_core/numeric.yml +321 -366
  8. data/data/builtins/ruby_core/proc.yml +124 -124
  9. data/data/builtins/ruby_core/range.yml +21 -21
  10. data/data/builtins/ruby_core/rational.yml +39 -39
  11. data/data/builtins/ruby_core/re.yml +65 -65
  12. data/data/builtins/ruby_core/set.yml +106 -106
  13. data/data/builtins/ruby_core/struct.yml +14 -14
  14. data/data/core_overlay/string_scanner.rbs +6 -5
  15. data/docs/handbook/01-getting-started.md +22 -34
  16. data/docs/handbook/03-narrowing.md +2 -1
  17. data/docs/handbook/04-tuples-and-shapes.md +7 -3
  18. data/docs/handbook/06-classes.md +19 -10
  19. data/docs/handbook/07-rbs-and-extended.md +76 -101
  20. data/docs/handbook/08-understanding-errors.md +114 -246
  21. data/docs/handbook/09-plugins.md +54 -144
  22. data/docs/handbook/11-sig-gen.md +11 -1
  23. data/docs/handbook/README.md +5 -3
  24. data/docs/handbook/appendix-liskov.md +4 -2
  25. data/docs/handbook/appendix-mypy.md +4 -3
  26. data/docs/handbook/appendix-phpstan.md +14 -7
  27. data/docs/handbook/appendix-steep.md +4 -2
  28. data/docs/handbook/appendix-type-theory.md +3 -1
  29. data/docs/install.md +14 -6
  30. data/docs/manual/01-installation.md +98 -4
  31. data/docs/manual/02-cli-reference.md +81 -12
  32. data/docs/manual/03-configuration.md +34 -2
  33. data/docs/manual/04-diagnostics.md +59 -4
  34. data/docs/manual/06-baseline.md +35 -1
  35. data/docs/manual/07-plugins.md +4 -4
  36. data/docs/manual/08-skills.md +6 -1
  37. data/docs/manual/09-editor-integration.md +7 -6
  38. data/docs/manual/11-ci.md +51 -0
  39. data/docs/manual/12-caching.md +65 -0
  40. data/docs/manual/plugins/rigor-actioncable.md +32 -0
  41. data/docs/manual/plugins/rigor-devise.md +4 -2
  42. data/lib/rigor/analysis/check_rules/always_truthy_condition_collector.rb +9 -1
  43. data/lib/rigor/analysis/check_rules/dead_assignment_collector.rb +5 -3
  44. data/lib/rigor/analysis/check_rules/duplicate_hash_key_collector.rb +128 -0
  45. data/lib/rigor/analysis/check_rules/inferred_param_guard.rb +60 -0
  46. data/lib/rigor/analysis/check_rules/ivar_write_collector.rb +3 -2
  47. data/lib/rigor/analysis/check_rules/return_in_ensure_collector.rb +117 -0
  48. data/lib/rigor/analysis/check_rules/rule_ids.rb +125 -0
  49. data/lib/rigor/analysis/check_rules/rule_walk.rb +2 -1
  50. data/lib/rigor/analysis/check_rules/self_closedness_scanner.rb +2 -1
  51. data/lib/rigor/analysis/check_rules/shadowed_rescue_collector.rb +283 -0
  52. data/lib/rigor/analysis/check_rules/unreachable_clause_collector.rb +10 -1
  53. data/lib/rigor/analysis/check_rules/void_value_use_collector.rb +112 -0
  54. data/lib/rigor/analysis/check_rules.rb +581 -98
  55. data/lib/rigor/analysis/dependency_recorder.rb +93 -9
  56. data/lib/rigor/analysis/dependency_source_inference/walker.rb +2 -1
  57. data/lib/rigor/analysis/incremental_session.rb +456 -51
  58. data/lib/rigor/analysis/path_expansion.rb +42 -0
  59. data/lib/rigor/analysis/plugin_fact_fingerprint.rb +188 -0
  60. data/lib/rigor/analysis/rule_catalog.rb +226 -1
  61. data/lib/rigor/analysis/run_cache_key.rb +78 -0
  62. data/lib/rigor/analysis/run_cache_probe.rb +72 -0
  63. data/lib/rigor/analysis/runner/diagnostic_aggregator.rb +181 -28
  64. data/lib/rigor/analysis/runner/pool_coordinator.rb +77 -15
  65. data/lib/rigor/analysis/runner/project_pre_passes.rb +95 -49
  66. data/lib/rigor/analysis/runner/run_snapshots.rb +9 -2
  67. data/lib/rigor/analysis/runner.rb +344 -68
  68. data/lib/rigor/analysis/severity_stamp.rb +43 -0
  69. data/lib/rigor/analysis/worker_session.rb +30 -2
  70. data/lib/rigor/bleeding_edge.rb +37 -8
  71. data/lib/rigor/builtins/regex_refinement.rb +36 -1
  72. data/lib/rigor/cache/descriptor.rb +88 -28
  73. data/lib/rigor/cache/file_digest.rb +158 -0
  74. data/lib/rigor/cache/incremental_snapshot.rb +41 -5
  75. data/lib/rigor/cache/rbs_cache_producer.rb +11 -1
  76. data/lib/rigor/cache/rbs_descriptor.rb +56 -10
  77. data/lib/rigor/cache/rbs_environment_marshal_patch.rb +38 -0
  78. data/lib/rigor/cache/store.rb +132 -27
  79. data/lib/rigor/ci_detector.rb +90 -0
  80. data/lib/rigor/cli/annotate_command.rb +15 -9
  81. data/lib/rigor/cli/baseline_command.rb +4 -1
  82. data/lib/rigor/cli/check_command.rb +223 -32
  83. data/lib/rigor/cli/check_invocation.rb +84 -0
  84. data/lib/rigor/cli/coverage_command.rb +6 -1
  85. data/lib/rigor/cli/docs_command.rb +0 -30
  86. data/lib/rigor/cli/doctor_command.rb +169 -31
  87. data/lib/rigor/cli/lsp_command.rb +5 -0
  88. data/lib/rigor/cli/mcp_command.rb +5 -0
  89. data/lib/rigor/cli/plugins_command.rb +36 -6
  90. data/lib/rigor/cli/plugins_renderer.rb +44 -12
  91. data/lib/rigor/cli/probe_environment.rb +85 -0
  92. data/lib/rigor/cli/sig_gen_command.rb +36 -9
  93. data/lib/rigor/cli/skill_command.rb +22 -33
  94. data/lib/rigor/cli/skill_deep_probe.rb +172 -0
  95. data/lib/rigor/cli/skill_describe.rb +75 -9
  96. data/lib/rigor/cli/trace_command.rb +5 -6
  97. data/lib/rigor/cli/type_of_command.rb +9 -8
  98. data/lib/rigor/cli/type_scan_command.rb +8 -8
  99. data/lib/rigor/cli.rb +15 -4
  100. data/lib/rigor/config_audit.rb +48 -2
  101. data/lib/rigor/configuration/severity_profile.rb +31 -0
  102. data/lib/rigor/configuration.rb +156 -8
  103. data/lib/rigor/environment/default_libraries.rb +36 -0
  104. data/lib/rigor/environment/rbs_loader.rb +164 -5
  105. data/lib/rigor/environment.rb +29 -28
  106. data/lib/rigor/inference/budget_trace.rb +77 -2
  107. data/lib/rigor/inference/closure_escape_analyzer.rb +14 -1
  108. data/lib/rigor/inference/def_handle.rb +23 -0
  109. data/lib/rigor/inference/def_node_resolver.rb +90 -0
  110. data/lib/rigor/inference/def_return_typer.rb +2 -1
  111. data/lib/rigor/inference/expression_typer.rb +361 -113
  112. data/lib/rigor/inference/method_dispatcher/data_folding.rb +30 -5
  113. data/lib/rigor/inference/method_dispatcher/kernel_dispatch.rb +200 -0
  114. data/lib/rigor/inference/method_dispatcher/literal_string_folding.rb +22 -16
  115. data/lib/rigor/inference/method_dispatcher/member_shape_projection.rb +33 -0
  116. data/lib/rigor/inference/method_dispatcher/overload_selector.rb +17 -1
  117. data/lib/rigor/inference/method_dispatcher/rbs_dispatch.rb +42 -9
  118. data/lib/rigor/inference/method_dispatcher/receiver_affinity.rb +5 -0
  119. data/lib/rigor/inference/method_dispatcher/shape_dispatch.rb +28 -35
  120. data/lib/rigor/inference/method_dispatcher/struct_folding.rb +40 -8
  121. data/lib/rigor/inference/method_dispatcher.rb +57 -1
  122. data/lib/rigor/inference/mutation_widening.rb +42 -8
  123. data/lib/rigor/inference/narrowing.rb +127 -17
  124. data/lib/rigor/inference/parameter_inference_collector.rb +15 -0
  125. data/lib/rigor/inference/project_patched_scanner.rb +2 -1
  126. data/lib/rigor/inference/rbs_type_translator.rb +8 -1
  127. data/lib/rigor/inference/scope_indexer.rb +451 -36
  128. data/lib/rigor/inference/statement_evaluator.rb +64 -15
  129. data/lib/rigor/inference/struct_fold_safety.rb +48 -11
  130. data/lib/rigor/inference/synthetic_method_scanner.rb +15 -14
  131. data/lib/rigor/inference/void_origin.rb +25 -0
  132. data/lib/rigor/inference/void_tail_summary.rb +220 -0
  133. data/lib/rigor/language_server/buffer_resolution.rb +6 -3
  134. data/lib/rigor/language_server/buffer_table.rb +46 -6
  135. data/lib/rigor/language_server/completion_provider.rb +2 -1
  136. data/lib/rigor/language_server/diagnostic_publisher.rb +4 -0
  137. data/lib/rigor/language_server/document_symbol_provider.rb +2 -1
  138. data/lib/rigor/language_server/folding_range_provider.rb +2 -1
  139. data/lib/rigor/language_server/incremental_sync.rb +159 -0
  140. data/lib/rigor/language_server/selection_range_provider.rb +2 -1
  141. data/lib/rigor/language_server/server.rb +19 -9
  142. data/lib/rigor/language_server/signature_help_provider.rb +2 -1
  143. data/lib/rigor/language_server.rb +1 -0
  144. data/lib/rigor/plugin/base.rb +38 -24
  145. data/lib/rigor/plugin/inflector.rb +12 -3
  146. data/lib/rigor/plugin/io_boundary.rb +5 -1
  147. data/lib/rigor/plugin/isolation.rb +81 -11
  148. data/lib/rigor/plugin/load_error.rb +10 -1
  149. data/lib/rigor/plugin/loader.rb +96 -14
  150. data/lib/rigor/plugin/node_rule_walk.rb +5 -3
  151. data/lib/rigor/plugin/registry.rb +32 -23
  152. data/lib/rigor/plugin.rb +26 -0
  153. data/lib/rigor/protection/mutator.rb +3 -2
  154. data/lib/rigor/reflection.rb +64 -0
  155. data/lib/rigor/runtime/jit.rb +128 -0
  156. data/lib/rigor/scope/discovery_index.rb +12 -2
  157. data/lib/rigor/scope.rb +122 -28
  158. data/lib/rigor/sig_gen/classification.rb +5 -1
  159. data/lib/rigor/sig_gen/generator.rb +38 -6
  160. data/lib/rigor/sig_gen/observation_collector.rb +4 -3
  161. data/lib/rigor/sig_gen/rbs_validity.rb +44 -0
  162. data/lib/rigor/sig_gen/renderer.rb +10 -0
  163. data/lib/rigor/sig_gen/write_result.rb +9 -4
  164. data/lib/rigor/sig_gen/writer.rb +207 -49
  165. data/lib/rigor/source/node_children.rb +116 -0
  166. data/lib/rigor/source/node_locator.rb +3 -1
  167. data/lib/rigor/source/node_walker.rb +4 -2
  168. data/lib/rigor/source.rb +1 -0
  169. data/lib/rigor/type/difference.rb +28 -24
  170. data/lib/rigor/type/hash_shape.rb +34 -10
  171. data/lib/rigor/version.rb +1 -1
  172. data/lib/rigortype.rb +24 -0
  173. data/plugins/rigor-actioncable/lib/rigor/plugin/actioncable/channel_discoverer.rb +4 -2
  174. data/plugins/rigor-actioncable/lib/rigor/plugin/actioncable.rb +51 -1
  175. data/plugins/rigor-actionmailer/lib/rigor/plugin/actionmailer/mailer_discoverer.rb +6 -4
  176. data/plugins/rigor-actionpack/lib/rigor/plugin/actionpack/controller_discoverer.rb +5 -3
  177. data/plugins/rigor-activejob/lib/rigor/plugin/activejob/job_discoverer.rb +4 -2
  178. data/plugins/rigor-activerecord/lib/rigor/plugin/activerecord/analyzer.rb +3 -1
  179. data/plugins/rigor-activerecord/lib/rigor/plugin/activerecord/model_discoverer.rb +4 -2
  180. data/plugins/rigor-activerecord/lib/rigor/plugin/activerecord/schema_parser.rb +4 -2
  181. data/plugins/rigor-activestorage/lib/rigor/plugin/activestorage/analyzer.rb +3 -1
  182. data/plugins/rigor-activestorage/lib/rigor/plugin/activestorage/attachment_discoverer.rb +4 -2
  183. data/plugins/rigor-dry-types/lib/rigor/plugin/dry_types.rb +38 -6
  184. data/plugins/rigor-factorybot/lib/rigor/plugin/factorybot/factory_discoverer.rb +3 -1
  185. data/plugins/rigor-hanami/lib/rigor/plugin/hanami/action_checker.rb +3 -1
  186. data/plugins/rigor-mangrove/lib/rigor/plugin/mangrove.rb +10 -0
  187. data/plugins/rigor-minitest/lib/rigor/plugin/minitest.rb +11 -0
  188. data/plugins/rigor-pundit/lib/rigor/plugin/pundit/policy_discoverer.rb +3 -1
  189. data/plugins/rigor-rails/lib/rigor-rails.rb +11 -12
  190. data/plugins/rigor-rails-routes/lib/rigor/plugin/rails_routes/grape_api_discoverer.rb +3 -1
  191. data/plugins/rigor-rails-routes/lib/rigor/plugin/rails_routes/helper_discoverer.rb +3 -1
  192. data/plugins/rigor-rails-routes/lib/rigor/plugin/rails_routes/routes_parser.rb +7 -5
  193. data/plugins/rigor-rbs-inline/lib/rigor/plugin/rbs_inline.rb +83 -9
  194. data/plugins/rigor-rbs-inline/lib/rigor-rbs-inline.rb +9 -5
  195. data/plugins/rigor-rspec/lib/rigor/plugin/rspec/let_scope_index.rb +3 -1
  196. data/plugins/rigor-rspec/lib/rigor/plugin/rspec/scope_walker.rb +3 -1
  197. data/plugins/rigor-rspec/lib/rigor/plugin/rspec.rb +11 -0
  198. data/plugins/rigor-rspec-rails/lib/rigor/plugin/rspec_rails/http_status_codes.rb +4 -1
  199. data/plugins/rigor-sidekiq/lib/rigor/plugin/sidekiq/worker_discoverer.rb +4 -2
  200. data/plugins/rigor-sorbet/lib/rigor/plugin/sorbet/catalog_walker.rb +3 -1
  201. data/plugins/rigor-sorbet/lib/rigor/plugin/sorbet.rb +74 -14
  202. data/sig/prism_node_children.rbs +9 -0
  203. data/sig/rigor/cache.rbs +6 -0
  204. data/sig/rigor/inference/void_origin.rbs +18 -0
  205. data/sig/rigor/inference.rbs +7 -0
  206. data/sig/rigor/plugin/base.rbs +6 -6
  207. data/sig/rigor/reflection.rbs +1 -0
  208. data/sig/rigor/scope.rbs +12 -1
  209. data/skills/rigor-ci-setup/SKILL.md +10 -0
  210. data/skills/rigor-editor-setup/SKILL.md +11 -0
  211. data/skills/rigor-next-steps/SKILL.md +23 -2
  212. data/skills/rigor-plugin-author/SKILL.md +3 -3
  213. data/skills/rigor-plugin-author/references/02-walker-and-types.md +2 -2
  214. data/skills/rigor-plugin-review/SKILL.md +2 -2
  215. data/skills/rigor-plugin-review/references/01-best-practices-checklist.md +5 -4
  216. data/skills/rigor-project-init/SKILL.md +29 -3
  217. data/skills/rigor-project-init/references/01-detect.md +1 -1
  218. data/skills/rigor-project-init/references/02-configure.md +39 -5
  219. data/skills/rigor-project-init/references/03-baseline-and-bugs.md +20 -0
  220. data/skills/rigor-project-init/references/05-jit-performance.md +125 -0
  221. metadata +48 -26
  222. data/lib/rigor/cli/ci_detector.rb +0 -89
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rigortype
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.9
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rigor contributors
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 1980-01-01 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: language_server-protocol
@@ -129,26 +129,6 @@ dependencies:
129
129
  - - "<"
130
130
  - !ruby/object:Gem::Version
131
131
  version: '1.0'
132
- - !ruby/object:Gem::Dependency
133
- name: parallel_tests
134
- requirement: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - ">="
137
- - !ruby/object:Gem::Version
138
- version: '4.0'
139
- - - "<"
140
- - !ruby/object:Gem::Version
141
- version: '6.0'
142
- type: :development
143
- prerelease: false
144
- version_requirements: !ruby/object:Gem::Requirement
145
- requirements:
146
- - - ">="
147
- - !ruby/object:Gem::Version
148
- version: '4.0'
149
- - - "<"
150
- - !ruby/object:Gem::Version
151
- version: '6.0'
152
132
  - !ruby/object:Gem::Dependency
153
133
  name: rake
154
134
  requirement: !ruby/object:Gem::Requirement
@@ -269,8 +249,13 @@ dependencies:
269
249
  - - "<"
270
250
  - !ruby/object:Gem::Version
271
251
  version: '4.0'
272
- description: Rigor is a CLI-first static analyzer for Ruby applications that prioritizes
273
- type inference, clean application code, and zero runtime dependencies.
252
+ description: 'Rigor is a CLI-first static analyzer for Ruby applications that prioritizes
253
+ type inference, clean application code, and zero runtime dependencies. Rigor is
254
+ a standalone tool, not a library: install it independently rather than adding it
255
+ to your application''s Gemfile. It runs on Ruby 4.0 while your project keeps its
256
+ own Ruby, and it reads your project as data rather than loading it, so a Gemfile
257
+ entry only constrains your application''s Ruby and dependency resolution. Installation
258
+ channels (mise, asdf, gem install, container, Nix): https://github.com/rigortype/rigor/blob/master/docs/install.md'
274
259
  email:
275
260
  - maintainers@example.invalid
276
261
  executables:
@@ -410,11 +395,17 @@ files:
410
395
  - lib/rigor/analysis/check_rules.rb
411
396
  - lib/rigor/analysis/check_rules/always_truthy_condition_collector.rb
412
397
  - lib/rigor/analysis/check_rules/dead_assignment_collector.rb
398
+ - lib/rigor/analysis/check_rules/duplicate_hash_key_collector.rb
399
+ - lib/rigor/analysis/check_rules/inferred_param_guard.rb
413
400
  - lib/rigor/analysis/check_rules/ivar_write_collector.rb
414
401
  - lib/rigor/analysis/check_rules/main_pass_collector.rb
402
+ - lib/rigor/analysis/check_rules/return_in_ensure_collector.rb
403
+ - lib/rigor/analysis/check_rules/rule_ids.rb
415
404
  - lib/rigor/analysis/check_rules/rule_walk.rb
416
405
  - lib/rigor/analysis/check_rules/self_closedness_scanner.rb
406
+ - lib/rigor/analysis/check_rules/shadowed_rescue_collector.rb
417
407
  - lib/rigor/analysis/check_rules/unreachable_clause_collector.rb
408
+ - lib/rigor/analysis/check_rules/void_value_use_collector.rb
418
409
  - lib/rigor/analysis/dependency_recorder.rb
419
410
  - lib/rigor/analysis/dependency_source_inference.rb
420
411
  - lib/rigor/analysis/dependency_source_inference/boundary_cross_reporter.rb
@@ -428,9 +419,13 @@ files:
428
419
  - lib/rigor/analysis/fact_store.rb
429
420
  - lib/rigor/analysis/incremental.rb
430
421
  - lib/rigor/analysis/incremental_session.rb
422
+ - lib/rigor/analysis/path_expansion.rb
423
+ - lib/rigor/analysis/plugin_fact_fingerprint.rb
431
424
  - lib/rigor/analysis/project_scan.rb
432
425
  - lib/rigor/analysis/result.rb
433
426
  - lib/rigor/analysis/rule_catalog.rb
427
+ - lib/rigor/analysis/run_cache_key.rb
428
+ - lib/rigor/analysis/run_cache_probe.rb
434
429
  - lib/rigor/analysis/run_stats.rb
435
430
  - lib/rigor/analysis/runner.rb
436
431
  - lib/rigor/analysis/runner/diagnostic_aggregator.rb
@@ -438,6 +433,7 @@ files:
438
433
  - lib/rigor/analysis/runner/project_pre_passes.rb
439
434
  - lib/rigor/analysis/runner/run_snapshots.rb
440
435
  - lib/rigor/analysis/self_call_resolution_recorder.rb
436
+ - lib/rigor/analysis/severity_stamp.rb
441
437
  - lib/rigor/analysis/worker_session.rb
442
438
  - lib/rigor/ast.rb
443
439
  - lib/rigor/ast/type_node.rb
@@ -448,6 +444,7 @@ files:
448
444
  - lib/rigor/builtins/regex_refinement.rb
449
445
  - lib/rigor/builtins/static_return_refinements.rb
450
446
  - lib/rigor/cache/descriptor.rb
447
+ - lib/rigor/cache/file_digest.rb
451
448
  - lib/rigor/cache/incremental_snapshot.rb
452
449
  - lib/rigor/cache/rbs_cache_producer.rb
453
450
  - lib/rigor/cache/rbs_class_ancestor_table.rb
@@ -458,12 +455,13 @@ files:
458
455
  - lib/rigor/cache/rbs_environment_marshal_patch.rb
459
456
  - lib/rigor/cache/rbs_known_class_names.rb
460
457
  - lib/rigor/cache/store.rb
458
+ - lib/rigor/ci_detector.rb
461
459
  - lib/rigor/cli.rb
462
460
  - lib/rigor/cli/annotate_command.rb
463
461
  - lib/rigor/cli/baseline_command.rb
464
462
  - lib/rigor/cli/check_command.rb
463
+ - lib/rigor/cli/check_invocation.rb
465
464
  - lib/rigor/cli/check_runner_factory.rb
466
- - lib/rigor/cli/ci_detector.rb
467
465
  - lib/rigor/cli/command.rb
468
466
  - lib/rigor/cli/coverage_command.rb
469
467
  - lib/rigor/cli/coverage_mutation.rb
@@ -486,6 +484,7 @@ files:
486
484
  - lib/rigor/cli/plugins_command.rb
487
485
  - lib/rigor/cli/plugins_renderer.rb
488
486
  - lib/rigor/cli/prism_colorizer.rb
487
+ - lib/rigor/cli/probe_environment.rb
489
488
  - lib/rigor/cli/protection_fork_scan.rb
490
489
  - lib/rigor/cli/protection_renderer.rb
491
490
  - lib/rigor/cli/protection_report.rb
@@ -493,6 +492,7 @@ files:
493
492
  - lib/rigor/cli/show_bleedingedge_command.rb
494
493
  - lib/rigor/cli/sig_gen_command.rb
495
494
  - lib/rigor/cli/skill_command.rb
495
+ - lib/rigor/cli/skill_deep_probe.rb
496
496
  - lib/rigor/cli/skill_describe.rb
497
497
  - lib/rigor/cli/trace_command.rb
498
498
  - lib/rigor/cli/trace_renderer.rb
@@ -512,6 +512,7 @@ files:
512
512
  - lib/rigor/environment/bundle_sig_discovery.rb
513
513
  - lib/rigor/environment/class_registry.rb
514
514
  - lib/rigor/environment/constant_type_cache_holder.rb
515
+ - lib/rigor/environment/default_libraries.rb
515
516
  - lib/rigor/environment/hkt_registry_holder.rb
516
517
  - lib/rigor/environment/lockfile_resolver.rb
517
518
  - lib/rigor/environment/missing_gem_constant_index.rb
@@ -553,6 +554,8 @@ files:
553
554
  - lib/rigor/inference/builtins/time_catalog.rb
554
555
  - lib/rigor/inference/closure_escape_analyzer.rb
555
556
  - lib/rigor/inference/coverage_scanner.rb
557
+ - lib/rigor/inference/def_handle.rb
558
+ - lib/rigor/inference/def_node_resolver.rb
556
559
  - lib/rigor/inference/def_return_typer.rb
557
560
  - lib/rigor/inference/dynamic_origin.rb
558
561
  - lib/rigor/inference/expression_typer.rb
@@ -609,6 +612,8 @@ files:
609
612
  - lib/rigor/inference/synthetic_method.rb
610
613
  - lib/rigor/inference/synthetic_method_index.rb
611
614
  - lib/rigor/inference/synthetic_method_scanner.rb
615
+ - lib/rigor/inference/void_origin.rb
616
+ - lib/rigor/inference/void_tail_summary.rb
612
617
  - lib/rigor/language_server.rb
613
618
  - lib/rigor/language_server/buffer_resolution.rb
614
619
  - lib/rigor/language_server/buffer_table.rb
@@ -619,6 +624,7 @@ files:
619
624
  - lib/rigor/language_server/folding_range_provider.rb
620
625
  - lib/rigor/language_server/hover_provider.rb
621
626
  - lib/rigor/language_server/hover_renderer.rb
627
+ - lib/rigor/language_server/incremental_sync.rb
622
628
  - lib/rigor/language_server/loop.rb
623
629
  - lib/rigor/language_server/project_context.rb
624
630
  - lib/rigor/language_server/selection_range_provider.rb
@@ -664,6 +670,7 @@ files:
664
670
  - lib/rigor/rbs_extended/hkt_directives.rb
665
671
  - lib/rigor/rbs_extended/reporter.rb
666
672
  - lib/rigor/reflection.rb
673
+ - lib/rigor/runtime/jit.rb
667
674
  - lib/rigor/scope.rb
668
675
  - lib/rigor/scope/discovery_index.rb
669
676
  - lib/rigor/sig_gen.rb
@@ -674,6 +681,7 @@ files:
674
681
  - lib/rigor/sig_gen/observation_collector.rb
675
682
  - lib/rigor/sig_gen/observed_call.rb
676
683
  - lib/rigor/sig_gen/path_mapper.rb
684
+ - lib/rigor/sig_gen/rbs_validity.rb
677
685
  - lib/rigor/sig_gen/renderer.rb
678
686
  - lib/rigor/sig_gen/type_elaborator.rb
679
687
  - lib/rigor/sig_gen/write_result.rb
@@ -682,6 +690,7 @@ files:
682
690
  - lib/rigor/source.rb
683
691
  - lib/rigor/source/constant_path.rb
684
692
  - lib/rigor/source/literals.rb
693
+ - lib/rigor/source/node_children.rb
685
694
  - lib/rigor/source/node_locator.rb
686
695
  - lib/rigor/source/node_walker.rb
687
696
  - lib/rigor/testing.rb
@@ -725,6 +734,7 @@ files:
725
734
  - lib/rigor/type_node/union.rb
726
735
  - lib/rigor/value_semantics.rb
727
736
  - lib/rigor/version.rb
737
+ - lib/rigortype.rb
728
738
  - plugins/rigor-actioncable/lib/rigor-actioncable.rb
729
739
  - plugins/rigor-actioncable/lib/rigor/plugin/actioncable.rb
730
740
  - plugins/rigor-actioncable/lib/rigor/plugin/actioncable/analyzer.rb
@@ -850,6 +860,7 @@ files:
850
860
  - plugins/rigor-statesman/lib/rigor/plugin/statesman.rb
851
861
  - plugins/rigor-typescript-utility-types/lib/rigor-typescript-utility-types.rb
852
862
  - plugins/rigor-typescript-utility-types/lib/rigor/plugin/typescript_utility_types.rb
863
+ - sig/prism_node_children.rbs
853
864
  - sig/rigor.rbs
854
865
  - sig/rigor/analysis/baseline.rbs
855
866
  - sig/rigor/analysis/check_rules/always_truthy_condition_collector.rbs
@@ -868,6 +879,7 @@ files:
868
879
  - sig/rigor/inference/builtins.rbs
869
880
  - sig/rigor/inference/builtins/method_catalog.rbs
870
881
  - sig/rigor/inference/builtins/numeric_catalog.rbs
882
+ - sig/rigor/inference/void_origin.rbs
871
883
  - sig/rigor/plugin.rbs
872
884
  - sig/rigor/plugin/access_denied_error.rbs
873
885
  - sig/rigor/plugin/base.rbs
@@ -911,6 +923,7 @@ files:
911
923
  - skills/rigor-project-init/references/02-configure.md
912
924
  - skills/rigor-project-init/references/03-baseline-and-bugs.md
913
925
  - skills/rigor-project-init/references/04-sig-uplift.md
926
+ - skills/rigor-project-init/references/05-jit-performance.md
914
927
  - skills/rigor-protection-uplift/SKILL.md
915
928
  - skills/rigor-rbs-setup/SKILL.md
916
929
  - skills/rigor-upgrade/SKILL.md
@@ -922,6 +935,15 @@ metadata:
922
935
  source_code_uri: https://github.com/rigortype/rigor
923
936
  documentation_uri: https://github.com/rigortype/rigor/tree/master/docs
924
937
  rubygems_mfa_required: 'true'
938
+ post_install_message: |
939
+ Rigor installs as a standalone CLI, not a project dependency. Run `rigor check app lib` from your
940
+ project root — no `bundle exec`.
941
+
942
+ If this came from `bundle add rigortype` or a Gemfile entry, remove it: Rigor runs on its own Ruby
943
+ and analyses your project from the outside, so in a Gemfile it constrains your application's Ruby
944
+ and dependency resolution without giving you anything. Per-project version pinning without that
945
+ cost, plus every other channel, is documented in
946
+ https://github.com/rigortype/rigor/blob/master/docs/install.md
925
947
  rdoc_options: []
926
948
  require_paths:
927
949
  - lib
@@ -969,7 +991,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
969
991
  - !ruby/object:Gem::Version
970
992
  version: '0'
971
993
  requirements: []
972
- rubygems_version: 3.7.2
994
+ rubygems_version: 4.0.10
973
995
  specification_version: 4
974
996
  summary: Inference-first static analysis for Ruby.
975
997
  test_files: []
@@ -1,89 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Rigor
4
- class CLI
5
- # Runtime CI-environment detection (ADR-51 WD7), modelled on `OndraM/ci-detector` (the library PHPStan uses). Reads
6
- # the well-known environment variables a CI provider sets and returns the matching {Platform}, classifying it into a
7
- # **tier** that decides how `rigor check` surfaces diagnostics there:
8
- #
9
- # :native_stdout — Rigor has a native format that renders purely from
10
- # stdout, so it is auto-emitted on top of the human
11
- # output (GitHub Actions → `github`, TeamCity →
12
- # `teamcity`). These are the first-class platforms.
13
- # :native_artifact — Rigor has a native format but it needs a CI-wired
14
- # report artifact, not stdout (GitLab CI → `gitlab`).
15
- # First-class, but Rigor only *hints* the format.
16
- # :reviewdog — no native Rigor format; second-class, routed through
17
- # reviewdog (`checkstyle`/`sarif`) or `junit`. Hint
18
- # only.
19
- #
20
- # Detection is a pure function of the environment hash, so it is fully testable; the CLI passes `ENV`.
21
- # `RIGOR_CI_DETECT=0` (or `false`/`no`) disables it globally — the seam the spec suite uses for determinism.
22
- module CiDetector
23
- Platform = Struct.new(:id, :name, :format, :tier, keyword_init: true) do
24
- def native_stdout? = tier == :native_stdout
25
- def native_artifact? = tier == :native_artifact
26
- def reviewdog? = tier == :reviewdog
27
- end
28
-
29
- # The detection table, ordered most-specific first so the generic `CI=true` catch-all is last (a provider that
30
- # also sets `CI` is still recognised by its own variable). `match` is `:truthy` (value in 1/true/yes/on),
31
- # `:present` (variable set non-empty), or `:equals`.
32
- PROVIDERS = [
33
- { id: "github-actions", name: "GitHub Actions", format: "github", tier: :native_stdout,
34
- var: "GITHUB_ACTIONS", match: :truthy },
35
- { id: "gitlab", name: "GitLab CI", format: "gitlab", tier: :native_artifact,
36
- var: "GITLAB_CI", match: :truthy },
37
- { id: "teamcity", name: "TeamCity", format: "teamcity", tier: :native_stdout,
38
- var: "TEAMCITY_VERSION", match: :present },
39
- { id: "circleci", name: "CircleCI", format: nil, tier: :reviewdog,
40
- var: "CIRCLECI", match: :truthy },
41
- { id: "jenkins", name: "Jenkins", format: nil, tier: :reviewdog,
42
- var: "JENKINS_URL", match: :present },
43
- { id: "travis", name: "Travis CI", format: nil, tier: :reviewdog,
44
- var: "TRAVIS", match: :truthy },
45
- { id: "appveyor", name: "AppVeyor", format: nil, tier: :reviewdog,
46
- var: "APPVEYOR", match: :truthy },
47
- { id: "azure-pipelines", name: "Azure Pipelines", format: nil, tier: :reviewdog,
48
- var: "TF_BUILD", match: :present },
49
- { id: "bitbucket", name: "Bitbucket Pipelines", format: nil, tier: :reviewdog,
50
- var: "BITBUCKET_BUILD_NUMBER", match: :present },
51
- { id: "buildkite", name: "Buildkite", format: nil, tier: :reviewdog,
52
- var: "BUILDKITE", match: :truthy },
53
- { id: "drone", name: "Drone CI", format: nil, tier: :reviewdog,
54
- var: "DRONE", match: :truthy },
55
- { id: "semaphore", name: "Semaphore", format: nil, tier: :reviewdog,
56
- var: "SEMAPHORE", match: :truthy },
57
- { id: "codeship", name: "Codeship", format: nil, tier: :reviewdog,
58
- var: "CI_NAME", match: :equals, value: "codeship" },
59
- { id: "ci", name: "CI", format: nil, tier: :reviewdog,
60
- var: "CI", match: :truthy }
61
- ].freeze
62
-
63
- module_function
64
-
65
- # Returns the detected {Platform}, or nil when no CI is recognised or detection is disabled via `RIGOR_CI_DETECT`.
66
- def detect(env = ENV)
67
- return nil if disabled?(env)
68
-
69
- row = PROVIDERS.find { |provider| matches?(env, provider) }
70
- return nil if row.nil?
71
-
72
- Platform.new(id: row[:id], name: row[:name], format: row[:format], tier: row[:tier])
73
- end
74
-
75
- def disabled?(env)
76
- %w[0 false no off].include?(env["RIGOR_CI_DETECT"].to_s.strip.downcase)
77
- end
78
-
79
- def matches?(env, provider)
80
- value = env[provider[:var]].to_s.strip
81
- case provider[:match]
82
- when :truthy then %w[1 true yes on].include?(value.downcase)
83
- when :present then !value.empty?
84
- when :equals then value.downcase == provider[:value]
85
- end
86
- end
87
- end
88
- end
89
- end