rigortype 0.4.4 → 0.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +5 -5
- data/docs/handbook/11-sig-gen.md +100 -18
- data/docs/manual/02-cli-reference.md +85 -16
- data/docs/manual/03-configuration.md +12 -9
- data/docs/manual/04-diagnostics.md +17 -6
- data/docs/manual/05-inspecting-types.md +2 -2
- data/docs/manual/06-baseline.md +1 -1
- data/docs/manual/07-plugins.md +2 -1
- data/docs/manual/08-skills.md +7 -0
- data/docs/manual/10-mcp-server.md +17 -2
- data/docs/manual/12-caching.md +8 -1
- data/docs/manual/18-removing-dead-code.md +18 -7
- data/docs/manual/plugins/rigor-actionmailer.md +30 -0
- data/docs/manual/plugins/rigor-actionpack.md +30 -0
- data/docs/manual/plugins/rigor-devise.md +15 -0
- data/docs/manual/plugins/rigor-rspec.md +102 -1
- data/lib/rigor/analysis/buffer_binding.rb +14 -0
- data/lib/rigor/analysis/check_rules/clause_coverage.rb +134 -0
- data/lib/rigor/analysis/check_rules/inferred_param_guard.rb +30 -9
- data/lib/rigor/analysis/check_rules/ivar_write_collector.rb +142 -15
- data/lib/rigor/analysis/check_rules/lexical_method_sites.rb +115 -7
- data/lib/rigor/analysis/check_rules/rbs_receiver_surface.rb +253 -0
- data/lib/rigor/analysis/check_rules/rebinding_block_callees/dispatch.rb +112 -0
- data/lib/rigor/analysis/check_rules/rebinding_block_callees.rb +394 -0
- data/lib/rigor/analysis/check_rules/ruby_deprecations.rb +7 -0
- data/lib/rigor/analysis/check_rules/rule_ids.rb +3 -1
- data/lib/rigor/analysis/check_rules/source_arity.rb +32 -3
- data/lib/rigor/analysis/check_rules/unreachable_clause_collector.rb +64 -4
- data/lib/rigor/analysis/check_rules.rb +319 -21
- data/lib/rigor/analysis/dependency_recorder.rb +11 -0
- data/lib/rigor/analysis/dependency_source_inference/walker.rb +2 -1
- data/lib/rigor/analysis/edit_replay.rb +67 -0
- data/lib/rigor/analysis/incremental.rb +86 -0
- data/lib/rigor/analysis/incremental_run_slot/write_guard.rb +36 -18
- data/lib/rigor/analysis/incremental_session.rb +336 -46
- data/lib/rigor/analysis/path_expansion.rb +44 -1
- data/lib/rigor/analysis/reachability/graph.rb +90 -13
- data/lib/rigor/analysis/reachability/scan.rb +279 -39
- data/lib/rigor/analysis/require_relative_closure.rb +100 -0
- data/lib/rigor/analysis/rule_catalog.rb +22 -5
- data/lib/rigor/analysis/run_disclosure_credit.rb +80 -0
- data/lib/rigor/analysis/run_disclosure_ledger.rb +155 -0
- data/lib/rigor/analysis/runner/buffer_pool_dispatcher.rb +6 -2
- data/lib/rigor/analysis/runner/diagnostic_aggregator.rb +11 -3
- data/lib/rigor/analysis/runner/pool_coordinator.rb +82 -16
- data/lib/rigor/analysis/runner/project_pre_passes.rb +45 -3
- data/lib/rigor/analysis/runner/scan_environment.rb +51 -0
- data/lib/rigor/analysis/runner.rb +222 -111
- data/lib/rigor/analysis/severity_stamp.rb +11 -0
- data/lib/rigor/analysis/worker_session.rb +24 -1
- data/lib/rigor/cache/descriptor.rb +40 -7
- data/lib/rigor/cache/engine_source.rb +3 -2
- data/lib/rigor/cache/incremental_snapshot.rb +49 -8
- data/lib/rigor/cache/rbs_descriptor.rb +2 -1
- data/lib/rigor/cache/store.rb +4 -3
- data/lib/rigor/cli/check_command.rb +93 -4
- data/lib/rigor/cli/command.rb +3 -1
- data/lib/rigor/cli/diff_command.rb +2 -1
- data/lib/rigor/cli/docs_command.rb +3 -2
- data/lib/rigor/cli/doctor_command.rb +1 -1
- data/lib/rigor/cli/explain_command.rb +3 -2
- data/lib/rigor/cli/lens_command.rb +5 -5
- data/lib/rigor/cli/mcp_command.rb +2 -1
- data/lib/rigor/cli/options.rb +20 -3
- data/lib/rigor/cli/plugin_command.rb +2 -1
- data/lib/rigor/cli/plugins_command.rb +7 -1
- data/lib/rigor/cli/plugins_renderer.rb +24 -2
- data/lib/rigor/cli/show_bleedingedge_command.rb +2 -1
- data/lib/rigor/cli/sig_gen_command.rb +73 -13
- data/lib/rigor/cli/skill_command.rb +2 -1
- data/lib/rigor/cli/skill_describe.rb +3 -2
- data/lib/rigor/cli/type_of_command.rb +2 -1
- data/lib/rigor/cli/type_of_project_scope.rb +27 -0
- data/lib/rigor/cli/unused_command.rb +10 -7
- data/lib/rigor/cli.rb +3 -2
- data/lib/rigor/config_audit.rb +72 -16
- data/lib/rigor/configuration/severity_profile.rb +20 -2
- data/lib/rigor/configuration.rb +43 -7
- data/lib/rigor/effects/signature_sources.rb +3 -1
- data/lib/rigor/environment/bundle_sig_discovery.rb +3 -2
- data/lib/rigor/environment/gated_signature_guard.rb +2 -1
- data/lib/rigor/environment/gated_signature_plan.rb +2 -1
- data/lib/rigor/environment/installed_gem_set.rb +2 -1
- data/lib/rigor/environment/missing_gem_constant_index.rb +4 -3
- data/lib/rigor/environment/rbs_loader.rb +136 -7
- data/lib/rigor/environment/required_features.rb +136 -29
- data/lib/rigor/environment/ruby_library_roots.rb +122 -0
- data/lib/rigor/environment.rb +4 -2
- data/lib/rigor/inference/block_call_timing.rb +7 -1
- data/lib/rigor/inference/builtins/method_catalog.rb +2 -1
- data/lib/rigor/inference/callee_mutation_chain.rb +115 -0
- data/lib/rigor/inference/captured_locals.rb +44 -13
- data/lib/rigor/inference/clause_widening.rb +90 -0
- data/lib/rigor/inference/deep_erasure.rb +138 -0
- data/lib/rigor/inference/def_return_typer.rb +159 -9
- data/lib/rigor/inference/definer_resolution.rb +101 -20
- data/lib/rigor/inference/error_info.rb +17 -3
- data/lib/rigor/inference/expression_typer.rb +97 -18
- data/lib/rigor/inference/global_write_census.rb +36 -1
- data/lib/rigor/inference/intervening_ivar_reset.rb +303 -0
- data/lib/rigor/inference/ivar_writer_census.rb +195 -0
- data/lib/rigor/inference/loop_value_record.rb +53 -0
- data/lib/rigor/inference/macro_block_self_type.rb +20 -6
- data/lib/rigor/inference/match_rebinding/frame.rb +19 -0
- data/lib/rigor/inference/method_dispatcher/constant_folding.rb +278 -42
- data/lib/rigor/inference/method_dispatcher/kernel_dispatch.rb +6 -2
- data/lib/rigor/inference/method_dispatcher/rbs_dispatch.rb +50 -2
- data/lib/rigor/inference/method_dispatcher/set_folding.rb +53 -20
- data/lib/rigor/inference/method_dispatcher.rb +113 -19
- data/lib/rigor/inference/module_function_state/spellings.rb +64 -0
- data/lib/rigor/inference/module_function_state.rb +149 -42
- data/lib/rigor/inference/mutation_widening.rb +5 -2
- data/lib/rigor/inference/narrowing.rb +116 -11
- data/lib/rigor/inference/object_mixins.rb +13 -1
- data/lib/rigor/inference/parameter_inference_collector.rb +4 -26
- data/lib/rigor/inference/project_patched_methods.rb +168 -4
- data/lib/rigor/inference/project_patched_mixins.rb +162 -0
- data/lib/rigor/inference/project_patched_scanner.rb +51 -12
- data/lib/rigor/inference/project_patched_visibility.rb +214 -0
- data/lib/rigor/inference/project_seed_tables.rb +121 -0
- data/lib/rigor/inference/project_yielder.rb +128 -0
- data/lib/rigor/inference/refined_dispatch/constructed_class.rb +113 -0
- data/lib/rigor/inference/refined_dispatch/own_method.rb +41 -12
- data/lib/rigor/inference/reflective_ivar_write.rb +6 -6
- data/lib/rigor/inference/return_barrier.rb +16 -0
- data/lib/rigor/inference/scope_indexer/certainty.rb +9 -0
- data/lib/rigor/inference/scope_indexer/declared_ivar_types.rb +64 -0
- data/lib/rigor/inference/scope_indexer/declared_param_writes.rb +162 -0
- data/lib/rigor/inference/scope_indexer/unseen_ivar_writers.rb +133 -0
- data/lib/rigor/inference/scope_indexer.rb +1144 -197
- data/lib/rigor/inference/self_call_ivar_writes.rb +29 -12
- data/lib/rigor/inference/singleton_external_ahead.rb +64 -0
- data/lib/rigor/inference/singleton_hook_decline.rb +7 -0
- data/lib/rigor/inference/statement_evaluator.rb +1088 -213
- data/lib/rigor/inference/synthetic_method_index.rb +23 -0
- data/lib/rigor/inference/synthetic_method_scanner/project_members.rb +130 -0
- data/lib/rigor/inference/synthetic_method_scanner.rb +72 -12
- data/lib/rigor/inference/unthreaded_rebinds.rb +3 -1
- data/lib/rigor/language_server/buffer_table.rb +6 -0
- data/lib/rigor/language_server/diagnostic_publisher.rb +20 -6
- data/lib/rigor/language_server/project_context.rb +59 -3
- data/lib/rigor/language_server/server.rb +5 -3
- data/lib/rigor/lens/contract_reader.rb +45 -2
- data/lib/rigor/lens/document.rb +2 -1
- data/lib/rigor/lens/file_reader.rb +12 -2
- data/lib/rigor/lens/members.rb +16 -2
- data/lib/rigor/lens/run.rb +34 -7
- data/lib/rigor/mcp/server.rb +11 -3
- data/lib/rigor/plugin/base.rb +29 -13
- data/lib/rigor/plugin/io_boundary.rb +42 -6
- data/lib/rigor/plugin/isolation.rb +4 -3
- data/lib/rigor/plugin/manifest.rb +29 -3
- data/lib/rigor/plugin/registry.rb +38 -0
- data/lib/rigor/protection/discovery_seed.rb +64 -36
- data/lib/rigor/protection/mutation_cache.rb +8 -2
- data/lib/rigor/rooted_glob.rb +36 -0
- data/lib/rigor/scope/discovery_index.rb +5 -0
- data/lib/rigor/scope/resolution_chain/relevance.rb +14 -0
- data/lib/rigor/scope/resolution_chain.rb +40 -5
- data/lib/rigor/scope.rb +59 -7
- data/lib/rigor/sig_gen/alias_index.rb +2 -1
- data/lib/rigor/sig_gen/classification.rb +4 -1
- data/lib/rigor/sig_gen/generator.rb +465 -49
- data/lib/rigor/sig_gen/layout_index.rb +5 -2
- data/lib/rigor/sig_gen/observation_collector.rb +141 -12
- data/lib/rigor/sig_gen/rbs_validity.rb +1 -1
- data/lib/rigor/sig_gen/renderer.rb +16 -155
- data/lib/rigor/sig_gen/skip_reason_catalog.rb +11 -0
- data/lib/rigor/sig_gen/type_elaborator.rb +21 -5
- data/lib/rigor/sig_gen/write_reporter.rb +203 -0
- data/lib/rigor/sig_gen/write_result.rb +3 -1
- data/lib/rigor/sig_gen/writer.rb +5 -3
- data/lib/rigor/signature_path_audit.rb +4 -2
- data/lib/rigor/type/combinator.rb +4 -3
- data/lib/rigor/type/constant.rb +54 -3
- data/lib/rigor/type/hash_shape.rb +14 -9
- data/lib/rigor/type/struct_instance.rb +3 -2
- data/lib/rigor/version.rb +1 -1
- data/plugins/rigor-actioncable/lib/rigor/plugin/actioncable/channel_discoverer.rb +1 -1
- data/plugins/rigor-actionmailer/lib/rigor/plugin/actionmailer/mailer_discoverer.rb +61 -44
- data/plugins/rigor-actionmailer/lib/rigor/plugin/actionmailer.rb +20 -1
- data/plugins/rigor-actionpack/lib/rigor/plugin/actionpack/controller_discoverer.rb +1 -1
- data/plugins/rigor-actionpack/lib/rigor/plugin/actionpack/render_locals.rb +6 -1
- data/plugins/rigor-actionpack/lib/rigor/plugin/actionpack/view_assigns.rb +1 -1
- data/plugins/rigor-actionpack/lib/rigor/plugin/actionpack.rb +13 -0
- data/plugins/rigor-active-model-serializers/lib/rigor/plugin/active_model_serializers/serializer_discoverer.rb +1 -1
- data/plugins/rigor-activejob/lib/rigor/plugin/activejob/effects.rb +4 -3
- data/plugins/rigor-activejob/lib/rigor/plugin/activejob/job_discoverer.rb +1 -1
- data/plugins/rigor-activejob/lib/rigor/plugin/activejob.rb +4 -2
- data/plugins/rigor-activerecord/lib/rigor/plugin/activerecord/model_discoverer.rb +1 -1
- data/plugins/rigor-activestorage/lib/rigor/plugin/activestorage/attachment_discoverer.rb +1 -1
- data/plugins/rigor-alba/lib/rigor/plugin/alba/resource_discoverer.rb +1 -1
- data/plugins/rigor-devise/lib/rigor/plugin/devise.rb +5 -3
- data/plugins/rigor-dry-types/lib/rigor/plugin/dry_types.rb +7 -6
- data/plugins/rigor-factorybot/lib/rigor/plugin/factorybot/factory_discoverer.rb +1 -1
- data/plugins/rigor-ffi/lib/rigor/plugin/ffi/discoverer.rb +38 -9
- data/plugins/rigor-ffi/lib/rigor/plugin/ffi/target_detector.rb +1 -1
- data/plugins/rigor-pundit/lib/rigor/plugin/pundit/authorization_scan.rb +1 -1
- data/plugins/rigor-pundit/lib/rigor/plugin/pundit/policy_discoverer.rb +1 -1
- data/plugins/rigor-rails-i18n/lib/rigor/plugin/rails_i18n/locale_index.rb +7 -2
- data/plugins/rigor-rails-i18n/lib/rigor/plugin/rails_i18n/locale_loader.rb +5 -5
- data/plugins/rigor-rails-i18n/lib/rigor/plugin/rails_i18n.rb +18 -17
- data/plugins/rigor-rails-routes/lib/rigor/plugin/rails_routes.rb +1 -1
- data/plugins/rigor-rspec/lib/rigor/plugin/rspec/matcher_analyzer.rb +102 -11
- data/plugins/rigor-sidekiq/lib/rigor/plugin/sidekiq/worker_discoverer.rb +1 -1
- data/plugins/rigor-sidekiq/lib/rigor/plugin/sidekiq.rb +4 -2
- data/plugins/rigor-sinatra/lib/rigor/plugin/sinatra.rb +4 -2
- data/plugins/rigor-sorbet/lib/rigor/plugin/sorbet.rb +2 -2
- data/plugins/rigor-typelizer/lib/rigor/plugin/typelizer/serializer_discoverer.rb +2 -2
- data/plugins/rigor-typelizer/lib/rigor/plugin/typelizer.rb +1 -1
- data/sig/rigor/analysis/baseline.rbs +3 -2
- data/sig/rigor/effects/file_collection.rbs +5 -6
- data/sig/rigor/effects/registry.rbs +8 -6
- data/sig/rigor/effects/summary.rbs +6 -5
- data/sig/rigor/environment.rbs +5 -3
- data/sig/rigor/inference/optimistic_origin.rbs +11 -0
- data/sig/rigor/inference.rbs +6 -0
- data/sig/rigor/plugin/additional_initializer.rbs +5 -5
- data/sig/rigor/plugin/effect_ancestry.rbs +6 -4
- data/sig/rigor/plugin/effect_attribution.rbs +25 -10
- data/sig/rigor/plugin/effect_edge.rbs +12 -5
- data/sig/rigor/plugin/effect_entry_points.rbs +8 -3
- data/sig/rigor/plugin/io_boundary.rbs +5 -2
- data/sig/rigor/plugin/manifest.rbs +16 -18
- data/sig/rigor/plugin/protocol_contract.rbs +10 -9
- data/sig/rigor/plugin/registry.rbs +1 -1
- data/sig/rigor/rooted_glob.rbs +7 -0
- data/sig/rigor/scope.rbs +34 -52
- data/sig/rigor/type.rbs +0 -6
- data/skills/rigor-doctor/references/01-checks.md +23 -11
- data/skills/rigor-type-oracle/references/01-oracle-commands.md +2 -1
- metadata +32 -1
data/sig/rigor/scope.rbs
CHANGED
|
@@ -14,39 +14,32 @@ module Rigor
|
|
|
14
14
|
attr_reader void_origins: Hash[untyped, Inference::VoidOrigin]
|
|
15
15
|
attr_reader plugin_typed_calls: Hash[untyped, bool]
|
|
16
16
|
attr_reader optimistic_origins: Hash[untyped, Symbol]
|
|
17
|
-
# A marked binding whose miss answer is known stores an `Inference::OptimisticOrigin::BoundMark`
|
|
18
|
-
#
|
|
19
|
-
attr_reader optimistic_locals: Hash[Symbol, Symbol |
|
|
20
|
-
attr_reader optimistic_ivars: Hash[Symbol, Symbol |
|
|
21
|
-
# sig-gen gap: #1154 — an `attr_reader` over an ivar assigned in `initialize` from a parameter reaches `untyped`.
|
|
17
|
+
# A marked binding whose miss answer is known stores an `Inference::OptimisticOrigin::BoundMark` in place of
|
|
18
|
+
# its bare cause (issue #1302).
|
|
19
|
+
attr_reader optimistic_locals: Hash[Symbol, Symbol | Inference::OptimisticOrigin::BoundMark]
|
|
20
|
+
attr_reader optimistic_ivars: Hash[Symbol, Symbol | Inference::OptimisticOrigin::BoundMark]
|
|
22
21
|
attr_reader repeated_or_writes: Hash[untyped, bool]
|
|
23
|
-
# sig-gen gap: #
|
|
22
|
+
# sig-gen gap: #2323 — the same reader shape; `Inference::MatchRebinding::Frame` carries no signature.
|
|
24
23
|
attr_reader match_frame: untyped
|
|
25
24
|
attr_reader indexed_narrowings: Hash[IndexedKey, Type::t]
|
|
26
25
|
attr_reader method_chain_narrowings: Hash[ChainKey, Type::t]
|
|
27
26
|
attr_reader source_path: String?
|
|
27
|
+
# authored: the element is a `Symbol` by contract; a Set's element type stays `untyped` in sig-gen (#2177, #2317), so the generator
|
|
28
|
+
# would never propose it.
|
|
28
29
|
attr_reader struct_fold_safe_locals: Set[Symbol]
|
|
29
30
|
attr_reader opaque_block_self: bool
|
|
30
|
-
# sig-gen gap: #1154 — sig-gen skips the reader (sig.skipped.untyped-return): an `attr_reader`
|
|
31
|
-
# over an ivar assigned in `initialize` from a parameter, so inference reaches `untyped`.
|
|
32
31
|
# Issue #1759 — `:refinement` (REFINEMENT_BLOCK_SELF) directly in a `refine X do … end` block body.
|
|
33
32
|
attr_reader block_self_unknown: bool | :refinement
|
|
34
|
-
# sig-gen gap: #1154 — sig-gen skips the reader (sig.skipped.untyped-return): an `attr_reader`
|
|
35
|
-
# over an ivar assigned in `initialize` from a parameter, so inference reaches `untyped`.
|
|
36
33
|
attr_reader singleton_class_body: bool
|
|
37
34
|
attr_reader lexical_nesting: Array[String]?
|
|
38
35
|
# Issue #1429 — a guard's narrowing of a constant reference, keyed by its spelling.
|
|
39
|
-
# sig-gen gap: #1154 — a reader over an ivar `initialize` assigns from a parameter.
|
|
40
36
|
attr_reader constant_narrowings: Hash[String, Type::t]
|
|
41
37
|
# Issue #1429 — the pre-guard type of each global or constant a guard narrowed.
|
|
42
|
-
# sig-gen gap: #1154 — a reader over an ivar `initialize` assigns from a parameter.
|
|
43
38
|
attr_reader guard_records: Hash[[Symbol, Symbol | String], Type::t]
|
|
44
39
|
# Issue #1446 — the classes a class guard narrowed a `bot` receiver to.
|
|
45
|
-
# sig-gen gap: #1154 — a reader over an ivar `initialize` assigns from a parameter.
|
|
46
40
|
attr_reader bot_guard_classes: Hash[[Symbol, Symbol | String], Array[String]]
|
|
47
41
|
# Issue #1667 — the modules a plugin-declared refined block runs under, in declaration order.
|
|
48
|
-
|
|
49
|
-
attr_reader declared_refinements: Array[String]
|
|
42
|
+
attr_reader declared_refinements: Array[String | Symbol]
|
|
50
43
|
|
|
51
44
|
# ADR-53 Track A — the seed-time discovery tables live on the
|
|
52
45
|
# DiscoveryIndex; Scope keeps per-table readers as delegates.
|
|
@@ -61,28 +54,20 @@ module Rigor
|
|
|
61
54
|
def discovered_singleton_def_nodes: () -> Hash[String, Hash[Symbol, untyped]]
|
|
62
55
|
def discovered_def_sources: () -> Hash[String, Hash[Symbol, String]]
|
|
63
56
|
def discovered_singleton_def_sources: () -> Hash[String, Hash[Symbol, String]]
|
|
64
|
-
def discovered_method_visibilities: () -> Hash[String, Hash[Symbol, Symbol]]
|
|
65
|
-
# sig-gen gap: #1148 — sig-gen skips an endless-def reader (untyped return); the row is hand-written.
|
|
57
|
+
def discovered_method_visibilities: () -> Hash[String, Hash[Symbol | [:singleton, Symbol], Symbol]]
|
|
66
58
|
def discovered_parameter_envelopes: () -> Hash[String, Hash[untyped, untyped]]
|
|
67
|
-
# sig-gen gap: #1149 — sig-gen skips the `||` fallback reader (untyped return); the row is hand-written.
|
|
68
59
|
def parameter_envelopes_of: (String class_name) -> Hash[untyped, untyped]
|
|
69
60
|
def discovered_superclasses: () -> Hash[String, String]
|
|
70
|
-
# sig-gen gap: #1148 — sig-gen skips the endless-def reader (untyped return), so the per-file
|
|
71
|
-
# deferred-range table's row shape is hand-written.
|
|
72
61
|
def discovered_deferred_ranges: () -> Hash[String, Array[[Integer, Integer, Symbol?, Symbol?, String?]]]
|
|
73
|
-
#
|
|
74
|
-
# shape is hand-written. A method key is a Symbol or the `"*"` wildcard (ADR-121 WD7).
|
|
62
|
+
# A method key is a Symbol or the `"*"` wildcard (ADR-121 WD7).
|
|
75
63
|
def discovered_refinements: () -> Hash[String, Hash[Symbol | String, Array[String]]]
|
|
76
64
|
# authored: the list holds module names and the `InEffectRefinements::UNKNOWN` Symbol; sig-gen reads the delegated
|
|
77
65
|
# return through an unsigned class as untyped.
|
|
78
66
|
def in_effect_refinements: (untyped node, ?Array[String] declared) -> Array[String | Symbol]
|
|
79
|
-
# sig-gen gap: #1148 — sig-gen skips the endless-def reader (untyped return), so the census shape is
|
|
80
|
-
# hand-written.
|
|
81
67
|
def discovered_global_write_census: () -> Set[Array[untyped]]
|
|
82
68
|
def discovered_includes: () -> Hash[String, Array[String]]
|
|
83
69
|
# Issue #1123 — the instance-ancestor-ORDER table beside the include one.
|
|
84
70
|
def discovered_prepends: () -> Hash[String, Array[String]]
|
|
85
|
-
# sig-gen gap: #1148 — sig-gen skips the endless-def reader (untyped return), so the table shape is hand-written.
|
|
86
71
|
def discovered_extends: () -> Hash[String, Array[String]]
|
|
87
72
|
def discovered_class_sources: () -> Hash[String, Set[String]]
|
|
88
73
|
def constant_sources: () -> Hash[String, Set[String]]
|
|
@@ -92,7 +77,8 @@ module Rigor
|
|
|
92
77
|
def bound_constant_names: (String name) -> Array[String]
|
|
93
78
|
# sig-gen gap: #1150 — the `Data.define` table it reads carries no type, so sig-gen skips the return; the shape is hand-written.
|
|
94
79
|
def shadowing_constant_names: (String name) -> Array[String]
|
|
95
|
-
# sig-gen gap: #
|
|
80
|
+
# sig-gen gap: #2309 — the `|| Set.new.freeze` fallback arm types `Set[untyped]` beside the table's `Set[Symbol]`, so the
|
|
81
|
+
# element type is hand-written.
|
|
96
82
|
def published_constant_ivars_for: (String class_name) -> Set[Symbol]
|
|
97
83
|
def published_constant?: (String name) -> bool
|
|
98
84
|
def record_constant_dependency: (String name) -> void
|
|
@@ -110,10 +96,14 @@ module Rigor
|
|
|
110
96
|
def plugin_typed_call?: (untyped node) -> bool
|
|
111
97
|
|
|
112
98
|
def with_repeated_or_writes: (untyped nodes) -> Rigor::Scope
|
|
113
|
-
# sig-gen gap: #1154 — `Hash#key?` over that reader reaches `untyped`, so the `bool` is hand-written.
|
|
114
99
|
def repeated_or_write?: (untyped node) -> bool
|
|
115
100
|
|
|
116
101
|
class DiscoveryIndex
|
|
102
|
+
# #1557 — the def-nesting table is a Hash, or an `Inference::ScopeIndexer::LayeredDefNestings` that answers only
|
|
103
|
+
# `[]` and `empty?`, so that `each` or `key?` over one layer raises instead of reading half the table. A union
|
|
104
|
+
# rather than an interface: the engine reads an RBS interface as `untyped`, which would check nothing.
|
|
105
|
+
type def_nestings = Hash[untyped, Array[String]] | Inference::ScopeIndexer::LayeredDefNestings
|
|
106
|
+
|
|
117
107
|
attr_reader declared_types: Hash[untyped, Type::t]
|
|
118
108
|
attr_reader class_ivars: Hash[String, Hash[Symbol, Type::t]]
|
|
119
109
|
attr_reader class_cvars: Hash[String, Hash[Symbol, Type::t]]
|
|
@@ -124,11 +114,11 @@ module Rigor
|
|
|
124
114
|
attr_reader in_source_constants: Hash[String, Type::t]
|
|
125
115
|
attr_reader discovered_methods: Hash[String, Hash[Symbol, Symbol]]
|
|
126
116
|
attr_reader discovered_def_nodes: Hash[String, Hash[Symbol, untyped]]
|
|
127
|
-
attr_reader discovered_def_nestings:
|
|
117
|
+
attr_reader discovered_def_nestings: def_nestings
|
|
128
118
|
attr_reader discovered_singleton_def_nodes: Hash[String, Hash[Symbol, untyped]]
|
|
129
119
|
attr_reader discovered_def_sources: Hash[String, Hash[Symbol, String]]
|
|
130
120
|
attr_reader discovered_singleton_def_sources: Hash[String, Hash[Symbol, String]]
|
|
131
|
-
attr_reader discovered_method_visibilities: Hash[String, Hash[Symbol, Symbol]]
|
|
121
|
+
attr_reader discovered_method_visibilities: Hash[String, Hash[Symbol | [:singleton, Symbol], Symbol]]
|
|
132
122
|
# sig-gen gap: #1150 — `Data.define` members carry no type, as for every other row in this class.
|
|
133
123
|
attr_reader discovered_parameter_envelopes: Hash[String, Hash[untyped, untyped]]
|
|
134
124
|
attr_reader discovered_superclasses: Hash[String, String]
|
|
@@ -201,7 +191,7 @@ module Rigor
|
|
|
201
191
|
# authored: ADR-119 WD1 sibling pairing; no inferred signature exists for it (#1150).
|
|
202
192
|
def sibling_tables: () -> Hash[Symbol, untyped]
|
|
203
193
|
|
|
204
|
-
def with: (?declared_types: Hash[untyped, Type::t], ?class_ivars: Hash[String, Hash[Symbol, Type::t]], ?class_cvars: Hash[String, Hash[Symbol, Type::t]], ?program_globals: Hash[Symbol, Type::t], ?program_global_seeds: Hash[Symbol, Type::t], ?discovered_classes: Hash[String, Type::Singleton], ?in_source_constants: Hash[String, Type::t], ?discovered_methods: Hash[String, Hash[Symbol, Symbol]], ?discovered_def_nodes: Hash[String, Hash[Symbol, untyped]], ?discovered_def_nestings:
|
|
194
|
+
def with: (?declared_types: Hash[untyped, Type::t], ?class_ivars: Hash[String, Hash[Symbol, Type::t]], ?class_cvars: Hash[String, Hash[Symbol, Type::t]], ?program_globals: Hash[Symbol, Type::t], ?program_global_seeds: Hash[Symbol, Type::t], ?discovered_classes: Hash[String, Type::Singleton], ?in_source_constants: Hash[String, Type::t], ?discovered_methods: Hash[String, Hash[Symbol, Symbol]], ?discovered_def_nodes: Hash[String, Hash[Symbol, untyped]], ?discovered_def_nestings: def_nestings, ?discovered_singleton_def_nodes: Hash[String, Hash[Symbol, untyped]], ?discovered_def_sources: Hash[String, Hash[Symbol, String]], ?discovered_singleton_def_sources: Hash[String, Hash[Symbol, String]], ?discovered_method_visibilities: Hash[String, Hash[Symbol | [:singleton, Symbol], Symbol]], ?discovered_parameter_envelopes: Hash[String, Hash[untyped, untyped]], ?discovered_superclasses: Hash[String, String], ?discovered_includes: Hash[String, Array[String]], ?discovered_prepends: Hash[String, Array[String]], ?discovered_extends: Hash[String, Array[String]], ?discovered_class_sources: Hash[String, Set[String]], ?constant_sources: Hash[String, Set[String]], ?constant_writers: Hash[String, Array[String]], ?constant_shadowers: Hash[String, Array[String]], ?published_constant_names: Set[String], ?local_constant_names: Set[String], ?published_constant_alias_names: Set[String], ?published_constant_ivars: Hash[String, Set[Symbol]], ?data_member_layouts: Hash[String, Array[Symbol]], ?struct_member_layouts: Hash[String, { members: Array[Symbol], keyword_init: bool }], ?param_inferred_types: Hash[[String, Symbol, Symbol], Hash[Symbol, Type::t]], ?discovered_deferred_ranges: Hash[String, Array[[Integer, Integer, Symbol?, Symbol?, String?]]], ?discovered_refinements: Hash[String, Hash[Symbol | String, Array[String]]], ?discovered_global_write_census: Set[Array[untyped]], ?run_generation: Object?, ?patched_line_readers: Set[Symbol], ?clears_last_status: bool, ?defines_case_equality: bool, ?implicit_self_evidence: untyped, ?in_effect_refinements: untyped, ?possible_discovered_methods: Hash[String, Hash[Symbol, Symbol]], ?possible_discovered_deferred_ranges: Hash[String, Array[[Integer, Integer, Symbol?, Symbol?, String?]]], ?contested_discovered_def_nodes: Set[Array[untyped]], ?contested_discovered_singleton_def_nodes: Set[Array[untyped]], ?contested_discovered_method_visibilities: Set[Array[untyped]], ?contested_discovered_parameter_envelopes: Set[Array[untyped]]) -> DiscoveryIndex
|
|
205
195
|
end
|
|
206
196
|
|
|
207
197
|
class IndexedKey
|
|
@@ -218,22 +208,19 @@ module Rigor
|
|
|
218
208
|
|
|
219
209
|
def self.empty: (?environment: Environment, ?source_path: String?) -> Scope
|
|
220
210
|
|
|
221
|
-
def initialize: (environment: Environment, locals: Hash[Symbol, Type::t], ?fact_store: Analysis::FactStore, ?self_type: Type::t?, ?ivars: Hash[Symbol, Type::t], ?cvars: Hash[Symbol, Type::t], ?globals: Hash[Symbol, Type::t], ?discovery: DiscoveryIndex, ?source_path: String?, ?dynamic_origins: Hash[untyped, Symbol]) -> void
|
|
211
|
+
def initialize: (environment: Environment, locals: Hash[Symbol, Type::t], ?fact_store: Analysis::FactStore, ?self_type: Type::t?, ?ivars: Hash[Symbol, Type::t], ?cvars: Hash[Symbol, Type::t], ?globals: Hash[Symbol, Type::t], ?discovery: DiscoveryIndex, ?source_path: String?, ?opaque_block_self: bool, ?block_self_unknown: bool | :refinement, ?singleton_class_body: bool, ?dynamic_origins: Hash[untyped, Symbol], ?indexed_narrowings: Hash[IndexedKey, Type::t], ?method_chain_narrowings: Hash[ChainKey, Type::t], ?declaration_sourced: Set[[Symbol, Symbol] | [Symbol, Symbol, Symbol]], ?published_constant_sourced: Set[[Symbol, Symbol]], ?struct_fold_safe_locals: Set[Symbol], ?lexical_nesting: Array[String]?, ?local_origins: Hash[Symbol, Symbol], ?ivar_origins: Hash[Symbol, Symbol], ?void_origins: Hash[untyped, Inference::VoidOrigin], ?plugin_typed_calls: Hash[untyped, bool], ?optimistic_origins: Hash[untyped, Symbol], ?optimistic_locals: Hash[Symbol, Symbol | Inference::OptimisticOrigin::BoundMark], ?optimistic_ivars: Hash[Symbol, Symbol | Inference::OptimisticOrigin::BoundMark], ?repeated_or_writes: Hash[untyped, bool], ?match_frame: untyped, ?constant_narrowings: Hash[String, Type::t], ?guard_records: Hash[[Symbol, Symbol | String], Type::t], ?bot_guard_classes: Hash[[Symbol, Symbol | String], Array[String]], ?declared_refinements: Array[String | Symbol]) -> void
|
|
222
212
|
def with_source_path: (String? path) -> Scope
|
|
223
213
|
def with_struct_fold_safe: (Set[Symbol] locals) -> Scope
|
|
224
214
|
def with_lexical_nesting: (Array[String]? chain) -> Scope
|
|
225
215
|
def struct_fold_safe?: (String | Symbol name) -> bool
|
|
226
216
|
def entering_opaque_block: () -> Scope
|
|
227
|
-
# sig-gen gap: #1148 — sig-gen skips the endless-def reader (sig.skipped.untyped-return); the row is hand-written.
|
|
228
217
|
def block_self_unknown?: () -> bool
|
|
229
218
|
REFINEMENT_BLOCK_SELF: :refinement
|
|
230
|
-
# sig-gen gap: #1148 — sig-gen skips the endless-def predicate (sig.skipped.untyped-return); the row is hand-written.
|
|
231
219
|
def refinement_block_self?: () -> bool
|
|
232
220
|
def with_block_self_unknown: (bool flag) -> Scope
|
|
233
221
|
def opaque_block_self?: () -> bool
|
|
234
222
|
def with_singleton_class_body: (bool) -> Scope
|
|
235
223
|
def with_declared_refinements: (Array[String] names) -> Scope
|
|
236
|
-
# sig-gen gap: #1148 — sig-gen skips the endless-def reader (sig.skipped.untyped-return); the row is hand-written.
|
|
237
224
|
def singleton_class_body?: () -> bool
|
|
238
225
|
def with_discovery: (DiscoveryIndex index) -> Scope
|
|
239
226
|
def local: (String | Symbol name) -> Type::t?
|
|
@@ -261,33 +248,31 @@ module Rigor
|
|
|
261
248
|
# Issue #1446 — `rigor sig-gen` output.
|
|
262
249
|
def with_guarded_ivar: (untyped name, untyped type, untyped pre_guard) -> Scope
|
|
263
250
|
def without_ivar_guard: (untyped name) -> Scope
|
|
264
|
-
# sig-gen gap: #1154 — the table reader over an ivar `initialize` assigns from a parameter reaches `untyped`.
|
|
265
251
|
def guard_narrowed_ivar?: (untyped name) -> bool
|
|
266
252
|
# Issue #1446 — `rigor sig-gen` output.
|
|
267
253
|
def with_bot_guard_classes: (untyped kind, untyped name, untyped class_names) -> Scope
|
|
268
|
-
# sig-gen gap: #1154 — the table reader over an ivar `initialize` assigns from a parameter reaches `untyped`.
|
|
269
254
|
def bot_guard_classes_for: (untyped kind, untyped name) -> Array[String]?
|
|
270
255
|
def without_constant_narrowing: (untyped key) -> Scope
|
|
271
256
|
def guard_narrowed?: () -> bool
|
|
272
257
|
def forget_guard_narrowings: () -> Scope
|
|
273
258
|
def forget_guard_narrowing_of: (untyped kind, untyped name) -> Scope
|
|
274
259
|
def without_constant_narrowings_named: (untyped name) -> Scope
|
|
275
|
-
# sig-gen gap: #1154 — the table reader over an ivar `initialize` assigns from a parameter reaches `untyped`.
|
|
276
260
|
def constant_narrowing: (String key) -> Type::t?
|
|
277
|
-
#
|
|
278
|
-
#
|
|
261
|
+
# authored: the element is `[Symbol, Symbol]` by contract; a Set's element type stays `untyped` in sig-gen (#2177, #2317), so the generator
|
|
262
|
+
# would never propose it.
|
|
279
263
|
def published_constant_sourced: () -> Set[[Symbol, Symbol]]
|
|
280
|
-
# sig-gen gap: #1152 — `Set#include?` over a tuple key types `untyped`, so the `bool` is hand-written.
|
|
281
264
|
def published_constant_sourced?: (Symbol kind, String | Symbol name) -> bool
|
|
282
265
|
def with_published_constant_mark: (Symbol kind, String | Symbol name) -> Scope
|
|
283
266
|
# Issue #1362 — a `[:global_copy, local, global]` record rides beside the `(kind, name)` refs.
|
|
267
|
+
# authored: the element is a `[Symbol, Symbol]` or `[Symbol, Symbol, Symbol]` tuple by contract; a Set's element type stays `untyped` in sig-gen (#2177, #2317), so the generator
|
|
268
|
+
# would never propose it.
|
|
284
269
|
def declaration_sourced: () -> Set[[Symbol, Symbol] | [Symbol, Symbol, Symbol]]
|
|
285
270
|
def seed_declaration_sourced_ivar: (String | Symbol name, Type::t type) -> Scope
|
|
286
271
|
def seed_declaration_sourced_global: (String | Symbol name, Type::t type) -> Scope
|
|
287
272
|
def with_global_copy_marks: (String | Symbol name, Array[String | Symbol] globals) -> Scope
|
|
288
273
|
def without_local_declaration_marks: (String | Symbol name) -> Scope
|
|
289
|
-
# sig-gen gap: #
|
|
290
|
-
#
|
|
274
|
+
# sig-gen gap: #2322 — the records come out of `@declaration_sourced`, whose set now types; `ref[2]` reads as
|
|
275
|
+
# `Symbol?`, but the `filter_map` over it answers `Array[untyped]`.
|
|
291
276
|
def declaration_sourced_global_copies: (String | Symbol name) -> Array[Symbol]
|
|
292
277
|
def with_declaration_sourced_local: (String | Symbol name, Type::t type) -> Scope
|
|
293
278
|
def with_local_declaration_mark: (String | Symbol name) -> Scope
|
|
@@ -300,19 +285,15 @@ module Rigor
|
|
|
300
285
|
def inferred_param?: (String | Symbol name) -> bool
|
|
301
286
|
def forget_match_globals: () -> Scope
|
|
302
287
|
def untyped_match_globals: () -> Scope
|
|
303
|
-
# sig-gen gap: #1154 — the reader over the `@globals` ivar `initialize` assigns from a parameter reaches
|
|
304
|
-
# `untyped`, so the `bool` is hand-written.
|
|
305
288
|
def match_globals_bound?: () -> bool
|
|
306
289
|
def with_match_frame: (untyped body, ?untyped parameters) -> Scope
|
|
307
|
-
# sig-gen gap: #
|
|
290
|
+
# sig-gen gap: #2323 — the frame reader over an ivar assigned in `initialize` from a parameter reaches
|
|
308
291
|
# `untyped`, so the `bool` is hand-written.
|
|
309
292
|
def match_rebinding_closure?: () -> bool
|
|
310
293
|
def forget_last_line: () -> Scope
|
|
311
294
|
def untyped_last_line: () -> Scope
|
|
312
|
-
# sig-gen gap: #1154 — the reader over the `@globals` ivar `initialize` assigns from a parameter reaches
|
|
313
|
-
# `untyped`, so the `bool` is hand-written.
|
|
314
295
|
def last_line_bound?: () -> bool
|
|
315
|
-
# sig-gen gap: #
|
|
296
|
+
# sig-gen gap: #2323 — the frame reader over the `@match_frame` ivar `initialize` assigns from a parameter
|
|
316
297
|
# reaches `untyped`, so the `bool` is hand-written.
|
|
317
298
|
def last_line_closure?: () -> bool
|
|
318
299
|
def forget_error_info: () -> Scope
|
|
@@ -331,13 +312,14 @@ module Rigor
|
|
|
331
312
|
def enqueue_ancestors: (String current, Array[String] queue, Hash[untyped, untyped] name_memo, ?mixins: bool) -> void
|
|
332
313
|
def ancestor_name_candidates: (String | Symbol subclass_qualified, String | Symbol raw_ancestor) -> Array[String]
|
|
333
314
|
|
|
334
|
-
# sig-gen gap: #
|
|
335
|
-
#
|
|
315
|
+
# sig-gen gap: #2312 — sig-gen skips the method (sig.skipped.untyped-return): its non-decline arm is the result of
|
|
316
|
+
# the private helper `ambiguous_ancestor_resolutions_of`, whose parameters are untyped, so the arm is `untyped`.
|
|
336
317
|
def ambiguous_ancestor_resolutions: (String | Symbol subclass_qualified, String | Symbol raw_ancestor) -> Array[String]
|
|
337
318
|
|
|
338
319
|
# Issue #530 — public so the external-gem ancestry probe asks the same question the walk does.
|
|
339
320
|
def known_user_class?: (String | Symbol name) -> bool
|
|
340
321
|
def singleton_def_for: (String | Symbol class_name, String | Symbol method_name) -> ::Prism::DefNode?
|
|
322
|
+
def module_function_def?: (untyped, untyped) -> (false | true)
|
|
341
323
|
def singleton_def_through_ancestors: (String | Symbol class_name, String | Symbol method_name, ?name_memo: Hash[untyped, untyped]) -> ([::Prism::DefNode, String] | [nil, nil])
|
|
342
324
|
def user_def_site_for: (String | Symbol class_name, String | Symbol method_name) -> String?
|
|
343
325
|
def user_singleton_def_site_for: (String | Symbol class_name, String | Symbol method_name) -> String?
|
|
@@ -355,8 +337,8 @@ module Rigor
|
|
|
355
337
|
def data_member_layout: (String | Symbol class_name) -> Array[Symbol]?
|
|
356
338
|
def struct_member_layout: (String | Symbol class_name) -> { members: Array[Symbol], keyword_init: bool }?
|
|
357
339
|
def includes_of: (String | Symbol class_name) -> Array[String]
|
|
358
|
-
# sig-gen gap: #
|
|
359
|
-
#
|
|
340
|
+
# sig-gen gap: #2302 — `names = []` grown by `concat` reads `Array[untyped]`, so the element type is
|
|
341
|
+
# hand-written, matching {#includes_of}.
|
|
360
342
|
def singleton_extends_of: (String | Symbol class_name) -> Array[String]
|
|
361
343
|
def indexed_narrowing: (Symbol receiver_kind, String | Symbol receiver_name, untyped key) -> Type::t?
|
|
362
344
|
def with_indexed_narrowing: (Symbol receiver_kind, String | Symbol receiver_name, untyped key, Type::t type) -> Scope
|
data/sig/rigor/type.rbs
CHANGED
|
@@ -429,14 +429,8 @@ module Rigor
|
|
|
429
429
|
attr_reader trinary: Trinary
|
|
430
430
|
attr_reader mode: accepts_mode
|
|
431
431
|
attr_reader reasons: Array[String]
|
|
432
|
-
# sig-gen gap: #1155 — the memoized `||=` return is an honest union with an
|
|
433
|
-
# untyped arm (the slot read cannot prove the memoized value), so sig-gen
|
|
434
|
-
# skips it (sig.skipped.untyped-return); the runtime result is always
|
|
435
|
-
# AcceptsResult and the row is hand-written.
|
|
436
432
|
def self.yes: (?mode: accepts_mode, ?reasons: (Array[String] | String)?) -> AcceptsResult
|
|
437
|
-
# sig-gen gap: #1155 — same memoized `||=` untyped-return gap as `self.yes`.
|
|
438
433
|
def self.no: (?mode: accepts_mode, ?reasons: (Array[String] | String)?) -> AcceptsResult
|
|
439
|
-
# sig-gen gap: #1155 — same memoized `||=` untyped-return gap as `self.yes`.
|
|
440
434
|
def self.maybe: (?mode: accepts_mode, ?reasons: (Array[String] | String)?) -> AcceptsResult
|
|
441
435
|
def initialize: (Trinary trinary, ?mode: accepts_mode, ?reasons: (Array[String] | String)?) -> void
|
|
442
436
|
def yes?: () -> bool
|
|
@@ -78,17 +78,24 @@ Make sure a single `rigortype` is on the load path.
|
|
|
78
78
|
- `warn` — the baseline file failed to load. Check the `baseline:` path
|
|
79
79
|
in the config.
|
|
80
80
|
|
|
81
|
-
### `plugin_gap` — the stack has a plugin that is not
|
|
81
|
+
### `plugin_gap` — the stack has a plugin that is not listed
|
|
82
82
|
|
|
83
|
-
Read from the `DEPENDENCIES` section of `Gemfile.lock
|
|
83
|
+
Read from the `DEPENDENCIES` section of `Gemfile.lock`, plus the Rails
|
|
84
|
+
components a direct `rails` stands for. A `plugins:` entry counts as
|
|
85
|
+
listing its plugin even with `enabled: false`. Skipped when no
|
|
86
|
+
`.rigor.yml` or `.rigor.dist.yml` is discovered in the current directory.
|
|
84
87
|
|
|
85
88
|
- `fail` — the project depends on gems that bundled plugins model, and
|
|
86
|
-
**none** of
|
|
87
|
-
|
|
88
|
-
|
|
89
|
+
`plugins:` lists **none** of the bundled plugins that model gems (those
|
|
90
|
+
declaring `target_gems:`; `rigor-rbs-inline` does not count): framework
|
|
91
|
+
calls will not resolve. Add the plugins for the stack to `plugins:` (the
|
|
92
|
+
`rigor-plugin-tune` skill does this). Once any such plugin is listed,
|
|
93
|
+
the remaining gaps are reported as the per-plugin warnings below.
|
|
89
94
|
- `warn` — one per plugin that models a direct dependency but is not
|
|
90
|
-
|
|
91
|
-
a
|
|
95
|
+
listed. Add it, or decline it deliberately — declining is a legitimate
|
|
96
|
+
choice, and the way to record it is a `plugins:` entry with
|
|
97
|
+
`enabled: false`. Do not enable an unrelated plugin only to silence
|
|
98
|
+
this check.
|
|
92
99
|
|
|
93
100
|
### `gemfile_install` — Rigor is a project dependency
|
|
94
101
|
|
|
@@ -98,10 +105,15 @@ Read from the `DEPENDENCIES` section of `Gemfile.lock`.
|
|
|
98
105
|
|
|
99
106
|
### `bundle_layout` — gem-shipped signatures are not discovered
|
|
100
107
|
|
|
101
|
-
`warn` when a `Gemfile.lock` exists
|
|
102
|
-
bundle
|
|
103
|
-
ship their own `sig/` are then
|
|
104
|
-
|
|
108
|
+
`warn` when a `Gemfile.lock` exists in the current directory but Rigor
|
|
109
|
+
cannot locate the installed bundle — typically the gems live in the
|
|
110
|
+
active Ruby's default gem home. Gems that ship their own `sig/` are then
|
|
111
|
+
not loaded. Rigor looks only where the project records the bundle: a
|
|
112
|
+
`bundler.bundle_path:` in `.rigor.yml` is used alone and must exist;
|
|
113
|
+
without one, and unless `bundler.auto_detect: false`, it reads
|
|
114
|
+
`.bundle/config`'s `BUNDLE_PATH`, then an in-tree `vendor/bundle`, then
|
|
115
|
+
the global Bundler config. Point Rigor at the install root with
|
|
116
|
+
`bundler.bundle_path:`, install into `vendor/bundle`, or supply
|
|
105
117
|
signatures with `rbs collection install` instead.
|
|
106
118
|
|
|
107
119
|
## Not covered by `rigor doctor`: is the analysis seeing your code?
|
|
@@ -212,7 +212,8 @@ rigor explain [<rule>]
|
|
|
212
212
|
| `--format=text\|json` | Default `text`. |
|
|
213
213
|
|
|
214
214
|
With no argument it lists every rule. With a rule id, a legacy alias, or
|
|
215
|
-
a family prefix (`call`, `flow`, `assert`, `dump`, `
|
|
215
|
+
a family prefix (`call`, `flow`, `def`, `assert`, `dump`, `global`,
|
|
216
|
+
`suppression`, `static`, `effect`) it prints the
|
|
216
217
|
rule's firing conditions, the severity per profile, the evidence tier,
|
|
217
218
|
and how to suppress it.
|
|
218
219
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rigortype
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Rigor contributors
|
|
@@ -446,6 +446,7 @@ files:
|
|
|
446
446
|
- lib/rigor/analysis/buffer_binding.rb
|
|
447
447
|
- lib/rigor/analysis/check_rules.rb
|
|
448
448
|
- lib/rigor/analysis/check_rules/always_truthy_condition_collector.rb
|
|
449
|
+
- lib/rigor/analysis/check_rules/clause_coverage.rb
|
|
449
450
|
- lib/rigor/analysis/check_rules/dead_assignment_collector.rb
|
|
450
451
|
- lib/rigor/analysis/check_rules/dead_version_guard_arms.rb
|
|
451
452
|
- lib/rigor/analysis/check_rules/declaration_sourced_guard.rb
|
|
@@ -455,6 +456,9 @@ files:
|
|
|
455
456
|
- lib/rigor/analysis/check_rules/lexical_method_sites.rb
|
|
456
457
|
- lib/rigor/analysis/check_rules/main_pass_collector.rb
|
|
457
458
|
- lib/rigor/analysis/check_rules/published_constant_guard.rb
|
|
459
|
+
- lib/rigor/analysis/check_rules/rbs_receiver_surface.rb
|
|
460
|
+
- lib/rigor/analysis/check_rules/rebinding_block_callees.rb
|
|
461
|
+
- lib/rigor/analysis/check_rules/rebinding_block_callees/dispatch.rb
|
|
458
462
|
- lib/rigor/analysis/check_rules/return_in_ensure_collector.rb
|
|
459
463
|
- lib/rigor/analysis/check_rules/ruby_deprecations.rb
|
|
460
464
|
- lib/rigor/analysis/check_rules/rule_ids.rb
|
|
@@ -475,6 +479,7 @@ files:
|
|
|
475
479
|
- lib/rigor/analysis/dependency_source_inference/return_type_heuristic.rb
|
|
476
480
|
- lib/rigor/analysis/dependency_source_inference/walker.rb
|
|
477
481
|
- lib/rigor/analysis/diagnostic.rb
|
|
482
|
+
- lib/rigor/analysis/edit_replay.rb
|
|
478
483
|
- lib/rigor/analysis/effects_cache_probe.rb
|
|
479
484
|
- lib/rigor/analysis/erb_template_detector.rb
|
|
480
485
|
- lib/rigor/analysis/fact_store.rb
|
|
@@ -491,10 +496,13 @@ files:
|
|
|
491
496
|
- lib/rigor/analysis/reachability/scan.rb
|
|
492
497
|
- lib/rigor/analysis/reachability/scan_cache.rb
|
|
493
498
|
- lib/rigor/analysis/reachability/signature_scan.rb
|
|
499
|
+
- lib/rigor/analysis/require_relative_closure.rb
|
|
494
500
|
- lib/rigor/analysis/result.rb
|
|
495
501
|
- lib/rigor/analysis/rule_catalog.rb
|
|
496
502
|
- lib/rigor/analysis/run_cache_key.rb
|
|
497
503
|
- lib/rigor/analysis/run_cache_probe.rb
|
|
504
|
+
- lib/rigor/analysis/run_disclosure_credit.rb
|
|
505
|
+
- lib/rigor/analysis/run_disclosure_ledger.rb
|
|
498
506
|
- lib/rigor/analysis/run_stats.rb
|
|
499
507
|
- lib/rigor/analysis/runner.rb
|
|
500
508
|
- lib/rigor/analysis/runner/buffer_pool_dispatcher.rb
|
|
@@ -506,6 +514,7 @@ files:
|
|
|
506
514
|
- lib/rigor/analysis/runner/pool_coordinator.rb
|
|
507
515
|
- lib/rigor/analysis/runner/project_pre_passes.rb
|
|
508
516
|
- lib/rigor/analysis/runner/run_snapshots.rb
|
|
517
|
+
- lib/rigor/analysis/runner/scan_environment.rb
|
|
509
518
|
- lib/rigor/analysis/self_call_resolution_recorder.rb
|
|
510
519
|
- lib/rigor/analysis/severity_stamp.rb
|
|
511
520
|
- lib/rigor/analysis/shadow_harness.rb
|
|
@@ -591,6 +600,7 @@ files:
|
|
|
591
600
|
- lib/rigor/cli/triage_command.rb
|
|
592
601
|
- lib/rigor/cli/triage_renderer.rb
|
|
593
602
|
- lib/rigor/cli/type_of_command.rb
|
|
603
|
+
- lib/rigor/cli/type_of_project_scope.rb
|
|
594
604
|
- lib/rigor/cli/type_of_renderer.rb
|
|
595
605
|
- lib/rigor/cli/type_of_template_probe.rb
|
|
596
606
|
- lib/rigor/cli/type_scan_command.rb
|
|
@@ -667,6 +677,7 @@ files:
|
|
|
667
677
|
- lib/rigor/environment/reflection.rb
|
|
668
678
|
- lib/rigor/environment/reporters.rb
|
|
669
679
|
- lib/rigor/environment/required_features.rb
|
|
680
|
+
- lib/rigor/environment/ruby_library_roots.rb
|
|
670
681
|
- lib/rigor/environment/source_rbs_synthesis.rb
|
|
671
682
|
- lib/rigor/flow_contribution.rb
|
|
672
683
|
- lib/rigor/flow_contribution/conflict.rb
|
|
@@ -704,7 +715,9 @@ files:
|
|
|
704
715
|
- lib/rigor/inference/builtins/string_catalog.rb
|
|
705
716
|
- lib/rigor/inference/builtins/struct_catalog.rb
|
|
706
717
|
- lib/rigor/inference/builtins/time_catalog.rb
|
|
718
|
+
- lib/rigor/inference/callee_mutation_chain.rb
|
|
707
719
|
- lib/rigor/inference/captured_locals.rb
|
|
720
|
+
- lib/rigor/inference/clause_widening.rb
|
|
708
721
|
- lib/rigor/inference/closure_escape_analyzer.rb
|
|
709
722
|
- lib/rigor/inference/content_join.rb
|
|
710
723
|
- lib/rigor/inference/coverage_scanner.rb
|
|
@@ -713,6 +726,7 @@ files:
|
|
|
713
726
|
- lib/rigor/inference/declaration_walk/errors.rb
|
|
714
727
|
- lib/rigor/inference/declaration_walk/shadow.rb
|
|
715
728
|
- lib/rigor/inference/declaration_walk/traversal.rb
|
|
729
|
+
- lib/rigor/inference/deep_erasure.rb
|
|
716
730
|
- lib/rigor/inference/def_handle.rb
|
|
717
731
|
- lib/rigor/inference/def_node_resolver.rb
|
|
718
732
|
- lib/rigor/inference/def_return_typer.rb
|
|
@@ -743,6 +757,8 @@ files:
|
|
|
743
757
|
- lib/rigor/inference/in_effect_refinements/walk.rb
|
|
744
758
|
- lib/rigor/inference/index_write_widening.rb
|
|
745
759
|
- lib/rigor/inference/indexed_narrowing.rb
|
|
760
|
+
- lib/rigor/inference/intervening_ivar_reset.rb
|
|
761
|
+
- lib/rigor/inference/ivar_writer_census.rb
|
|
746
762
|
- lib/rigor/inference/jump_targets.rb
|
|
747
763
|
- lib/rigor/inference/key_presence_guard.rb
|
|
748
764
|
- lib/rigor/inference/key_presence_guard/scan.rb
|
|
@@ -750,6 +766,7 @@ files:
|
|
|
750
766
|
- lib/rigor/inference/last_line/implicit_self.rb
|
|
751
767
|
- lib/rigor/inference/last_line/self_evidence.rb
|
|
752
768
|
- lib/rigor/inference/last_status.rb
|
|
769
|
+
- lib/rigor/inference/loop_value_record.rb
|
|
753
770
|
- lib/rigor/inference/macro_block_self_type.rb
|
|
754
771
|
- lib/rigor/inference/match_rebinding.rb
|
|
755
772
|
- lib/rigor/inference/match_rebinding/calls.rb
|
|
@@ -804,6 +821,7 @@ files:
|
|
|
804
821
|
- lib/rigor/inference/method_dispatcher/uri_folding.rb
|
|
805
822
|
- lib/rigor/inference/method_parameter_binder.rb
|
|
806
823
|
- lib/rigor/inference/module_function_state.rb
|
|
824
|
+
- lib/rigor/inference/module_function_state/spellings.rb
|
|
807
825
|
- lib/rigor/inference/multi_target_binder.rb
|
|
808
826
|
- lib/rigor/inference/mutation_rejoin.rb
|
|
809
827
|
- lib/rigor/inference/mutation_widening.rb
|
|
@@ -819,7 +837,11 @@ files:
|
|
|
819
837
|
- lib/rigor/inference/project_method_ownership.rb
|
|
820
838
|
- lib/rigor/inference/project_patched_definedness_guard.rb
|
|
821
839
|
- lib/rigor/inference/project_patched_methods.rb
|
|
840
|
+
- lib/rigor/inference/project_patched_mixins.rb
|
|
822
841
|
- lib/rigor/inference/project_patched_scanner.rb
|
|
842
|
+
- lib/rigor/inference/project_patched_visibility.rb
|
|
843
|
+
- lib/rigor/inference/project_seed_tables.rb
|
|
844
|
+
- lib/rigor/inference/project_yielder.rb
|
|
823
845
|
- lib/rigor/inference/protection_scanner.rb
|
|
824
846
|
- lib/rigor/inference/range_constant.rb
|
|
825
847
|
- lib/rigor/inference/rbs_type_translator.rb
|
|
@@ -829,6 +851,7 @@ files:
|
|
|
829
851
|
- lib/rigor/inference/refine_self.rb
|
|
830
852
|
- lib/rigor/inference/refined_dispatch.rb
|
|
831
853
|
- lib/rigor/inference/refined_dispatch/class_object.rb
|
|
854
|
+
- lib/rigor/inference/refined_dispatch/constructed_class.rb
|
|
832
855
|
- lib/rigor/inference/refined_dispatch/own_method.rb
|
|
833
856
|
- lib/rigor/inference/refinement_mutation.rb
|
|
834
857
|
- lib/rigor/inference/reflective_ivar_write.rb
|
|
@@ -838,12 +861,16 @@ files:
|
|
|
838
861
|
- lib/rigor/inference/scope_indexer.rb
|
|
839
862
|
- lib/rigor/inference/scope_indexer/certainty.rb
|
|
840
863
|
- lib/rigor/inference/scope_indexer/class_cvars_collector.rb
|
|
864
|
+
- lib/rigor/inference/scope_indexer/declared_ivar_types.rb
|
|
865
|
+
- lib/rigor/inference/scope_indexer/declared_param_writes.rb
|
|
841
866
|
- lib/rigor/inference/scope_indexer/def_nestings_collector.rb
|
|
842
867
|
- lib/rigor/inference/scope_indexer/layered_def_nestings.rb
|
|
843
868
|
- lib/rigor/inference/scope_indexer/member_layouts_collector.rb
|
|
844
869
|
- lib/rigor/inference/scope_indexer/mixin_accumulator.rb
|
|
845
870
|
- lib/rigor/inference/scope_indexer/superclasses_collector.rb
|
|
871
|
+
- lib/rigor/inference/scope_indexer/unseen_ivar_writers.rb
|
|
846
872
|
- lib/rigor/inference/self_call_ivar_writes.rb
|
|
873
|
+
- lib/rigor/inference/singleton_external_ahead.rb
|
|
847
874
|
- lib/rigor/inference/singleton_hook_decline.rb
|
|
848
875
|
- lib/rigor/inference/singleton_object_constant.rb
|
|
849
876
|
- lib/rigor/inference/statement_evaluator.rb
|
|
@@ -853,6 +880,7 @@ files:
|
|
|
853
880
|
- lib/rigor/inference/synthetic_method.rb
|
|
854
881
|
- lib/rigor/inference/synthetic_method_index.rb
|
|
855
882
|
- lib/rigor/inference/synthetic_method_scanner.rb
|
|
883
|
+
- lib/rigor/inference/synthetic_method_scanner/project_members.rb
|
|
856
884
|
- lib/rigor/inference/unknown_store_widening.rb
|
|
857
885
|
- lib/rigor/inference/unthreaded_rebinds.rb
|
|
858
886
|
- lib/rigor/inference/untyped_rejoin.rb
|
|
@@ -946,6 +974,7 @@ files:
|
|
|
946
974
|
- lib/rigor/reflection.rb
|
|
947
975
|
- lib/rigor/reflection/constant_ancestors.rb
|
|
948
976
|
- lib/rigor/reflection/constant_path.rb
|
|
977
|
+
- lib/rigor/rooted_glob.rb
|
|
949
978
|
- lib/rigor/runtime/jit.rb
|
|
950
979
|
- lib/rigor/scope.rb
|
|
951
980
|
- lib/rigor/scope/discovery_index.rb
|
|
@@ -969,6 +998,7 @@ files:
|
|
|
969
998
|
- lib/rigor/sig_gen/skip_reason_catalog.rb
|
|
970
999
|
- lib/rigor/sig_gen/superclass_spelling.rb
|
|
971
1000
|
- lib/rigor/sig_gen/type_elaborator.rb
|
|
1001
|
+
- lib/rigor/sig_gen/write_reporter.rb
|
|
972
1002
|
- lib/rigor/sig_gen/write_result.rb
|
|
973
1003
|
- lib/rigor/sig_gen/writer.rb
|
|
974
1004
|
- lib/rigor/signature_path_audit.rb
|
|
@@ -1290,6 +1320,7 @@ files:
|
|
|
1290
1320
|
- sig/rigor/plugin/type_node_resolver.rbs
|
|
1291
1321
|
- sig/rigor/rbs_extended.rbs
|
|
1292
1322
|
- sig/rigor/reflection.rbs
|
|
1323
|
+
- sig/rigor/rooted_glob.rbs
|
|
1293
1324
|
- sig/rigor/scope.rbs
|
|
1294
1325
|
- sig/rigor/sig_gen/skip_reason_catalog.rbs
|
|
1295
1326
|
- sig/rigor/source.rbs
|