From 031fb1c707cfc564cc61e95faa3f6042ef20f336 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 29 May 2026 23:19:18 +0000 Subject: [PATCH 1/7] Bump the bundler group across 1 directory with 9 updates Bumps the bundler group with 7 updates in the / directory: | Package | From | To | | --- | --- | --- | | [packwerk](https://github.com/Shopify/packwerk) | `3.2.3` | `3.3.0` | | [minitest](https://github.com/minitest/minitest) | `6.0.2` | `6.0.6` | | [mocha](https://github.com/freerange/mocha) | `3.0.2` | `3.1.0` | | [rake](https://github.com/ruby/rake) | `13.3.1` | `13.4.2` | | [rubocop](https://github.com/rubocop/rubocop) | `1.85.1` | `1.86.2` | | [rubocop-gusto](https://github.com/gusto/rubocop-gusto) | `10.6.0` | `10.9.3` | | [sorbet](https://github.com/sorbet/sorbet) | `0.6.13258` | `0.6.13261` | Updates `packwerk` from 3.2.3 to 3.3.0 - [Release notes](https://github.com/Shopify/packwerk/releases) - [Commits](https://github.com/Shopify/packwerk/compare/v3.2.3...v3.3.0) Updates `railties` from 8.1.2 to 8.1.3 - [Release notes](https://github.com/rails/rails/releases) - [Changelog](https://github.com/rails/rails/blob/v8.1.3/railties/CHANGELOG.md) - [Commits](https://github.com/rails/rails/compare/v8.1.2...v8.1.3) Updates `zeitwerk` from 2.7.5 to 2.8.2 - [Changelog](https://github.com/fxn/zeitwerk/blob/main/CHANGELOG.md) - [Commits](https://github.com/fxn/zeitwerk/compare/v2.7.5...v2.8.2) Updates `minitest` from 6.0.2 to 6.0.6 - [Changelog](https://github.com/minitest/minitest/blob/master/History.rdoc) - [Commits](https://github.com/minitest/minitest/compare/v6.0.2...v6.0.6) Updates `mocha` from 3.0.2 to 3.1.0 - [Changelog](https://github.com/freerange/mocha/blob/main/RELEASE.md) - [Commits](https://github.com/freerange/mocha/compare/v3.0.2...v3.1.0) Updates `rake` from 13.3.1 to 13.4.2 - [Release notes](https://github.com/ruby/rake/releases) - [Changelog](https://github.com/ruby/rake/blob/master/History.rdoc) - [Commits](https://github.com/ruby/rake/compare/v13.3.1...v13.4.2) Updates `rubocop` from 1.85.1 to 1.86.2 - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.85.1...v1.86.2) Updates `rubocop-gusto` from 10.6.0 to 10.9.3 - [Release notes](https://github.com/gusto/rubocop-gusto/releases) - [Changelog](https://github.com/Gusto/rubocop-gusto/blob/main/CHANGELOG.md) - [Commits](https://github.com/gusto/rubocop-gusto/compare/v10.6.0...v10.9.3) Updates `sorbet` from 0.6.13258 to 0.6.13261 - [Release notes](https://github.com/sorbet/sorbet/releases) - [Commits](https://github.com/sorbet/sorbet/commits) --- updated-dependencies: - dependency-name: packwerk dependency-version: 3.3.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: bundler - dependency-name: railties dependency-version: 8.1.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: bundler - dependency-name: zeitwerk dependency-version: 2.8.2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: bundler - dependency-name: minitest dependency-version: 6.0.6 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: bundler - dependency-name: mocha dependency-version: 3.1.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: bundler - dependency-name: rake dependency-version: 13.4.2 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: bundler - dependency-name: rubocop dependency-version: 1.86.2 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: bundler - dependency-name: rubocop-gusto dependency-version: 10.9.3 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: bundler - dependency-name: sorbet dependency-version: 0.6.13261 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: bundler ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 83 +++++++++++++++++++++++----------------------------- 1 file changed, 37 insertions(+), 46 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index a5c353b..3a10120 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -18,9 +18,9 @@ PATH GEM remote: https://rubygems.org/ specs: - actionpack (8.1.2) - actionview (= 8.1.2) - activesupport (= 8.1.2) + actionpack (8.1.3) + actionview (= 8.1.3) + activesupport (= 8.1.3) nokogiri (>= 1.8.5) rack (>= 2.2.4) rack-session (>= 1.0.1) @@ -28,13 +28,13 @@ GEM rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) useragent (~> 0.16) - actionview (8.1.2) - activesupport (= 8.1.2) + actionview (8.1.3) + activesupport (= 8.1.3) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activesupport (8.1.2) + activesupport (8.1.3) base64 bigdecimal concurrent-ruby (~> 1.0, >= 1.3.1) @@ -47,8 +47,6 @@ GEM securerandom (>= 0.3) tzinfo (~> 2.0, >= 2.0.5) uri (>= 0.13.1) - addressable (2.8.9) - public_suffix (>= 2.0.2, < 8.0) ast (2.4.3) base64 (0.3.0) benchmark (0.5.0) @@ -59,7 +57,7 @@ GEM erubi (~> 1.4) parser (>= 2.4) smart_properties - bigdecimal (4.0.1) + bigdecimal (4.1.2) builder (3.3.0) coderay (1.1.3) concurrent-ruby (1.3.6) @@ -78,44 +76,39 @@ GEM prism (>= 1.3.0) rdoc (>= 4.0.0) reline (>= 0.4.2) - json (2.18.1) - json-schema (6.1.0) - addressable (~> 2.8) - bigdecimal (>= 3.1, < 5) + json (2.19.7) language_server-protocol (3.17.0.5) lint_roller (1.1.0) logger (1.7.0) - loofah (2.25.0) + loofah (2.25.1) crass (~> 1.0.2) nokogiri (>= 1.12.0) - mcp (0.8.0) - json-schema (>= 4.1) method_source (1.1.0) - minitest (6.0.2) + minitest (6.0.6) drb (~> 2.0) prism (~> 1.5) - mocha (3.0.2) + mocha (3.1.0) ruby2_keywords (>= 0.0.5) netrc (0.11.0) - nokogiri (1.19.1-arm64-darwin) + nokogiri (1.19.3-arm64-darwin) racc (~> 1.4) - nokogiri (1.19.1-x86_64-darwin) + nokogiri (1.19.3-x86_64-darwin) racc (~> 1.4) - nokogiri (1.19.1-x86_64-linux-gnu) + nokogiri (1.19.3-x86_64-linux-gnu) racc (~> 1.4) - packwerk (3.2.3) + packwerk (3.3.0) activesupport (>= 6.0) ast + benchmark better_html bundler constant_resolver (>= 0.3) - parallel + parallel (< 2) parser - prism (>= 0.25.0) - sorbet-runtime (>= 0.5.9914) + prism (>= 1.4.0) zeitwerk (>= 2.6.1) parallel (1.28.0) - parser (3.3.10.2) + parser (3.3.11.1) ast (~> 2.4.1) racc pp (0.6.3) @@ -129,7 +122,6 @@ GEM psych (5.3.1) date stringio - public_suffix (7.0.5) racc (1.8.1) rack (3.2.5) rack-session (2.1.1) @@ -146,9 +138,9 @@ GEM rails-html-sanitizer (1.7.0) loofah (~> 2.25) nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) - railties (8.1.2) - actionpack (= 8.1.2) - activesupport (= 8.1.2) + railties (8.1.3) + actionpack (= 8.1.3) + activesupport (= 8.1.3) irb (~> 1.13) rackup (>= 1.0.0) rake (>= 12.2) @@ -156,7 +148,7 @@ GEM tsort (>= 0.2) zeitwerk (~> 2.6) rainbow (3.1.1) - rake (13.3.1) + rake (13.4.2) rbi (0.3.12) prism (~> 1.0) rbs (>= 4.0.1) @@ -168,27 +160,26 @@ GEM erb psych (>= 4.0.0) tsort - regexp_parser (2.11.3) + regexp_parser (2.12.0) reline (0.6.3) io-console (~> 0.5) require-hooks (0.4.0) rexml (3.4.4) - rubocop (1.85.1) + rubocop (1.86.2) json (~> 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) - mcp (~> 0.6) - parallel (~> 1.10) + parallel (>= 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.9.3, < 3.0) rubocop-ast (>= 1.49.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.49.0) + rubocop-ast (1.49.1) parser (>= 3.3.7.2) prism (~> 1.7) - rubocop-gusto (10.6.0) + rubocop-gusto (10.9.3) lint_roller rubocop (>= 1.76) rubocop-performance @@ -213,14 +204,14 @@ GEM rubydex (0.2.5-x86_64-linux) securerandom (0.4.1) smart_properties (1.17.0) - sorbet (0.6.13258) - sorbet-static (= 0.6.13258) - sorbet-runtime (0.6.13258) - sorbet-static (0.6.13258-universal-darwin) - sorbet-static (0.6.13258-x86_64-linux) - sorbet-static-and-runtime (0.6.13258) - sorbet (= 0.6.13258) - sorbet-runtime (= 0.6.13258) + sorbet (0.6.13261) + sorbet-static (= 0.6.13261) + sorbet-runtime (0.6.13261) + sorbet-static (0.6.13261-universal-darwin) + sorbet-static (0.6.13261-x86_64-linux) + sorbet-static-and-runtime (0.6.13261) + sorbet (= 0.6.13261) + sorbet-runtime (= 0.6.13261) spoom (1.7.16) erubi (>= 1.10.0) prism (>= 0.28.0) @@ -251,7 +242,7 @@ GEM unicode-emoji (4.2.0) uri (1.1.1) useragent (0.16.11) - zeitwerk (2.7.5) + zeitwerk (2.8.2) PLATFORMS arm64-darwin From 74b186e06b97730ef538b36b47c2694824f659f8 Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger Date: Fri, 29 May 2026 16:23:31 -0700 Subject: [PATCH 2/7] Add workflow to regenerate gem RBIs on Dependabot PRs Dependency bumps can change gem APIs, so this workflow runs 'bundle exec tapioca gems' on any dependabot/* PR and pushes the regenerated sorbet/rbi/gems files back onto the PR branch. --- .github/workflows/dependabot-tapioca.yml | 36 ++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/dependabot-tapioca.yml diff --git a/.github/workflows/dependabot-tapioca.yml b/.github/workflows/dependabot-tapioca.yml new file mode 100644 index 0000000..0a25b7b --- /dev/null +++ b/.github/workflows/dependabot-tapioca.yml @@ -0,0 +1,36 @@ +name: Update Dependabot RBIs + +# Dependency bumps can change gem APIs, so regenerate the Sorbet gem RBIs +# (`bundle exec tapioca gems`) and push the result back onto the Dependabot PR. +on: + pull_request: + +permissions: + contents: write + +jobs: + tapioca-gems: + name: Regenerate gem RBIs + if: startsWith(github.head_ref, 'dependabot/') + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + with: + ref: ${{ github.head_ref }} + - uses: ruby/setup-ruby@4c56a21280b36d862b5fc31348f463d60bdc55d5 # v1 + with: + ruby-version: '3.4' + bundler-cache: true + - name: Regenerate gem RBIs + run: bundle exec tapioca gems + - name: Commit and push RBI changes + run: | + if [[ -z "$(git status --porcelain sorbet/rbi)" ]]; then + echo "No RBI changes to commit." + exit 0 + fi + git config user.name 'github-actions[bot]' + git config user.email '41898282+github-actions[bot]@users.noreply.github.com' + git add sorbet/rbi + git commit -m "Regenerate gem RBIs [dependabot skip]" + git push From 0767bc5e9888da834a75abeb0de1af354954135f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 29 May 2026 23:24:10 +0000 Subject: [PATCH 3/7] Regenerate gem RBIs [dependabot skip] --- ...ionpack@8.1.2.rbi => actionpack@8.1.3.rbi} | 93 +- ...ionview@8.1.2.rbi => actionview@8.1.3.rbi} | 72 +- ...port@8.1.2.rbi => activesupport@8.1.3.rbi} | 191 +- sorbet/rbi/gems/addressable@2.8.9.rbi | 9 - ...decimal@4.0.1.rbi => bigdecimal@4.1.2.rbi} | 60 +- sorbet/rbi/gems/json-schema@6.1.0.rbi | 9 - .../gems/{json@2.18.1.rbi => json@2.19.7.rbi} | 323 +-- .../{loofah@2.25.0.rbi => loofah@2.25.1.rbi} | 10 +- sorbet/rbi/gems/mcp@0.8.0.rbi | 9 - ...{minitest@6.0.2.rbi => minitest@6.0.6.rbi} | 92 +- .../gems/{mocha@3.0.2.rbi => mocha@3.1.0.rbi} | 107 +- ...okogiri@1.19.1.rbi => nokogiri@1.19.3.rbi} | 236 +- ...{packwerk@3.2.3.rbi => packwerk@3.3.0.rbi} | 938 +++--- ...arser@3.3.10.2.rbi => parser@3.3.11.1.rbi} | 0 sorbet/rbi/gems/public_suffix@7.0.5.rbi | 9 - ...{railties@8.1.2.rbi => railties@8.1.3.rbi} | 62 +- .../gems/{rake@13.3.1.rbi => rake@13.4.2.rbi} | 315 +- ...er@2.11.3.rbi => regexp_parser@2.12.0.rbi} | 183 +- ...-ast@1.49.0.rbi => rubocop-ast@1.49.1.rbi} | 204 +- ...to@10.6.0.rbi => rubocop-gusto@10.9.3.rbi} | 240 +- ...7d3cb5a41cee8207b3cd00c21f5ef43f7140fd.rbi | 2558 +++++++++++++++++ sorbet/rbi/gems/rubocop-sorbet@0.12.0.rbi | 9 - ...{rubocop@1.85.1.rbi => rubocop@1.86.2.rbi} | 2395 ++++++++------- ...{zeitwerk@2.7.5.rbi => zeitwerk@2.8.2.rbi} | 364 ++- 24 files changed, 5995 insertions(+), 2493 deletions(-) rename sorbet/rbi/gems/{actionpack@8.1.2.rbi => actionpack@8.1.3.rbi} (99%) rename sorbet/rbi/gems/{actionview@8.1.2.rbi => actionview@8.1.3.rbi} (99%) rename sorbet/rbi/gems/{activesupport@8.1.2.rbi => activesupport@8.1.3.rbi} (99%) delete mode 100644 sorbet/rbi/gems/addressable@2.8.9.rbi rename sorbet/rbi/gems/{bigdecimal@4.0.1.rbi => bigdecimal@4.1.2.rbi} (85%) delete mode 100644 sorbet/rbi/gems/json-schema@6.1.0.rbi rename sorbet/rbi/gems/{json@2.18.1.rbi => json@2.19.7.rbi} (92%) rename sorbet/rbi/gems/{loofah@2.25.0.rbi => loofah@2.25.1.rbi} (99%) delete mode 100644 sorbet/rbi/gems/mcp@0.8.0.rbi rename sorbet/rbi/gems/{minitest@6.0.2.rbi => minitest@6.0.6.rbi} (95%) rename sorbet/rbi/gems/{mocha@3.0.2.rbi => mocha@3.1.0.rbi} (98%) rename sorbet/rbi/gems/{nokogiri@1.19.1.rbi => nokogiri@1.19.3.rbi} (97%) rename sorbet/rbi/gems/{packwerk@3.2.3.rbi => packwerk@3.3.0.rbi} (75%) rename sorbet/rbi/gems/{parser@3.3.10.2.rbi => parser@3.3.11.1.rbi} (100%) delete mode 100644 sorbet/rbi/gems/public_suffix@7.0.5.rbi rename sorbet/rbi/gems/{railties@8.1.2.rbi => railties@8.1.3.rbi} (98%) rename sorbet/rbi/gems/{rake@13.3.1.rbi => rake@13.4.2.rbi} (93%) rename sorbet/rbi/gems/{regexp_parser@2.11.3.rbi => regexp_parser@2.12.0.rbi} (98%) rename sorbet/rbi/gems/{rubocop-ast@1.49.0.rbi => rubocop-ast@1.49.1.rbi} (98%) rename sorbet/rbi/gems/{rubocop-gusto@10.6.0.rbi => rubocop-gusto@10.9.3.rbi} (84%) create mode 100644 sorbet/rbi/gems/rubocop-sorbet@0.12.0-7b7d3cb5a41cee8207b3cd00c21f5ef43f7140fd.rbi delete mode 100644 sorbet/rbi/gems/rubocop-sorbet@0.12.0.rbi rename sorbet/rbi/gems/{rubocop@1.85.1.rbi => rubocop@1.86.2.rbi} (97%) rename sorbet/rbi/gems/{zeitwerk@2.7.5.rbi => zeitwerk@2.8.2.rbi} (74%) diff --git a/sorbet/rbi/gems/actionpack@8.1.2.rbi b/sorbet/rbi/gems/actionpack@8.1.3.rbi similarity index 99% rename from sorbet/rbi/gems/actionpack@8.1.2.rbi rename to sorbet/rbi/gems/actionpack@8.1.3.rbi index a355e70..c1570a1 100644 --- a/sorbet/rbi/gems/actionpack@8.1.2.rbi +++ b/sorbet/rbi/gems/actionpack@8.1.3.rbi @@ -12419,7 +12419,7 @@ module ActionDispatch::Integration::RequestHelpers def put(path, **args); end end -# pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:334 +# pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:335 module ActionDispatch::Integration::Runner include ::ActionDispatch::Assertions::RoutingAssertions include ::ActionDispatch::Assertions::ResponseAssertions @@ -12429,55 +12429,55 @@ module ActionDispatch::Integration::Runner include ::ActionDispatch::Assertions extend ::ActionDispatch::Assertions::RoutingAssertions::ClassMethods - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:342 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:343 def initialize(*args, &blk); end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:339 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:340 def app; end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:412 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:413 def assertions; end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:416 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:417 def assertions=(assertions); end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:384 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:385 def assigns(*_arg0, **_arg1, &_arg2); end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:347 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:348 def before_setup; end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:384 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:385 def cookies(*_arg0, **_arg1, &_arg2); end # Copy the instance variables from the current session instance into the test # instance. # - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:422 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:423 def copy_session_variables!; end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:362 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:363 def create_session(app); end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:428 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:429 def default_url_options; end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:432 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:433 def default_url_options=(options); end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:384 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:385 def delete(*_arg0, **_arg1, &_arg2); end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:384 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:385 def follow_redirect!(*_arg0, **_arg1, &_arg2); end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:384 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:385 def get(*_arg0, **_arg1, &_arg2); end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:384 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:385 def head(*_arg0, **_arg1, &_arg2); end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:352 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:353 def integration_session; end # Open a new session instance. If a block is given, the new session is yielded @@ -12490,45 +12490,45 @@ module ActionDispatch::Integration::Runner # By default, a single session is automatically created for you, but you can use # this method to open multiple sessions that ought to be tested simultaneously. # - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:404 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:405 def open_session; end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:384 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:385 def patch(*_arg0, **_arg1, &_arg2); end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:384 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:385 def post(*_arg0, **_arg1, &_arg2); end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:384 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:385 def put(*_arg0, **_arg1, &_arg2); end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:374 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:375 def remove!; end # Reset the current session. This is useful for testing multiple sessions in a # single test case. # - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:358 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:359 def reset!; end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:340 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:341 def root_session; end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:340 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:341 def root_session=(_arg0); end private # Delegate unhandled messages to the current session instance. # - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:442 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:443 def method_missing(method, *_arg1, **_arg2, &_arg3); end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:437 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:438 def respond_to_missing?(method, _); end end -# pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:337 +# pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:338 ActionDispatch::Integration::Runner::APP_SESSIONS = T.let(T.unsafe(nil), Hash) # An instance of this class represents a set of requests and responses performed @@ -12605,7 +12605,7 @@ class ActionDispatch::Integration::Session # # session.host! "www.example.com" # - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:315 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:316 def host!(_arg0); end # The hostname used in the last request. @@ -12624,7 +12624,7 @@ class ActionDispatch::Integration::Session # Returns `true` if the session is mimicking a secure HTTPS request. # # if session.https? - # ... + # # ... # end # # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:189 @@ -12646,7 +12646,7 @@ class ActionDispatch::Integration::Session # * `env`: Additional env to pass, as a Hash. The headers will be merged into # the Rack env hash. # * `xhr`: Set to `true` if you want to make an Ajax request. Adds request - # headers characteristic of XMLHttpRequest e.g. HTTP_X_REQUESTED_WITH. The + # headers characteristic of `XMLHttpRequest`, e.g. `HTTP_X_REQUESTED_WITH`. The # headers will be merged into the Rack env hash. # * `as`: Used for encoding the request with different content type. Supports # `:json` by default and will set the appropriate request headers. The @@ -12661,12 +12661,13 @@ class ActionDispatch::Integration::Session # This method returns the response status, after performing the request. # Furthermore, if this method was called from an ActionDispatch::IntegrationTest # object, then that object's `@response` instance variable will point to a - # Response object which one can use to inspect the details of the response. + # ActionDispatch::TestResponse object which one can use to inspect the details of the response. # # Example: + # # process :get, '/author', params: { since: 201501011400 } # - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:225 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:226 def process(method, path, params: T.unsafe(nil), headers: T.unsafe(nil), env: T.unsafe(nil), xhr: T.unsafe(nil), as: T.unsafe(nil)); end # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:97 @@ -12721,13 +12722,13 @@ class ActionDispatch::Integration::Session private - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:318 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:319 def _mock_session; end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:326 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:327 def build_expanded_path(path); end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:322 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:323 def build_full_uri(path, env); end class << self @@ -12948,7 +12949,7 @@ ActionDispatch::Integration::Session::DEFAULT_HOST = T.let(T.unsafe(nil), String # Consult the [Rails Testing Guide](https://guides.rubyonrails.org/testing.html) # for more. # -# pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:649 +# pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:650 class ActionDispatch::IntegrationTest < ::ActiveSupport::TestCase include ::ActionDispatch::TestProcess::FixtureFile include ::ActionDispatch::Assertions::RoutingAssertions @@ -12969,7 +12970,7 @@ class ActionDispatch::IntegrationTest < ::ActiveSupport::TestCase extend ::ActionDispatch::Assertions::RoutingAssertions::WithIntegrationRouting::ClassMethods end -# pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:659 +# pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:660 module ActionDispatch::IntegrationTest::Behavior include ::ActionDispatch::Assertions::RoutingAssertions include ::ActionDispatch::Assertions::ResponseAssertions @@ -12988,30 +12989,30 @@ module ActionDispatch::IntegrationTest::Behavior mixes_in_class_methods ::ActionDispatch::IntegrationTest::Behavior::ClassMethods mixes_in_class_methods ::ActionDispatch::Assertions::RoutingAssertions::WithIntegrationRouting::ClassMethods - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:692 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:693 def app; end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:696 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:697 def document_root_element; end end -# pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:674 +# pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:675 module ActionDispatch::IntegrationTest::Behavior::ClassMethods - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:675 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:676 def app; end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:683 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:684 def app=(app); end - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:687 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:688 def register_encoder(*args, **options); end end -# pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:652 +# pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:653 module ActionDispatch::IntegrationTest::UrlOptions extend ::ActiveSupport::Concern - # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:654 + # pkg:gem/actionpack#lib/action_dispatch/testing/integration.rb:655 def url_options; end end diff --git a/sorbet/rbi/gems/actionview@8.1.2.rbi b/sorbet/rbi/gems/actionview@8.1.3.rbi similarity index 99% rename from sorbet/rbi/gems/actionview@8.1.2.rbi rename to sorbet/rbi/gems/actionview@8.1.3.rbi index 4fc2463..286eb13 100644 --- a/sorbet/rbi/gems/actionview@8.1.2.rbi +++ b/sorbet/rbi/gems/actionview@8.1.3.rbi @@ -8772,10 +8772,10 @@ module ActionView::Helpers::TagHelper # cdata_section("hello]]>world") # # => world]]> # - # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:555 + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:558 def cdata_section(content); end - # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:540 + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:543 def class_names(*args); end # Returns an HTML block tag of type +name+ surrounding the +content+. Add @@ -8807,7 +8807,7 @@ module ActionView::Helpers::TagHelper # <% end -%> # # =>
Hello world!
# - # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:513 + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:516 def content_tag(name, content_or_options_with_block = T.unsafe(nil), options = T.unsafe(nil), escape = T.unsafe(nil), &block); end # Returns an escaped version of +html+ without affecting existing escaped entities. @@ -8818,7 +8818,7 @@ module ActionView::Helpers::TagHelper # escape_once("<< Accept & Checkout") # # => "<< Accept & Checkout" # - # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:567 + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:570 def escape_once(html); end # Returns an HTML tag. @@ -8968,7 +8968,7 @@ module ActionView::Helpers::TagHelper # tag("div", class: { highlight: current_user.admin? }) # # =>
# - # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:476 + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:479 def tag(name = T.unsafe(nil), options = T.unsafe(nil), open = T.unsafe(nil), escape = T.unsafe(nil)); end # Returns a string of tokens built from +args+. @@ -8983,25 +8983,25 @@ module ActionView::Helpers::TagHelper # token_list(nil, false, 123, "", "foo", { bar: true }) # # => "123 foo bar" # - # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:535 + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:538 def token_list(*args); end private - # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:577 + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:580 def build_tag_values(*args); end - # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:572 + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:575 def ensure_valid_html5_tag_name(name); end - # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:597 + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:600 def tag_builder; end class << self - # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:595 + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:598 def build_tag_values(*args); end - # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:575 + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:578 def ensure_valid_html5_tag_name(name); end end end @@ -9427,25 +9427,25 @@ class ActionView::Helpers::TagHelper::TagBuilder private - # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:288 + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:291 def boolean_tag_option(key); end - # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:321 + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:324 def method_missing(called, *args, escape: T.unsafe(nil), **options, &block); end - # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:309 + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:312 def prefix_tag_option(prefix, key, value, escape); end - # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:317 + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:320 def respond_to_missing?(*args); end - # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:284 + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:287 def self_closing_tag_string(name, options, escape = T.unsafe(nil), tag_suffix = T.unsafe(nil)); end - # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:292 + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:295 def tag_option(key, value, escape); end - # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:278 + # pkg:gem/actionview#lib/action_view/helpers/tag_helper.rb:281 def tag_string(name, content = T.unsafe(nil), options, escape: T.unsafe(nil), &block); end class << self @@ -13007,7 +13007,7 @@ end # * Support streaming from child templates, partials and so on. # * Rack::Cache needs to support streaming bodies # -# pkg:gem/actionview#lib/action_view/renderer/streaming_template_renderer.rb:9 +# pkg:gem/actionview#lib/action_view/renderer/streaming_template_renderer.rb:12 class ActionView::StreamingTemplateRenderer < ::ActionView::TemplateRenderer # For streaming, instead of rendering a given a template, we return a Body # object that responds to each. This object is initialized with a block @@ -13160,13 +13160,13 @@ class ActionView::Template # to ensure that references to the template object can be marshalled as well. This means forgoing # the marshalling of the compiler mutex and instantiating that again on unmarshalling. # - # pkg:gem/actionview#lib/action_view/template.rb:387 + # pkg:gem/actionview#lib/action_view/template.rb:393 def marshal_dump; end - # pkg:gem/actionview#lib/action_view/template.rb:391 + # pkg:gem/actionview#lib/action_view/template.rb:397 def marshal_load(array); end - # pkg:gem/actionview#lib/action_view/template.rb:396 + # pkg:gem/actionview#lib/action_view/template.rb:402 def method_name; end # Render a template. If the template was not compiled yet, it is done @@ -13203,7 +13203,7 @@ class ActionView::Template # Returns whether a template is using strict locals. # - # pkg:gem/actionview#lib/action_view/template.rb:380 + # pkg:gem/actionview#lib/action_view/template.rb:386 def strict_locals?; end # Returns whether the underlying handler supports streaming. If so, @@ -13244,44 +13244,44 @@ class ActionView::Template # In general, this means that templates will be UTF-8 inside of Rails, # regardless of the original source encoding. # - # pkg:gem/actionview#lib/action_view/template.rb:500 + # pkg:gem/actionview#lib/action_view/template.rb:506 def compile(mod); end # Compile a template. This method ensures a template is compiled # just once and removes the source after it is compiled. # - # pkg:gem/actionview#lib/action_view/template.rb:418 + # pkg:gem/actionview#lib/action_view/template.rb:424 def compile!(view); end # This method compiles the source of the template. The compilation of templates # involves setting strict_locals! if applicable, encoding the template, and setting # frozen string literal. # - # pkg:gem/actionview#lib/action_view/template.rb:443 + # pkg:gem/actionview#lib/action_view/template.rb:449 def compiled_source; end - # pkg:gem/actionview#lib/action_view/template.rb:405 + # pkg:gem/actionview#lib/action_view/template.rb:411 def find_node_by_id(node, node_id); end - # pkg:gem/actionview#lib/action_view/template.rb:549 + # pkg:gem/actionview#lib/action_view/template.rb:555 def handle_render_error(view, e); end - # pkg:gem/actionview#lib/action_view/template.rb:574 + # pkg:gem/actionview#lib/action_view/template.rb:580 def identifier_method_name; end - # pkg:gem/actionview#lib/action_view/template.rb:578 + # pkg:gem/actionview#lib/action_view/template.rb:584 def instrument(action, &block); end - # pkg:gem/actionview#lib/action_view/template.rb:586 + # pkg:gem/actionview#lib/action_view/template.rb:592 def instrument_payload; end - # pkg:gem/actionview#lib/action_view/template.rb:582 + # pkg:gem/actionview#lib/action_view/template.rb:588 def instrument_render_template(&block); end - # pkg:gem/actionview#lib/action_view/template.rb:561 + # pkg:gem/actionview#lib/action_view/template.rb:567 def locals_code; end - # pkg:gem/actionview#lib/action_view/template.rb:541 + # pkg:gem/actionview#lib/action_view/template.rb:547 def offset; end class << self @@ -13658,7 +13658,7 @@ class ActionView::Template::Handlers::Raw def call(template, source); end end -# pkg:gem/actionview#lib/action_view/template/inline.rb:5 +# pkg:gem/actionview#lib/action_view/template/inline.rb:7 class ActionView::Template::Inline < ::ActionView::Template # pkg:gem/actionview#lib/action_view/template/inline.rb:16 def compile(mod); end @@ -13676,7 +13676,7 @@ ActionView::Template::LEADING_ENCODING_REGEXP = T.let(T.unsafe(nil), Regexp) # pkg:gem/actionview#lib/action_view/template.rb:197 ActionView::Template::NONE = T.let(T.unsafe(nil), Object) -# pkg:gem/actionview#lib/action_view/template.rb:558 +# pkg:gem/actionview#lib/action_view/template.rb:564 ActionView::Template::RUBY_RESERVED_KEYWORDS = T.let(T.unsafe(nil), Array) # = Action View RawFile Template diff --git a/sorbet/rbi/gems/activesupport@8.1.2.rbi b/sorbet/rbi/gems/activesupport@8.1.3.rbi similarity index 99% rename from sorbet/rbi/gems/activesupport@8.1.2.rbi rename to sorbet/rbi/gems/activesupport@8.1.3.rbi index 0b0508f..63e74e1 100644 --- a/sorbet/rbi/gems/activesupport@8.1.2.rbi +++ b/sorbet/rbi/gems/activesupport@8.1.3.rbi @@ -5597,7 +5597,7 @@ end # pkg:gem/activesupport#lib/active_support/core_ext/enumerable.rb:25 ActiveSupport::EnumerableCoreExt::SoleItemExpectedError = Enumerable::SoleItemExpectedError -# pkg:gem/activesupport#lib/active_support/environment_inquirer.rb:7 +# pkg:gem/activesupport#lib/active_support/environment_inquirer.rb:9 class ActiveSupport::EnvironmentInquirer < ::ActiveSupport::StringInquirer # pkg:gem/activesupport#lib/active_support/environment_inquirer.rb:15 def initialize(env); end @@ -6332,42 +6332,45 @@ end # pkg:gem/activesupport#lib/active_support/execution_context.rb:4 module ActiveSupport::ExecutionContext class << self - # pkg:gem/activesupport#lib/active_support/execution_context.rb:69 + # pkg:gem/activesupport#lib/active_support/execution_context.rb:76 def []=(key, value); end - # pkg:gem/activesupport#lib/active_support/execution_context.rb:40 + # pkg:gem/activesupport#lib/active_support/execution_context.rb:47 def after_change(&block); end - # pkg:gem/activesupport#lib/active_support/execution_context.rb:96 + # pkg:gem/activesupport#lib/active_support/execution_context.rb:103 def clear; end - # pkg:gem/activesupport#lib/active_support/execution_context.rb:100 + # pkg:gem/activesupport#lib/active_support/execution_context.rb:111 def current_attributes_instances; end - # pkg:gem/activesupport#lib/active_support/execution_context.rb:38 + # pkg:gem/activesupport#lib/active_support/execution_context.rb:107 + def flush; end + + # pkg:gem/activesupport#lib/active_support/execution_context.rb:45 def nestable; end - # pkg:gem/activesupport#lib/active_support/execution_context.rb:38 + # pkg:gem/activesupport#lib/active_support/execution_context.rb:45 def nestable=(_arg0); end - # pkg:gem/activesupport#lib/active_support/execution_context.rb:87 + # pkg:gem/activesupport#lib/active_support/execution_context.rb:94 def pop; end - # pkg:gem/activesupport#lib/active_support/execution_context.rb:78 + # pkg:gem/activesupport#lib/active_support/execution_context.rb:85 def push; end # Updates the execution context. If a block is given, it resets the provided keys to their # previous value once the block exits. # - # pkg:gem/activesupport#lib/active_support/execution_context.rb:46 + # pkg:gem/activesupport#lib/active_support/execution_context.rb:53 def set(**options); end - # pkg:gem/activesupport#lib/active_support/execution_context.rb:74 + # pkg:gem/activesupport#lib/active_support/execution_context.rb:81 def to_h; end private - # pkg:gem/activesupport#lib/active_support/execution_context.rb:105 + # pkg:gem/activesupport#lib/active_support/execution_context.rb:116 def record; end end end @@ -6380,6 +6383,9 @@ class ActiveSupport::ExecutionContext::Record # pkg:gem/activesupport#lib/active_support/execution_context.rb:6 def current_attributes_instances; end + # pkg:gem/activesupport#lib/active_support/execution_context.rb:27 + def flush; end + # pkg:gem/activesupport#lib/active_support/execution_context.rb:21 def pop; end @@ -7267,7 +7273,7 @@ module ActiveSupport::Inflector # The capitalization of the first word can be turned off by setting the # +:capitalize+ option to false (default is true). # - # The trailing '_id' can be kept and capitalized by setting the + # The trailing '_id' can be kept by setting the # optional parameter +keep_id_suffix+ to true (default is false). # # humanize('employee_salary') # => "Employee salary" @@ -7292,7 +7298,7 @@ module ActiveSupport::Inflector # inflect.uncountable 'rails' # end # - # pkg:gem/activesupport#lib/active_support/inflector/inflections.rb:282 + # pkg:gem/activesupport#lib/active_support/inflector/inflections.rb:283 def inflections(locale = T.unsafe(nil)); end # Returns the suffix that should be added to a number to denote the position @@ -7945,22 +7951,22 @@ ActiveSupport::JSON::DATE_REGEX = T.let(T.unsafe(nil), Regexp) # pkg:gem/activesupport#lib/active_support/json/encoding.rb:59 module ActiveSupport::JSON::Encoding class << self - # pkg:gem/activesupport#lib/active_support/json/encoding.rb:239 + # pkg:gem/activesupport#lib/active_support/json/encoding.rb:241 def encode_without_escape(value); end - # pkg:gem/activesupport#lib/active_support/json/encoding.rb:235 + # pkg:gem/activesupport#lib/active_support/json/encoding.rb:237 def encode_without_options(value); end # If true, encode >, <, & as escaped unicode sequences (e.g. > as \u003e) # as a safety measure. # - # pkg:gem/activesupport#lib/active_support/json/encoding.rb:212 + # pkg:gem/activesupport#lib/active_support/json/encoding.rb:214 def escape_html_entities_in_json; end # If true, encode >, <, & as escaped unicode sequences (e.g. > as \u003e) # as a safety measure. # - # pkg:gem/activesupport#lib/active_support/json/encoding.rb:212 + # pkg:gem/activesupport#lib/active_support/json/encoding.rb:214 def escape_html_entities_in_json=(_arg0); end # If true, encode LINE SEPARATOR (U+2028) and PARAGRAPH SEPARATOR (U+2029) @@ -7969,7 +7975,7 @@ module ActiveSupport::JSON::Encoding # but that changed in ECMAScript 2019. As such it's no longer a concern in # modern browsers: https://caniuse.com/mdn-javascript_builtins_json_json_superset. # - # pkg:gem/activesupport#lib/active_support/json/encoding.rb:219 + # pkg:gem/activesupport#lib/active_support/json/encoding.rb:221 def escape_js_separators_in_json; end # If true, encode LINE SEPARATOR (U+2028) and PARAGRAPH SEPARATOR (U+2029) @@ -7978,40 +7984,40 @@ module ActiveSupport::JSON::Encoding # but that changed in ECMAScript 2019. As such it's no longer a concern in # modern browsers: https://caniuse.com/mdn-javascript_builtins_json_json_superset. # - # pkg:gem/activesupport#lib/active_support/json/encoding.rb:219 + # pkg:gem/activesupport#lib/active_support/json/encoding.rb:221 def escape_js_separators_in_json=(_arg0); end # Sets the encoder used by \Rails to encode Ruby objects into JSON strings # in +Object#to_json+ and +ActiveSupport::JSON.encode+. # - # pkg:gem/activesupport#lib/active_support/json/encoding.rb:227 + # pkg:gem/activesupport#lib/active_support/json/encoding.rb:229 def json_encoder; end - # pkg:gem/activesupport#lib/active_support/json/encoding.rb:229 + # pkg:gem/activesupport#lib/active_support/json/encoding.rb:231 def json_encoder=(encoder); end # Sets the precision of encoded time values. # Defaults to 3 (equivalent to millisecond precision) # - # pkg:gem/activesupport#lib/active_support/json/encoding.rb:223 + # pkg:gem/activesupport#lib/active_support/json/encoding.rb:225 def time_precision; end # Sets the precision of encoded time values. # Defaults to 3 (equivalent to millisecond precision) # - # pkg:gem/activesupport#lib/active_support/json/encoding.rb:223 + # pkg:gem/activesupport#lib/active_support/json/encoding.rb:225 def time_precision=(_arg0); end # If true, use ISO 8601 format for dates and times. Otherwise, fall back # to the Active Support legacy format. # - # pkg:gem/activesupport#lib/active_support/json/encoding.rb:208 + # pkg:gem/activesupport#lib/active_support/json/encoding.rb:210 def use_standard_json_time_format; end # If true, use ISO 8601 format for dates and times. Otherwise, fall back # to the Active Support legacy format. # - # pkg:gem/activesupport#lib/active_support/json/encoding.rb:208 + # pkg:gem/activesupport#lib/active_support/json/encoding.rb:210 def use_standard_json_time_format=(_arg0); end end end @@ -8027,12 +8033,12 @@ ActiveSupport::JSON::Encoding::HTML_ENTITIES_REGEX = T.let(T.unsafe(nil), Regexp # pkg:gem/activesupport#lib/active_support/json/encoding.rb:150 class ActiveSupport::JSON::Encoding::JSONGemCoderEncoder - # pkg:gem/activesupport#lib/active_support/json/encoding.rb:171 + # pkg:gem/activesupport#lib/active_support/json/encoding.rb:173 def initialize(options = T.unsafe(nil)); end # Encode the given object into a JSON string # - # pkg:gem/activesupport#lib/active_support/json/encoding.rb:183 + # pkg:gem/activesupport#lib/active_support/json/encoding.rb:185 def encode(value); end end @@ -10985,7 +10991,7 @@ class ActiveSupport::NumberHelper::NumberToDelimitedConverter < ::ActiveSupport: private - # pkg:gem/activesupport#lib/active_support/number_helper/number_to_delimited_converter.rb:25 + # pkg:gem/activesupport#lib/active_support/number_helper/number_to_delimited_converter.rb:40 def delimiter_pattern; end # pkg:gem/activesupport#lib/active_support/number_helper/number_to_delimited_converter.rb:17 @@ -11737,28 +11743,28 @@ class ActiveSupport::SafeBuffer < ::String # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:103 def []=(arg1, arg2, arg3 = T.unsafe(nil)); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:143 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:147 def as_json(*_arg0); end # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:87 def bytesplice(*args, value); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:157 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:161 def capitalize(*args, &block); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:157 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:161 def capitalize!(*args); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:157 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:161 def chomp(*args, &block); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:157 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:161 def chomp!(*args); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:157 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:161 def chop(*args, &block); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:157 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:161 def chop!(*args); end # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:59 @@ -11767,55 +11773,55 @@ class ActiveSupport::SafeBuffer < ::String # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:79 def concat(value); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:157 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:161 def delete(*args, &block); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:157 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:161 def delete!(*args); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:157 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:161 def delete_prefix(*args, &block); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:157 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:161 def delete_prefix!(*args); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:157 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:161 def delete_suffix(*args, &block); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:157 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:161 def delete_suffix!(*args); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:157 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:161 def downcase(*args, &block); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:157 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:161 def downcase!(*args); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:151 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:155 def encode_with(coder); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:171 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:175 def gsub(*args, &block); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:171 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:175 def gsub!(*args, &block); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:135 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:139 def html_safe?; end # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:91 def insert(index, value); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:157 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:161 def lstrip(*args, &block); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:157 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:161 def lstrip!(*args); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:157 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:161 def next(*args, &block); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:157 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:161 def next!(*args); end # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:95 @@ -11824,25 +11830,25 @@ class ActiveSupport::SafeBuffer < ::String # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:99 def replace(value); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:157 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:161 def reverse(*args, &block); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:157 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:161 def reverse!(*args); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:157 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:161 def rstrip(*args, &block); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:157 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:161 def rstrip!(*args); end # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:65 def safe_concat(value); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:157 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:161 def scrub(*args, &block); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:157 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:161 def scrub!(*args); end # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:49 @@ -11851,72 +11857,77 @@ class ActiveSupport::SafeBuffer < ::String # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:51 def slice!(*args); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:157 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:161 def squeeze(*args, &block); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:157 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:161 def squeeze!(*args); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:157 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:161 def strip(*args, &block); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:157 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:161 def strip!(*args); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:171 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:175 def sub(*args, &block); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:171 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:175 def sub!(*args, &block); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:157 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:161 def succ(*args, &block); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:157 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:161 def succ!(*args); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:157 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:161 def swapcase(*args, &block); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:157 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:161 def swapcase!(*args); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:147 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:151 def to_param; end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:139 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:143 def to_s; end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:157 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:161 def tr(*args, &block); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:157 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:161 def tr!(*args); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:157 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:161 def tr_s(*args, &block); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:157 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:161 def tr_s!(*args); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:157 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:161 def unicode_normalize(*args, &block); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:157 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:161 def unicode_normalize!(*args); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:157 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:161 def upcase(*args, &block); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:157 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:161 def upcase!(*args); end + protected + + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:202 + def mark_unsafe!; end + private - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:198 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:207 def explicit_html_escape_interpolated_argument(arg); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:202 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:211 def implicit_html_escape_interpolated_argument(arg); end # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:74 @@ -11925,10 +11936,10 @@ class ActiveSupport::SafeBuffer < ::String # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:28 def original_concat(*_arg0); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:210 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:219 def set_block_back_references(block, match_data); end - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:216 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:225 def string_into_safe_buffer(new_string, is_html_safe); end end @@ -13550,16 +13561,16 @@ class ActiveSupport::Testing::Parallelization::Worker # pkg:gem/activesupport#lib/active_support/testing/parallelization/worker.rb:7 def initialize(number, url); end - # pkg:gem/activesupport#lib/active_support/testing/parallelization/worker.rb:82 + # pkg:gem/activesupport#lib/active_support/testing/parallelization/worker.rb:84 def after_fork; end # pkg:gem/activesupport#lib/active_support/testing/parallelization/worker.rb:42 def perform_job(job); end - # pkg:gem/activesupport#lib/active_support/testing/parallelization/worker.rb:90 + # pkg:gem/activesupport#lib/active_support/testing/parallelization/worker.rb:92 def run_cleanup; end - # pkg:gem/activesupport#lib/active_support/testing/parallelization/worker.rb:58 + # pkg:gem/activesupport#lib/active_support/testing/parallelization/worker.rb:60 def safe_record(reporter, result); end # pkg:gem/activesupport#lib/active_support/testing/parallelization/worker.rb:14 @@ -13570,10 +13581,10 @@ class ActiveSupport::Testing::Parallelization::Worker private - # pkg:gem/activesupport#lib/active_support/testing/parallelization/worker.rb:97 + # pkg:gem/activesupport#lib/active_support/testing/parallelization/worker.rb:99 def add_setup_exception(result); end - # pkg:gem/activesupport#lib/active_support/testing/parallelization/worker.rb:101 + # pkg:gem/activesupport#lib/active_support/testing/parallelization/worker.rb:103 def set_process_title(status); end end @@ -17518,6 +17529,8 @@ class Integer < ::Numeric def years; end end +Integer::GMP_VERSION = T.let(T.unsafe(nil), String) + # pkg:gem/activesupport#lib/active_support/core_ext/kernel/reporting.rb:3 module Kernel private @@ -19325,7 +19338,7 @@ class String # +raw+ helper in views. It is recommended that you use +sanitize+ instead of # this method. It should never be called on user input. # - # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:232 + # pkg:gem/activesupport#lib/active_support/core_ext/string/output_safety.rb:241 def html_safe; end # Capitalizes the first word, turns underscores into spaces, and (by default) strips a @@ -19336,7 +19349,7 @@ class String # optional parameter +capitalize+ to false. # By default, this parameter is true. # - # The trailing '_id' can be kept and capitalized by setting the + # The trailing '_id' can be kept by setting the # optional parameter +keep_id_suffix+ to true. # By default, this parameter is false. # diff --git a/sorbet/rbi/gems/addressable@2.8.9.rbi b/sorbet/rbi/gems/addressable@2.8.9.rbi deleted file mode 100644 index 6999fe2..0000000 --- a/sorbet/rbi/gems/addressable@2.8.9.rbi +++ /dev/null @@ -1,9 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `addressable` gem. -# Please instead update this file by running `bin/tapioca gem addressable`. - - -# THIS IS AN EMPTY RBI FILE. -# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/bigdecimal@4.0.1.rbi b/sorbet/rbi/gems/bigdecimal@4.1.2.rbi similarity index 85% rename from sorbet/rbi/gems/bigdecimal@4.0.1.rbi rename to sorbet/rbi/gems/bigdecimal@4.1.2.rbi index 29f24d6..f4111c5 100644 --- a/sorbet/rbi/gems/bigdecimal@4.0.1.rbi +++ b/sorbet/rbi/gems/bigdecimal@4.1.2.rbi @@ -25,7 +25,7 @@ class BigDecimal < ::Numeric # # Related: BigDecimal#power. # - # pkg:gem/bigdecimal#lib/bigdecimal.rb:77 + # pkg:gem/bigdecimal#lib/bigdecimal.rb:127 def **(y); end # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 @@ -144,7 +144,7 @@ class BigDecimal < ::Numeric # # Also available as the operator **. # - # pkg:gem/bigdecimal#lib/bigdecimal.rb:97 + # pkg:gem/bigdecimal#lib/bigdecimal.rb:147 def power(y, prec = T.unsafe(nil)); end # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 @@ -175,7 +175,7 @@ class BigDecimal < ::Numeric # # Result has at least prec significant digits. # - # pkg:gem/bigdecimal#lib/bigdecimal.rb:212 + # pkg:gem/bigdecimal#lib/bigdecimal.rb:262 def sqrt(prec); end # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 @@ -262,20 +262,48 @@ module BigDecimal::Internal # Coerce x to BigDecimal with the specified precision. # TODO: some methods (example: BigMath.exp) require more precision than specified to coerce. # - # pkg:gem/bigdecimal#lib/bigdecimal.rb:18 + # pkg:gem/bigdecimal#lib/bigdecimal.rb:21 def coerce_to_bigdecimal(x, prec, method_name); end - # pkg:gem/bigdecimal#lib/bigdecimal.rb:30 + # pkg:gem/bigdecimal#lib/bigdecimal.rb:33 def coerce_validate_prec(prec, method_name, accept_zero: T.unsafe(nil)); end - # pkg:gem/bigdecimal#lib/bigdecimal.rb:50 + # Calculates Math.log(x.to_f) considering large or small exponent + # + # pkg:gem/bigdecimal#lib/bigdecimal.rb:87 + def float_log(x); end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:53 def infinity_computation_result; end - # pkg:gem/bigdecimal#lib/bigdecimal.rb:57 + # pkg:gem/bigdecimal#lib/bigdecimal.rb:67 def nan_computation_result; end + + # Iteration for Newton's method with increasing precision + # + # pkg:gem/bigdecimal#lib/bigdecimal.rb:75 + def newton_loop(prec, initial_precision: T.unsafe(nil), safe_margin: T.unsafe(nil)); end + + # Calculating Taylor series sum using binary splitting method + # Calculates f(x) = (x/d0)*(1+(x/d1)*(1+(x/d2)*(1+(x/d3)*(1+...)))) + # x.n_significant_digits or ds.size must be small to be performant. + # + # pkg:gem/bigdecimal#lib/bigdecimal.rb:94 + def taylor_sum_binary_splitting(x, ds, prec); end + + # pkg:gem/bigdecimal#lib/bigdecimal.rb:60 + def underflow_computation_result; end end end +# Default extra precision for intermediate calculations +# This value is currently the same as BigDecimal.double_fig, but defined separately for future changes. +# +# pkg:gem/bigdecimal#lib/bigdecimal.rb:17 +BigDecimal::Internal::EXTRA_PREC = T.let(T.unsafe(nil), Integer) + +BigDecimal::VERSION = T.let(T.unsafe(nil), String) + # Core BigMath methods for BigDecimal (log, exp) are defined here. # Other methods (sin, cos, atan) are defined in 'bigdecimal/math.rb'. # @@ -326,12 +354,12 @@ end # a = BigDecimal((PI(49)/2).to_s) # puts sin(a,100) # => 0.9999999999...9999999986e0 # -# pkg:gem/bigdecimal#lib/bigdecimal.rb:240 +# pkg:gem/bigdecimal#lib/bigdecimal.rb:288 module BigMath private - # pkg:gem/bigdecimal#lib/bigdecimal.rb:310 - def _exp_taylor(x, prec); end + # pkg:gem/bigdecimal#lib/bigdecimal.rb:336 + def _exp_binary_splitting(x, prec); end # call-seq: # BigMath.exp(decimal, numeric) -> BigDecimal @@ -343,7 +371,7 @@ module BigMath # # If +decimal+ is NaN, returns NaN. # - # pkg:gem/bigdecimal#lib/bigdecimal.rb:332 + # pkg:gem/bigdecimal#lib/bigdecimal.rb:356 def exp(x, prec); end # call-seq: @@ -358,7 +386,7 @@ module BigMath # # If +decimal+ is NaN, returns NaN. # - # pkg:gem/bigdecimal#lib/bigdecimal.rb:255 + # pkg:gem/bigdecimal#lib/bigdecimal.rb:303 def log(x, prec); end class << self @@ -372,7 +400,7 @@ module BigMath # # If +decimal+ is NaN, returns NaN. # - # pkg:gem/bigdecimal#lib/bigdecimal.rb:332 + # pkg:gem/bigdecimal#lib/bigdecimal.rb:356 def exp(x, prec); end # call-seq: @@ -387,13 +415,13 @@ module BigMath # # If +decimal+ is NaN, returns NaN. # - # pkg:gem/bigdecimal#lib/bigdecimal.rb:255 + # pkg:gem/bigdecimal#lib/bigdecimal.rb:303 def log(x, prec); end private - # pkg:gem/bigdecimal#lib/bigdecimal.rb:310 - def _exp_taylor(x, prec); end + # pkg:gem/bigdecimal#lib/bigdecimal.rb:336 + def _exp_binary_splitting(x, prec); end end end diff --git a/sorbet/rbi/gems/json-schema@6.1.0.rbi b/sorbet/rbi/gems/json-schema@6.1.0.rbi deleted file mode 100644 index 048dbc8..0000000 --- a/sorbet/rbi/gems/json-schema@6.1.0.rbi +++ /dev/null @@ -1,9 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `json-schema` gem. -# Please instead update this file by running `bin/tapioca gem json-schema`. - - -# THIS IS AN EMPTY RBI FILE. -# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/json@2.18.1.rbi b/sorbet/rbi/gems/json@2.19.7.rbi similarity index 92% rename from sorbet/rbi/gems/json@2.18.1.rbi rename to sorbet/rbi/gems/json@2.19.7.rbi index fca010a..3c905f6 100644 --- a/sorbet/rbi/gems/json@2.18.1.rbi +++ b/sorbet/rbi/gems/json@2.19.7.rbi @@ -5,28 +5,6 @@ # Please instead update this file by running `bin/tapioca gem json`. -class Array - include ::Enumerable - include ::JSON::Ext::Generator::GeneratorMethods::Array -end - -class FalseClass - include ::JSON::Ext::Generator::GeneratorMethods::FalseClass -end - -class Float < ::Numeric - include ::JSON::Ext::Generator::GeneratorMethods::Float -end - -class Hash - include ::Enumerable - include ::JSON::Ext::Generator::GeneratorMethods::Hash -end - -class Integer < ::Numeric - include ::JSON::Ext::Generator::GeneratorMethods::Integer -end - # = JavaScript \Object Notation (\JSON) # # \JSON is a lightweight data-interchange format. @@ -219,6 +197,18 @@ end # When enabled: # JSON.parse(%{"Hello\nWorld"}, allow_control_characters: true) # => "Hello\nWorld" # +# --- +# +# Option +allow_invalid_escape+ (boolean) specifies whether to ignore backslahes that are followed +# by an invalid escape character in strings; +# defaults to +false+. +# +# With the default, +false+: +# JSON.parse('"Hell\o"') # invalid escape character in string (JSON::ParserError) +# +# When enabled: +# JSON.parse('"Hell\o"', allow_invalid_escape: true) # => "Hello" +# # ====== Output Options # # Option +freeze+ (boolean) specifies whether the returned objects will be frozen; @@ -348,8 +338,8 @@ end # JSON.generate(JSON::MinusInfinity) # # Allow: -# ruby = [Float::NaN, Float::Infinity, Float::MinusInfinity] -# JSON.generate(ruby, allow_nan: true) # => '[NaN,Infinity,-Infinity]' +# ruby = [Float::NAN, Float::INFINITY, JSON::NaN, JSON::Infinity, JSON::MinusInfinity] +# JSON.generate(ruby, allow_nan: true) # => '[NaN,Infinity,NaN,Infinity,-Infinity]' # # --- # @@ -714,7 +704,7 @@ module JSON # Output: # {"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"} # - # pkg:gem/json#lib/json/common.rb:930 + # pkg:gem/json#lib/json/common.rb:932 def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil), kwargs = T.unsafe(nil)); end # :call-seq: @@ -731,10 +721,10 @@ module JSON # # Raises SystemStackError (stack level too deep): # JSON.fast_generate(a) # - # pkg:gem/json#lib/json/common.rb:460 + # pkg:gem/json#lib/json/common.rb:462 def fast_generate(obj, opts = T.unsafe(nil)); end - # pkg:gem/json#lib/json/common.rb:975 + # pkg:gem/json#lib/json/common.rb:977 def fast_unparse(*_arg0, **_arg1, &_arg2); end # :call-seq: @@ -773,7 +763,7 @@ module JSON # # Raises JSON::NestingError (nesting of 100 is too deep): # JSON.generate(a) # - # pkg:gem/json#lib/json/common.rb:439 + # pkg:gem/json#lib/json/common.rb:441 def generate(obj, opts = T.unsafe(nil)); end # :call-seq: @@ -913,7 +903,7 @@ module JSON # #"Admin", "password"=>"0wn3d"}>} # - # pkg:gem/json#lib/json/common.rb:854 + # pkg:gem/json#lib/json/common.rb:856 def load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end # :call-seq: @@ -924,7 +914,7 @@ module JSON # # See method #parse. # - # pkg:gem/json#lib/json/common.rb:388 + # pkg:gem/json#lib/json/common.rb:390 def load_file(filespec, opts = T.unsafe(nil)); end # :call-seq: @@ -935,7 +925,7 @@ module JSON # # See method #parse! # - # pkg:gem/json#lib/json/common.rb:399 + # pkg:gem/json#lib/json/common.rb:401 def load_file!(filespec, opts = T.unsafe(nil)); end # :call-seq: @@ -986,7 +976,7 @@ module JSON # # Raises JSON::ParserError (783: unexpected token at ''): # JSON.parse('') # - # pkg:gem/json#lib/json/common.rb:351 + # pkg:gem/json#lib/json/common.rb:353 def parse(source, opts = T.unsafe(nil)); end # :call-seq: @@ -1001,7 +991,7 @@ module JSON # which disables checking for nesting depth. # - Option +allow_nan+, if not provided, defaults to +true+. # - # pkg:gem/json#lib/json/common.rb:373 + # pkg:gem/json#lib/json/common.rb:375 def parse!(source, opts = T.unsafe(nil)); end # :call-seq: @@ -1034,20 +1024,20 @@ module JSON # } # } # - # pkg:gem/json#lib/json/common.rb:507 + # pkg:gem/json#lib/json/common.rb:509 def pretty_generate(obj, opts = T.unsafe(nil)); end - # pkg:gem/json#lib/json/common.rb:985 + # pkg:gem/json#lib/json/common.rb:987 def pretty_unparse(*_arg0, **_arg1, &_arg2); end - # pkg:gem/json#lib/json/common.rb:995 + # pkg:gem/json#lib/json/common.rb:997 def restore(*_arg0, **_arg1, &_arg2); end # :stopdoc: # All these were meant to be deprecated circa 2009, but were just set as undocumented # so usage still exist in the wild. # - # pkg:gem/json#lib/json/common.rb:965 + # pkg:gem/json#lib/json/common.rb:967 def unparse(*_arg0, **_arg1, &_arg2); end # :call-seq: @@ -1181,7 +1171,7 @@ module JSON # #"Admin", "password"=>"0wn3d"}>} # - # pkg:gem/json#lib/json/common.rb:683 + # pkg:gem/json#lib/json/common.rb:685 def unsafe_load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end class << self @@ -1200,26 +1190,26 @@ module JSON # pkg:gem/json#lib/json/common.rb:132 def [](object, opts = T.unsafe(nil)); end - # pkg:gem/json#lib/json/common.rb:206 + # pkg:gem/json#lib/json/common.rb:208 def _dump_default_options; end - # pkg:gem/json#lib/json/common.rb:206 + # pkg:gem/json#lib/json/common.rb:208 def _load_default_options; end - # pkg:gem/json#lib/json/common.rb:206 + # pkg:gem/json#lib/json/common.rb:208 def _unsafe_load_default_options; end # Returns the current create identifier. # See also JSON.create_id=. # - # pkg:gem/json#lib/json/common.rb:234 + # pkg:gem/json#lib/json/common.rb:236 def create_id; end # Sets create identifier, which is used to decide if the _json_create_ # hook of a class should be called; initial value is +json_class+: # JSON.create_id # => 'json_class' # - # pkg:gem/json#lib/json/common.rb:228 + # pkg:gem/json#lib/json/common.rb:230 def create_id=(new_value); end # pkg:gem/json#lib/json/common.rb:104 @@ -1253,13 +1243,13 @@ module JSON # Output: # {"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"} # - # pkg:gem/json#lib/json/common.rb:930 + # pkg:gem/json#lib/json/common.rb:932 def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil), kwargs = T.unsafe(nil)); end - # pkg:gem/json#lib/json/common.rb:206 + # pkg:gem/json#lib/json/common.rb:208 def dump_default_options; end - # pkg:gem/json#lib/json/common.rb:206 + # pkg:gem/json#lib/json/common.rb:208 def dump_default_options=(val); end # :call-seq: @@ -1276,10 +1266,10 @@ module JSON # # Raises SystemStackError (stack level too deep): # JSON.fast_generate(a) # - # pkg:gem/json#lib/json/common.rb:460 + # pkg:gem/json#lib/json/common.rb:462 def fast_generate(obj, opts = T.unsafe(nil)); end - # pkg:gem/json#lib/json/common.rb:975 + # pkg:gem/json#lib/json/common.rb:977 def fast_unparse(*_arg0, **_arg1, &_arg2); end # :call-seq: @@ -1318,12 +1308,12 @@ module JSON # # Raises JSON::NestingError (nesting of 100 is too deep): # JSON.generate(a) # - # pkg:gem/json#lib/json/common.rb:439 + # pkg:gem/json#lib/json/common.rb:441 def generate(obj, opts = T.unsafe(nil)); end # Returns the JSON generator module that is used by JSON. # - # pkg:gem/json#lib/json/common.rb:177 + # pkg:gem/json#lib/json/common.rb:179 def generator; end # Set the module _generator_ to be used by JSON. @@ -1468,13 +1458,13 @@ module JSON # #"Admin", "password"=>"0wn3d"}>} # - # pkg:gem/json#lib/json/common.rb:854 + # pkg:gem/json#lib/json/common.rb:856 def load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end - # pkg:gem/json#lib/json/common.rb:206 + # pkg:gem/json#lib/json/common.rb:208 def load_default_options; end - # pkg:gem/json#lib/json/common.rb:206 + # pkg:gem/json#lib/json/common.rb:208 def load_default_options=(val); end # :call-seq: @@ -1485,7 +1475,7 @@ module JSON # # See method #parse. # - # pkg:gem/json#lib/json/common.rb:388 + # pkg:gem/json#lib/json/common.rb:390 def load_file(filespec, opts = T.unsafe(nil)); end # :call-seq: @@ -1496,7 +1486,7 @@ module JSON # # See method #parse! # - # pkg:gem/json#lib/json/common.rb:399 + # pkg:gem/json#lib/json/common.rb:401 def load_file!(filespec, opts = T.unsafe(nil)); end # :call-seq: @@ -1547,7 +1537,7 @@ module JSON # # Raises JSON::ParserError (783: unexpected token at ''): # JSON.parse('') # - # pkg:gem/json#lib/json/common.rb:351 + # pkg:gem/json#lib/json/common.rb:353 def parse(source, opts = T.unsafe(nil)); end # :call-seq: @@ -1562,7 +1552,7 @@ module JSON # which disables checking for nesting depth. # - Option +allow_nan+, if not provided, defaults to +true+. # - # pkg:gem/json#lib/json/common.rb:373 + # pkg:gem/json#lib/json/common.rb:375 def parse!(source, opts = T.unsafe(nil)); end # Returns the JSON parser class that is used by JSON. @@ -1605,30 +1595,30 @@ module JSON # } # } # - # pkg:gem/json#lib/json/common.rb:507 + # pkg:gem/json#lib/json/common.rb:509 def pretty_generate(obj, opts = T.unsafe(nil)); end - # pkg:gem/json#lib/json/common.rb:985 + # pkg:gem/json#lib/json/common.rb:987 def pretty_unparse(*_arg0, **_arg1, &_arg2); end - # pkg:gem/json#lib/json/common.rb:995 + # pkg:gem/json#lib/json/common.rb:997 def restore(*_arg0, **_arg1, &_arg2); end # Sets or Returns the JSON generator state class that is used by JSON. # - # pkg:gem/json#lib/json/common.rb:180 + # pkg:gem/json#lib/json/common.rb:182 def state; end # Sets or Returns the JSON generator state class that is used by JSON. # - # pkg:gem/json#lib/json/common.rb:180 + # pkg:gem/json#lib/json/common.rb:182 def state=(_arg0); end # :stopdoc: # All these were meant to be deprecated circa 2009, but were just set as undocumented # so usage still exist in the wild. # - # pkg:gem/json#lib/json/common.rb:965 + # pkg:gem/json#lib/json/common.rb:967 def unparse(*_arg0, **_arg1, &_arg2); end # :call-seq: @@ -1762,26 +1752,26 @@ module JSON # #"Admin", "password"=>"0wn3d"}>} # - # pkg:gem/json#lib/json/common.rb:683 + # pkg:gem/json#lib/json/common.rb:685 def unsafe_load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end - # pkg:gem/json#lib/json/common.rb:206 + # pkg:gem/json#lib/json/common.rb:208 def unsafe_load_default_options; end - # pkg:gem/json#lib/json/common.rb:206 + # pkg:gem/json#lib/json/common.rb:208 def unsafe_load_default_options=(val); end private - # pkg:gem/json#lib/json/common.rb:1008 + # pkg:gem/json#lib/json/common.rb:1010 def const_missing(const_name); end - # pkg:gem/json#lib/json/common.rb:203 + # pkg:gem/json#lib/json/common.rb:205 def deprecated_singleton_attr_accessor(*attrs); end # Called from the extension when a hash has both string and symbol keys # - # pkg:gem/json#lib/json/common.rb:185 + # pkg:gem/json#lib/json/common.rb:187 def on_mixed_keys_hash(hash, do_raise); end end end @@ -1796,13 +1786,14 @@ end # # MyApp::JSONC_CODER.load(document) # -# pkg:gem/json#lib/json/common.rb:1034 +# pkg:gem/json#lib/json/common.rb:1036 class JSON::Coder # :call-seq: # JSON.new(options = nil, &block) # # Argument +options+, if given, contains a \Hash of options for both parsing and generating. - # See {Parsing Options}[#module-JSON-label-Parsing+Options], and {Generating Options}[#module-JSON-label-Generating+Options]. + # See {Parsing Options}[rdoc-ref:JSON@Parsing+Options], + # and {Generating Options}[rdoc-ref:JSON@Generating+Options]. # # For generation, the strict: true option is always set. When a Ruby object with no native \JSON counterpart is # encountered, the block provided to the initialize method is invoked, and must return a Ruby object that has a native @@ -1821,7 +1812,7 @@ class JSON::Coder # # puts MyApp::API_JSON_CODER.dump(Time.now.utc) # => "2025-01-21T08:41:44.286Z" # - # pkg:gem/json#lib/json/common.rb:1058 + # pkg:gem/json#lib/json/common.rb:1061 def initialize(options = T.unsafe(nil), &as_json); end # call-seq: @@ -1830,10 +1821,10 @@ class JSON::Coder # # Serialize the given object into a \JSON document. # - # pkg:gem/json#lib/json/common.rb:1076 + # pkg:gem/json#lib/json/common.rb:1079 def dump(object, io = T.unsafe(nil)); end - # pkg:gem/json#lib/json/common.rb:1079 + # pkg:gem/json#lib/json/common.rb:1082 def generate(object, io = T.unsafe(nil)); end # call-seq: @@ -1841,7 +1832,7 @@ class JSON::Coder # # Parse the given \JSON document and return an equivalent Ruby object. # - # pkg:gem/json#lib/json/common.rb:1085 + # pkg:gem/json#lib/json/common.rb:1088 def load(source); end # call-seq: @@ -1849,67 +1840,13 @@ class JSON::Coder # # Parse the given \JSON document and return an equivalent Ruby object. # - # pkg:gem/json#lib/json/common.rb:1094 + # pkg:gem/json#lib/json/common.rb:1097 def load_file(path); end - # pkg:gem/json#lib/json/common.rb:1088 + # pkg:gem/json#lib/json/common.rb:1091 def parse(source); end end -# pkg:gem/json#lib/json/ext.rb:39 -module JSON::Ext::Generator::GeneratorMethods::Array - # pkg:gem/json#lib/json/ext.rb:39 - def to_json(*_arg0); end -end - -# pkg:gem/json#lib/json/ext.rb:39 -module JSON::Ext::Generator::GeneratorMethods::FalseClass - # pkg:gem/json#lib/json/ext.rb:39 - def to_json(*_arg0); end -end - -# pkg:gem/json#lib/json/ext.rb:39 -module JSON::Ext::Generator::GeneratorMethods::Float - # pkg:gem/json#lib/json/ext.rb:39 - def to_json(*_arg0); end -end - -# pkg:gem/json#lib/json/ext.rb:39 -module JSON::Ext::Generator::GeneratorMethods::Hash - # pkg:gem/json#lib/json/ext.rb:39 - def to_json(*_arg0); end -end - -# pkg:gem/json#lib/json/ext.rb:39 -module JSON::Ext::Generator::GeneratorMethods::Integer - # pkg:gem/json#lib/json/ext.rb:39 - def to_json(*_arg0); end -end - -# pkg:gem/json#lib/json/ext.rb:39 -module JSON::Ext::Generator::GeneratorMethods::NilClass - # pkg:gem/json#lib/json/ext.rb:39 - def to_json(*_arg0); end -end - -# pkg:gem/json#lib/json/ext.rb:39 -module JSON::Ext::Generator::GeneratorMethods::Object - # pkg:gem/json#lib/json/ext.rb:39 - def to_json(*_arg0); end -end - -# pkg:gem/json#lib/json/ext.rb:39 -module JSON::Ext::Generator::GeneratorMethods::String - # pkg:gem/json#lib/json/ext.rb:39 - def to_json(*_arg0); end -end - -# pkg:gem/json#lib/json/ext.rb:39 -module JSON::Ext::Generator::GeneratorMethods::TrueClass - # pkg:gem/json#lib/json/ext.rb:39 - def to_json(*_arg0); end -end - # pkg:gem/json#lib/json/ext.rb:39 class JSON::Ext::Generator::State # call-seq: new(opts = {}) @@ -1917,7 +1854,7 @@ class JSON::Ext::Generator::State # Instantiates a new State object, configured by _opts_. # # Argument +opts+, if given, contains a \Hash of options for the generation. - # See {Generating Options}[#module-JSON-label-Generating+Options]. + # See {Generating Options}[rdoc-ref:JSON@Generating+Options]. # # pkg:gem/json#lib/json/ext.rb:39 def initialize(opts = T.unsafe(nil)); end @@ -1936,6 +1873,9 @@ class JSON::Ext::Generator::State # pkg:gem/json#lib/json/ext/generator/state.rb:91 def []=(name, value); end + # pkg:gem/json#lib/json/ext.rb:39 + def _generate_no_fallback(*_arg0); end + # pkg:gem/json#lib/json/ext.rb:39 def allow_nan=(_arg0); end @@ -2069,6 +2009,9 @@ class JSON::Ext::Generator::State def initialize_copy(_arg0); end class << self + # pkg:gem/json#lib/json/ext.rb:39 + def _generate_no_fallback(_arg0, _arg1, _arg2); end + # pkg:gem/json#lib/json/ext.rb:39 def from_state(_arg0); end @@ -2117,56 +2060,108 @@ end # Note: no validation is performed on the provided string. It is the # responsibility of the caller to ensure the string contains valid JSON. # -# pkg:gem/json#lib/json/common.rb:287 +# pkg:gem/json#lib/json/common.rb:289 class JSON::Fragment < ::Struct - # pkg:gem/json#lib/json/common.rb:288 + # pkg:gem/json#lib/json/common.rb:290 def initialize(json); end - # pkg:gem/json#lib/json/common.rb:287 + # pkg:gem/json#lib/json/common.rb:289 def json; end - # pkg:gem/json#lib/json/common.rb:287 + # pkg:gem/json#lib/json/common.rb:289 def json=(_); end - # pkg:gem/json#lib/json/common.rb:296 + # pkg:gem/json#lib/json/common.rb:298 def to_json(state = T.unsafe(nil), *_arg1); end class << self - # pkg:gem/json#lib/json/common.rb:287 + # pkg:gem/json#lib/json/common.rb:289 def [](*_arg0); end - # pkg:gem/json#lib/json/common.rb:287 + # pkg:gem/json#lib/json/common.rb:289 def inspect; end - # pkg:gem/json#lib/json/common.rb:287 + # pkg:gem/json#lib/json/common.rb:289 def keyword_init?; end - # pkg:gem/json#lib/json/common.rb:287 + # pkg:gem/json#lib/json/common.rb:289 def members; end - # pkg:gem/json#lib/json/common.rb:287 + # pkg:gem/json#lib/json/common.rb:289 def new(*_arg0); end end end # This exception is raised if a generator or unparser error occurs. # -# pkg:gem/json#lib/json/common.rb:257 +# pkg:gem/json#lib/json/common.rb:259 class JSON::GeneratorError < ::JSON::JSONError - # pkg:gem/json#lib/json/common.rb:260 + # pkg:gem/json#lib/json/common.rb:262 def initialize(message, invalid_object = T.unsafe(nil)); end - # pkg:gem/json#lib/json/common.rb:265 + # pkg:gem/json#lib/json/common.rb:267 def detailed_message(*_arg0, **_arg1, &_arg2); end - # pkg:gem/json#lib/json/common.rb:258 + # pkg:gem/json#lib/json/common.rb:260 def invalid_object; end end -# pkg:gem/json#lib/json/common.rb:356 +# pkg:gem/json#lib/json/common.rb:1102 +module JSON::GeneratorMethods + # call-seq: to_json(*) + # + # Converts this object into a JSON string. + # If this object doesn't directly maps to a JSON native type, + # first convert it to a string (calling #to_s), then converts + # it to a JSON string, and returns the result. + # This is a fallback, if no special method #to_json was defined for some object. + # + # pkg:gem/json#lib/json/common.rb:1110 + def to_json(state = T.unsafe(nil), *_arg1); end +end + +# pkg:gem/json#lib/json/generic_object.rb:9 +class JSON::GenericObject < ::OpenStruct + # pkg:gem/json#lib/json/generic_object.rb:59 + def as_json(*_arg0); end + + # pkg:gem/json#lib/json/generic_object.rb:51 + def to_hash; end + + # pkg:gem/json#lib/json/generic_object.rb:63 + def to_json(*a); end + + # pkg:gem/json#lib/json/generic_object.rb:55 + def |(other); end + + class << self + # pkg:gem/json#lib/json/generic_object.rb:11 + def [](*_arg0); end + + # pkg:gem/json#lib/json/generic_object.rb:45 + def dump(obj, *args); end + + # pkg:gem/json#lib/json/generic_object.rb:25 + def from_hash(object); end + + # pkg:gem/json#lib/json/generic_object.rb:17 + def json_creatable=(_arg0); end + + # pkg:gem/json#lib/json/generic_object.rb:13 + def json_creatable?; end + + # pkg:gem/json#lib/json/generic_object.rb:19 + def json_create(data); end + + # pkg:gem/json#lib/json/generic_object.rb:40 + def load(source, proc = T.unsafe(nil), opts = T.unsafe(nil)); end + end +end + +# pkg:gem/json#lib/json/common.rb:358 JSON::PARSE_L_OPTIONS = T.let(T.unsafe(nil), Hash) -# pkg:gem/json#lib/json/common.rb:469 +# pkg:gem/json#lib/json/common.rb:471 JSON::PRETTY_GENERATE_OPTIONS = T.let(T.unsafe(nil), Hash) # pkg:gem/json#lib/json/common.rb:152 @@ -2174,12 +2169,12 @@ JSON::Parser = JSON::Ext::Parser # This exception is raised if a parser error occurs. # -# pkg:gem/json#lib/json/common.rb:248 +# pkg:gem/json#lib/json/common.rb:250 class JSON::ParserError < ::JSON::JSONError - # pkg:gem/json#lib/json/common.rb:249 + # pkg:gem/json#lib/json/common.rb:251 def column; end - # pkg:gem/json#lib/json/common.rb:249 + # pkg:gem/json#lib/json/common.rb:251 def line; end end @@ -2207,10 +2202,10 @@ module JSON::ParserOptions end end -# pkg:gem/json#lib/json/common.rb:171 +# pkg:gem/json#lib/json/common.rb:173 JSON::State = JSON::Ext::Generator::State -# pkg:gem/json#lib/json/common.rb:1100 +# pkg:gem/json#lib/json/common.rb:1127 module Kernel private @@ -2221,37 +2216,25 @@ module Kernel # The _opts_ argument is passed through to generate/parse respectively. See # generate and parse for their documentation. # - # pkg:gem/json#lib/json/common.rb:1139 + # pkg:gem/json#lib/json/common.rb:1166 def JSON(object, opts = T.unsafe(nil)); end # Outputs _objs_ to STDOUT as JSON strings in the shortest form, that is in # one line. # - # pkg:gem/json#lib/json/common.rb:1105 + # pkg:gem/json#lib/json/common.rb:1132 def j(*objs); end # Outputs _objs_ to STDOUT as JSON strings in a pretty format, with # indentation and over many lines. # - # pkg:gem/json#lib/json/common.rb:1120 + # pkg:gem/json#lib/json/common.rb:1147 def jj(*objs); end end -class NilClass - include ::JSON::Ext::Generator::GeneratorMethods::NilClass -end - +# pkg:gem/json#lib/json/common.rb:1171 class Object < ::BasicObject include ::Kernel include ::PP::ObjectMixin - include ::JSON::Ext::Generator::GeneratorMethods::Object -end - -class String - include ::Comparable - include ::JSON::Ext::Generator::GeneratorMethods::String -end - -class TrueClass - include ::JSON::Ext::Generator::GeneratorMethods::TrueClass + include ::JSON::GeneratorMethods end diff --git a/sorbet/rbi/gems/loofah@2.25.0.rbi b/sorbet/rbi/gems/loofah@2.25.1.rbi similarity index 99% rename from sorbet/rbi/gems/loofah@2.25.0.rbi rename to sorbet/rbi/gems/loofah@2.25.1.rbi index 0abac4b..3fe61e2 100644 --- a/sorbet/rbi/gems/loofah@2.25.0.rbi +++ b/sorbet/rbi/gems/loofah@2.25.1.rbi @@ -390,20 +390,20 @@ module Loofah::HTML5::Scrub # pkg:gem/loofah#lib/loofah/html5/scrub.rb:147 def allowed_uri?(uri_string); end - # pkg:gem/loofah#lib/loofah/html5/scrub.rb:204 + # pkg:gem/loofah#lib/loofah/html5/scrub.rb:207 def cdata_escape(node); end - # pkg:gem/loofah#lib/loofah/html5/scrub.rb:199 + # pkg:gem/loofah#lib/loofah/html5/scrub.rb:202 def cdata_needs_escaping?(node); end - # pkg:gem/loofah#lib/loofah/html5/scrub.rb:219 + # pkg:gem/loofah#lib/loofah/html5/scrub.rb:222 def escape_tags(string); end # libxml2 >= 2.9.2 fails to escape comments within some attributes. # # see comments about CVE-2018-8048 within the tests for more information # - # pkg:gem/loofah#lib/loofah/html5/scrub.rb:178 + # pkg:gem/loofah#lib/loofah/html5/scrub.rb:181 def force_correct_attribute_escaping!(node); end # pkg:gem/loofah#lib/loofah/html5/scrub.rb:125 @@ -420,7 +420,7 @@ module Loofah::HTML5::Scrub # pkg:gem/loofah#lib/loofah/html5/scrub.rb:69 def scrub_css_attribute(node); end - # pkg:gem/loofah#lib/loofah/html5/scrub.rb:164 + # pkg:gem/loofah#lib/loofah/html5/scrub.rb:167 def scrub_uri_attribute(attr_node); end end end diff --git a/sorbet/rbi/gems/mcp@0.8.0.rbi b/sorbet/rbi/gems/mcp@0.8.0.rbi deleted file mode 100644 index 26f0769..0000000 --- a/sorbet/rbi/gems/mcp@0.8.0.rbi +++ /dev/null @@ -1,9 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `mcp` gem. -# Please instead update this file by running `bin/tapioca gem mcp`. - - -# THIS IS AN EMPTY RBI FILE. -# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/minitest@6.0.2.rbi b/sorbet/rbi/gems/minitest@6.0.6.rbi similarity index 95% rename from sorbet/rbi/gems/minitest@6.0.2.rbi rename to sorbet/rbi/gems/minitest@6.0.6.rbi index 1e52192..dbe0d2d 100644 --- a/sorbet/rbi/gems/minitest@6.0.2.rbi +++ b/sorbet/rbi/gems/minitest@6.0.6.rbi @@ -253,9 +253,6 @@ module Minitest::Assertions # pkg:gem/minitest#lib/minitest/assertions.rb:181 def _synchronize; end - # pkg:gem/minitest#lib/minitest/assertions.rb:193 - def _where; end - # Fails unless +test+ is truthy. # # pkg:gem/minitest#lib/minitest/assertions.rb:171 @@ -278,7 +275,7 @@ module Minitest::Assertions # # See also: Minitest::Assertions.diff # - # pkg:gem/minitest#lib/minitest/assertions.rb:211 + # pkg:gem/minitest#lib/minitest/assertions.rb:206 def assert_equal(exp, act, msg = T.unsafe(nil)); end # For comparing Floats. Fails unless +exp+ and +act+ are within +delta+ @@ -286,45 +283,45 @@ module Minitest::Assertions # # assert_in_delta Math::PI, (22.0 / 7.0), 0.01 # - # pkg:gem/minitest#lib/minitest/assertions.rb:225 + # pkg:gem/minitest#lib/minitest/assertions.rb:220 def assert_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end # For comparing Floats. Fails unless +exp+ and +act+ have a relative # error less than +epsilon+. # - # pkg:gem/minitest#lib/minitest/assertions.rb:237 + # pkg:gem/minitest#lib/minitest/assertions.rb:232 def assert_in_epsilon(exp, act, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end # Fails unless +collection+ includes +obj+. # - # pkg:gem/minitest#lib/minitest/assertions.rb:244 + # pkg:gem/minitest#lib/minitest/assertions.rb:239 def assert_includes(collection, obj, msg = T.unsafe(nil)); end # Fails unless +obj+ is an instance of +cls+. # - # pkg:gem/minitest#lib/minitest/assertions.rb:254 + # pkg:gem/minitest#lib/minitest/assertions.rb:249 def assert_instance_of(cls, obj, msg = T.unsafe(nil)); end # Fails unless +obj+ is a kind of +cls+. # - # pkg:gem/minitest#lib/minitest/assertions.rb:265 + # pkg:gem/minitest#lib/minitest/assertions.rb:260 def assert_kind_of(cls, obj, msg = T.unsafe(nil)); end # Fails unless +matcher+ =~ +obj+. # - # pkg:gem/minitest#lib/minitest/assertions.rb:276 + # pkg:gem/minitest#lib/minitest/assertions.rb:271 def assert_match(matcher, obj, msg = T.unsafe(nil)); end # Fails unless +obj+ is nil # - # pkg:gem/minitest#lib/minitest/assertions.rb:288 + # pkg:gem/minitest#lib/minitest/assertions.rb:283 def assert_nil(obj, msg = T.unsafe(nil)); end # For testing with binary operators. Eg: # # assert_operator 5, :<=, 4 # - # pkg:gem/minitest#lib/minitest/assertions.rb:298 + # pkg:gem/minitest#lib/minitest/assertions.rb:293 def assert_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end # Fails if stdout or stderr do not output the expected results. @@ -338,12 +335,12 @@ module Minitest::Assertions # # See also: #assert_silent # - # pkg:gem/minitest#lib/minitest/assertions.rb:317 + # pkg:gem/minitest#lib/minitest/assertions.rb:312 def assert_output(stdout = T.unsafe(nil), stderr = T.unsafe(nil)); end # Fails unless +path+ exists. # - # pkg:gem/minitest#lib/minitest/assertions.rb:341 + # pkg:gem/minitest#lib/minitest/assertions.rb:336 def assert_path_exists(path, msg = T.unsafe(nil)); end # For testing with pattern matching (only supported with Ruby 3.0 and later) @@ -359,7 +356,7 @@ module Minitest::Assertions # generates a test failure. Any other exception will be raised as normal and generate a test # error. # - # pkg:gem/minitest#lib/minitest/assertions.rb:360 + # pkg:gem/minitest#lib/minitest/assertions.rb:355 def assert_pattern; end # For testing with predicates. Eg: @@ -370,7 +367,7 @@ module Minitest::Assertions # # str.must_be :empty? # - # pkg:gem/minitest#lib/minitest/assertions.rb:378 + # pkg:gem/minitest#lib/minitest/assertions.rb:373 def assert_predicate(o1, op, msg = T.unsafe(nil)); end # Fails unless the block raises one of +exp+. Returns the @@ -394,7 +391,7 @@ module Minitest::Assertions # # assert_equal 'This is really bad', error.message # - # pkg:gem/minitest#lib/minitest/assertions.rb:406 + # pkg:gem/minitest#lib/minitest/assertions.rb:403 def assert_raises(*exp); end # Fails unless +obj+ responds to +meth+. @@ -412,12 +409,12 @@ module Minitest::Assertions # # See also: #assert_output # - # pkg:gem/minitest#lib/minitest/assertions.rb:459 + # pkg:gem/minitest#lib/minitest/assertions.rb:462 def assert_silent; end # Fails unless the block throws +sym+ # - # pkg:gem/minitest#lib/minitest/assertions.rb:468 + # pkg:gem/minitest#lib/minitest/assertions.rb:471 def assert_throws(sym, msg = T.unsafe(nil)); end # Captures $stdout and $stderr into strings: @@ -434,7 +431,7 @@ module Minitest::Assertions # capture IO for subprocesses. Use #capture_subprocess_io for # that. # - # pkg:gem/minitest#lib/minitest/assertions.rb:504 + # pkg:gem/minitest#lib/minitest/assertions.rb:507 def capture_io; end # Captures $stdout and $stderr into strings, using Tempfile to @@ -451,7 +448,7 @@ module Minitest::Assertions # NOTE: This method is approximately 10x slower than #capture_io so # only use it when you need to test the output of a subprocess. # - # pkg:gem/minitest#lib/minitest/assertions.rb:537 + # pkg:gem/minitest#lib/minitest/assertions.rb:540 def capture_subprocess_io; end # Returns a diff between +exp+ and +act+. If there is no known @@ -466,19 +463,19 @@ module Minitest::Assertions # Returns details for exception +e+ # - # pkg:gem/minitest#lib/minitest/assertions.rb:569 + # pkg:gem/minitest#lib/minitest/assertions.rb:572 def exception_details(e, msg); end # Fails after a given date (in the local time zone). This allows # you to put time-bombs in your tests if you need to keep # something around until a later date lest you forget about it. # - # pkg:gem/minitest#lib/minitest/assertions.rb:585 + # pkg:gem/minitest#lib/minitest/assertions.rb:588 def fail_after(y, m, d, msg); end # Fails with +msg+. # - # pkg:gem/minitest#lib/minitest/assertions.rb:592 + # pkg:gem/minitest#lib/minitest/assertions.rb:595 def flunk(msg = T.unsafe(nil)); end # Returns a proc that delays generation of an output message. If @@ -486,7 +483,7 @@ module Minitest::Assertions # as-is. Otherwise, return a proc that will output +msg+ along # with the value of the result of the block passed to +message+. # - # pkg:gem/minitest#lib/minitest/assertions.rb:603 + # pkg:gem/minitest#lib/minitest/assertions.rb:606 def message(msg = T.unsafe(nil), ending = T.unsafe(nil), &default); end # This returns a human-readable version of +obj+. By default @@ -508,62 +505,62 @@ module Minitest::Assertions # used for counting assertions # - # pkg:gem/minitest#lib/minitest/assertions.rb:614 + # pkg:gem/minitest#lib/minitest/assertions.rb:617 def pass(_msg = T.unsafe(nil)); end # Fails if +test+ is truthy. # - # pkg:gem/minitest#lib/minitest/assertions.rb:621 + # pkg:gem/minitest#lib/minitest/assertions.rb:624 def refute(test, msg = T.unsafe(nil)); end # Fails if +obj+ is empty. # - # pkg:gem/minitest#lib/minitest/assertions.rb:629 + # pkg:gem/minitest#lib/minitest/assertions.rb:632 def refute_empty(obj, msg = T.unsafe(nil)); end # Fails if exp == act. # # For floats use refute_in_delta. # - # pkg:gem/minitest#lib/minitest/assertions.rb:639 + # pkg:gem/minitest#lib/minitest/assertions.rb:642 def refute_equal(exp, act, msg = T.unsafe(nil)); end # For comparing Floats. Fails if +exp+ is within +delta+ of +act+. # # refute_in_delta Math::PI, (22.0 / 7.0) # - # pkg:gem/minitest#lib/minitest/assertions.rb:651 + # pkg:gem/minitest#lib/minitest/assertions.rb:654 def refute_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end # For comparing Floats. Fails if +exp+ and +act+ have a relative error # less than +epsilon+. # - # pkg:gem/minitest#lib/minitest/assertions.rb:663 + # pkg:gem/minitest#lib/minitest/assertions.rb:666 def refute_in_epsilon(exp, act, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end # Fails if +obj+ includes +sub+. # - # pkg:gem/minitest#lib/minitest/assertions.rb:670 + # pkg:gem/minitest#lib/minitest/assertions.rb:673 def refute_includes(obj, sub, msg = T.unsafe(nil)); end # Fails if +obj+ is an instance of +cls+. # - # pkg:gem/minitest#lib/minitest/assertions.rb:678 + # pkg:gem/minitest#lib/minitest/assertions.rb:681 def refute_instance_of(cls, obj, msg = T.unsafe(nil)); end # Fails if +obj+ is a kind of +cls+. # - # pkg:gem/minitest#lib/minitest/assertions.rb:688 + # pkg:gem/minitest#lib/minitest/assertions.rb:691 def refute_kind_of(cls, obj, msg = T.unsafe(nil)); end # Fails if +matcher+ =~ +obj+. # - # pkg:gem/minitest#lib/minitest/assertions.rb:696 + # pkg:gem/minitest#lib/minitest/assertions.rb:699 def refute_match(matcher, obj, msg = T.unsafe(nil)); end # Fails if +obj+ is nil. # - # pkg:gem/minitest#lib/minitest/assertions.rb:705 + # pkg:gem/minitest#lib/minitest/assertions.rb:708 def refute_nil(obj, msg = T.unsafe(nil)); end # Fails if +o1+ is not +op+ +o2+. Eg: @@ -571,12 +568,12 @@ module Minitest::Assertions # refute_operator 1, :>, 2 #=> pass # refute_operator 1, :<, 2 #=> fail # - # pkg:gem/minitest#lib/minitest/assertions.rb:737 + # pkg:gem/minitest#lib/minitest/assertions.rb:740 def refute_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end # Fails if +path+ exists. # - # pkg:gem/minitest#lib/minitest/assertions.rb:747 + # pkg:gem/minitest#lib/minitest/assertions.rb:750 def refute_path_exists(path, msg = T.unsafe(nil)); end # For testing with pattern matching (only supported with Ruby 3.0 and later) @@ -590,7 +587,7 @@ module Minitest::Assertions # This assertion expects a NoMatchingPatternError exception, and will fail if none is raised. Any # other exceptions will be raised as normal and generate a test error. # - # pkg:gem/minitest#lib/minitest/assertions.rb:722 + # pkg:gem/minitest#lib/minitest/assertions.rb:725 def refute_pattern; end # For testing with predicates. @@ -601,25 +598,25 @@ module Minitest::Assertions # # str.wont_be :empty? # - # pkg:gem/minitest#lib/minitest/assertions.rb:761 + # pkg:gem/minitest#lib/minitest/assertions.rb:764 def refute_predicate(o1, op, msg = T.unsafe(nil)); end # Fails if +obj+ responds to the message +meth+. # include_all defaults to false to match Object#respond_to? # - # pkg:gem/minitest#lib/minitest/assertions.rb:771 + # pkg:gem/minitest#lib/minitest/assertions.rb:774 def refute_respond_to(obj, meth, msg = T.unsafe(nil), include_all: T.unsafe(nil)); end # Fails if +exp+ is the same (by object identity) as +act+. # - # pkg:gem/minitest#lib/minitest/assertions.rb:780 + # pkg:gem/minitest#lib/minitest/assertions.rb:783 def refute_same(exp, act, msg = T.unsafe(nil)); end # Skips the current run. If run in verbose-mode, the skipped run # gets listed at the end of the run but doesn't cause a failure # exit code. # - # pkg:gem/minitest#lib/minitest/assertions.rb:793 + # pkg:gem/minitest#lib/minitest/assertions.rb:796 def skip(msg = T.unsafe(nil), _ignored = T.unsafe(nil)); end # Skips the current run until a given date (in the local time @@ -627,12 +624,12 @@ module Minitest::Assertions # date, but still holds you accountable and prevents you from # forgetting it. # - # pkg:gem/minitest#lib/minitest/assertions.rb:805 + # pkg:gem/minitest#lib/minitest/assertions.rb:808 def skip_until(y, m, d, msg); end # Was this testcase skipped? Meant for #teardown. # - # pkg:gem/minitest#lib/minitest/assertions.rb:814 + # pkg:gem/minitest#lib/minitest/assertions.rb:817 def skipped?; end # Returns things to diff [expect, butwas], or [nil, nil] if nothing to diff. @@ -661,6 +658,9 @@ module Minitest::Assertions end end +# pkg:gem/minitest#lib/minitest/assertions.rb:379 +Minitest::Assertions::NO_RE_MSG = T.let(T.unsafe(nil), String) + # pkg:gem/minitest#lib/minitest/assertions.rb:17 Minitest::Assertions::UNDEFINED = T.let(T.unsafe(nil), Object) @@ -1050,7 +1050,7 @@ Minitest::Reportable::BASE_DIR = T.let(T.unsafe(nil), String) # AbstractReportera # -# pkg:gem/minitest#lib/minitest.rb:753 +# pkg:gem/minitest#lib/minitest.rb:755 class Minitest::Reporter < ::Minitest::AbstractReporter # pkg:gem/minitest#lib/minitest.rb:764 def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end diff --git a/sorbet/rbi/gems/mocha@3.0.2.rbi b/sorbet/rbi/gems/mocha@3.1.0.rbi similarity index 98% rename from sorbet/rbi/gems/mocha@3.0.2.rbi rename to sorbet/rbi/gems/mocha@3.1.0.rbi index 68b9314..5eb178f 100644 --- a/sorbet/rbi/gems/mocha@3.0.2.rbi +++ b/sorbet/rbi/gems/mocha@3.1.0.rbi @@ -5,7 +5,6 @@ # Please instead update this file by running `bin/tapioca gem mocha`. -# pkg:gem/mocha#lib/mocha/inspect.rb:59 class Array include ::Enumerable include ::Mocha::Inspect::ArrayMethods @@ -15,13 +14,11 @@ class Class < ::Module include ::Mocha::ClassMethods end -# pkg:gem/mocha#lib/mocha/inspect.rb:71 class Date include ::Comparable include ::Mocha::Inspect::DateMethods end -# pkg:gem/mocha#lib/mocha/inspect.rb:63 class Hash include ::Enumerable include ::Mocha::Inspect::HashMethods @@ -300,6 +297,14 @@ class Mocha::BacktraceFilter # pkg:gem/mocha#lib/mocha/backtrace_filter.rb:11 def filtered(backtrace); end + + # pkg:gem/mocha#lib/mocha/backtrace_filter.rb:15 + def filtered_locations(locations); end + + private + + # pkg:gem/mocha#lib/mocha/backtrace_filter.rb:21 + def exclude?(path); end end # pkg:gem/mocha#lib/mocha/backtrace_filter.rb:5 @@ -810,23 +815,11 @@ end # pkg:gem/mocha#lib/mocha/deprecation.rb:6 class Mocha::Deprecation class << self - # pkg:gem/mocha#lib/mocha/deprecation.rb:22 - def logger; end - - # pkg:gem/mocha#lib/mocha/deprecation.rb:16 - def logger=(_arg0); end - - # pkg:gem/mocha#lib/mocha/deprecation.rb:18 + # pkg:gem/mocha#lib/mocha/deprecation.rb:8 def warning(message); end end end -# pkg:gem/mocha#lib/mocha/deprecation.rb:7 -class Mocha::Deprecation::Logger - # pkg:gem/mocha#lib/mocha/deprecation.rb:8 - def call(message); end -end - # pkg:gem/mocha#lib/mocha/detection/minitest.rb:4 module Mocha::Detection; end @@ -867,7 +860,7 @@ class Mocha::Expectation # @private # # pkg:gem/mocha#lib/mocha/expectation.rb:652 - def initialize(mock, expected_method_name, backtrace = T.unsafe(nil)); end + def initialize(mock, expected_method_name, backtrace_locations = T.unsafe(nil)); end # @private # @@ -957,12 +950,17 @@ class Mocha::Expectation # @private # - # pkg:gem/mocha#lib/mocha/expectation.rb:649 + # pkg:gem/mocha#lib/mocha/expectation.rb:764 def backtrace; end # @private # - # pkg:gem/mocha#lib/mocha/expectation.rb:764 + # pkg:gem/mocha#lib/mocha/expectation.rb:649 + def backtrace_locations; end + + # @private + # + # pkg:gem/mocha#lib/mocha/expectation.rb:769 def definition_location; end # @private @@ -1928,13 +1926,21 @@ class Mocha::Invocation def argument_description; end end -# pkg:gem/mocha#lib/mocha/logger.rb:4 +# pkg:gem/mocha#lib/mocha/logger.rb:6 class Mocha::Logger - # pkg:gem/mocha#lib/mocha/logger.rb:5 - def initialize(io); end + # pkg:gem/mocha#lib/mocha/logger.rb:19 + def warning(message, category: T.unsafe(nil)); end + + class << self + # pkg:gem/mocha#lib/mocha/logger.rb:14 + def logger; end + + # pkg:gem/mocha#lib/mocha/logger.rb:8 + def logger=(_arg0); end - # pkg:gem/mocha#lib/mocha/logger.rb:9 - def warn(message); end + # pkg:gem/mocha#lib/mocha/logger.rb:10 + def warning(*args, **kwargs); end + end end # pkg:gem/mocha#lib/mocha/method_matcher.rb:4 @@ -2293,75 +2299,69 @@ end # pkg:gem/mocha#lib/mocha/mockery.rb:18 class Mocha::Mockery - # pkg:gem/mocha#lib/mocha/mockery.rb:71 + # pkg:gem/mocha#lib/mocha/mockery.rb:70 def initialize(assertion_counter); end - # pkg:gem/mocha#lib/mocha/mockery.rb:154 - def logger; end - - # pkg:gem/mocha#lib/mocha/mockery.rb:152 - def logger=(_arg0); end - - # pkg:gem/mocha#lib/mocha/mockery.rb:133 + # pkg:gem/mocha#lib/mocha/mockery.rb:132 def mocha_inspect; end - # pkg:gem/mocha#lib/mocha/mockery.rb:83 + # pkg:gem/mocha#lib/mocha/mockery.rb:82 def mock_impersonating(object); end - # pkg:gem/mocha#lib/mocha/mockery.rb:87 + # pkg:gem/mocha#lib/mocha/mockery.rb:86 def mock_impersonating_any_instance_of(klass); end - # pkg:gem/mocha#lib/mocha/mockery.rb:121 + # pkg:gem/mocha#lib/mocha/mockery.rb:120 def mocks; end - # pkg:gem/mocha#lib/mocha/mockery.rb:75 + # pkg:gem/mocha#lib/mocha/mockery.rb:74 def named_mock(name); end - # pkg:gem/mocha#lib/mocha/mockery.rb:91 + # pkg:gem/mocha#lib/mocha/mockery.rb:90 def new_state_machine(name); end - # pkg:gem/mocha#lib/mocha/mockery.rb:141 + # pkg:gem/mocha#lib/mocha/mockery.rb:140 def on_stubbing(object, method); end - # pkg:gem/mocha#lib/mocha/mockery.rb:129 + # pkg:gem/mocha#lib/mocha/mockery.rb:128 def sequences; end - # pkg:gem/mocha#lib/mocha/mockery.rb:125 + # pkg:gem/mocha#lib/mocha/mockery.rb:124 def state_machines; end - # pkg:gem/mocha#lib/mocha/mockery.rb:117 + # pkg:gem/mocha#lib/mocha/mockery.rb:116 def stubba; end - # pkg:gem/mocha#lib/mocha/mockery.rb:111 + # pkg:gem/mocha#lib/mocha/mockery.rb:110 def teardown(origin = T.unsafe(nil)); end - # pkg:gem/mocha#lib/mocha/mockery.rb:79 + # pkg:gem/mocha#lib/mocha/mockery.rb:78 def unnamed_mock; end - # pkg:gem/mocha#lib/mocha/mockery.rb:95 + # pkg:gem/mocha#lib/mocha/mockery.rb:94 def verify; end private - # pkg:gem/mocha#lib/mocha/mockery.rb:183 + # pkg:gem/mocha#lib/mocha/mockery.rb:176 def add_mock(mock); end - # pkg:gem/mocha#lib/mocha/mockery.rb:188 + # pkg:gem/mocha#lib/mocha/mockery.rb:181 def add_state_machine(state_machine); end - # pkg:gem/mocha#lib/mocha/mockery.rb:160 + # pkg:gem/mocha#lib/mocha/mockery.rb:153 def check(action, description, signature_proc, backtrace = T.unsafe(nil)); end - # pkg:gem/mocha#lib/mocha/mockery.rb:171 + # pkg:gem/mocha#lib/mocha/mockery.rb:164 def expectations; end - # pkg:gem/mocha#lib/mocha/mockery.rb:193 + # pkg:gem/mocha#lib/mocha/mockery.rb:186 def reset; end - # pkg:gem/mocha#lib/mocha/mockery.rb:179 + # pkg:gem/mocha#lib/mocha/mockery.rb:172 def satisfied_expectations; end - # pkg:gem/mocha#lib/mocha/mockery.rb:175 + # pkg:gem/mocha#lib/mocha/mockery.rb:168 def unsatisfied_expectations; end class << self @@ -2371,10 +2371,10 @@ class Mocha::Mockery # pkg:gem/mocha#lib/mocha/mockery.rb:49 def setup(assertion_counter); end - # pkg:gem/mocha#lib/mocha/mockery.rb:60 + # pkg:gem/mocha#lib/mocha/mockery.rb:59 def teardown(origin = T.unsafe(nil)); end - # pkg:gem/mocha#lib/mocha/mockery.rb:56 + # pkg:gem/mocha#lib/mocha/mockery.rb:55 def verify; end end end @@ -3977,7 +3977,6 @@ class Object < ::BasicObject include ::Mocha::ObjectMethods end -# pkg:gem/mocha#lib/mocha/inspect.rb:67 class Time include ::Comparable include ::Mocha::Inspect::TimeMethods diff --git a/sorbet/rbi/gems/nokogiri@1.19.1.rbi b/sorbet/rbi/gems/nokogiri@1.19.3.rbi similarity index 97% rename from sorbet/rbi/gems/nokogiri@1.19.1.rbi rename to sorbet/rbi/gems/nokogiri@1.19.3.rbi index d7b9bfe..df55c2a 100644 --- a/sorbet/rbi/gems/nokogiri@1.19.1.rbi +++ b/sorbet/rbi/gems/nokogiri@1.19.3.rbi @@ -37,7 +37,7 @@ # coding: utf-8 # -- # DO NOT MODIFY!!!! -# This file is automatically generated by rex 1.0.7 +# This file is automatically generated by rex 1.0.8 # from lexical definition file "lib/nokogiri/css/tokenizer.rex". # ++ # coding: utf-8 @@ -6043,253 +6043,253 @@ Nokogiri::XML::PP::Node::COLLECTIONS = T.let(T.unsafe(nil), Array) # # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:67 class Nokogiri::XML::ParseOptions - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:165 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:169 def initialize(options = T.unsafe(nil)); end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:198 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:202 def ==(other); end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def big_lines; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def big_lines?; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def compact; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def compact?; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def default_html; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def default_html?; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def default_schema; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def default_schema?; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def default_xml; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def default_xml?; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def default_xslt; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def default_xslt?; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def dtdattr; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def dtdattr?; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def dtdload; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def dtdload?; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def dtdvalid; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def dtdvalid?; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def huge; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def huge?; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:204 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:208 def inspect; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nobasefix; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nobasefix?; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nobig_lines; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def noblanks; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def noblanks?; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nocdata; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nocdata?; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nocompact; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nodefault_html; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nodefault_schema; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nodefault_xml; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nodefault_xslt; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nodict; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nodict?; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nodtdattr; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nodtdload; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nodtdvalid; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def noent; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def noent?; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def noerror; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def noerror?; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nohuge; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nonet; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nonet?; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nonobasefix; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nonoblanks; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nonocdata; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nonodict; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nonoent; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nonoerror; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nononet; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nonowarning; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nonoxincnode; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nonsclean; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def noold10; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nopedantic; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def norecover; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nosax1; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nowarning; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nowarning?; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def noxinclude; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def noxincnode; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def noxincnode?; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nsclean; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def nsclean?; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def old10; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def old10?; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:163 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:167 def options; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:163 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:167 def options=(_arg0); end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def pedantic; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def pedantic?; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def recover; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def recover?; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def sax1; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def sax1?; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:189 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:193 def strict; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:194 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:198 def strict?; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:202 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:206 def to_i; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def xinclude; end - # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:172 + # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:176 def xinclude?; end end @@ -6297,35 +6297,39 @@ end # by default for for XML::Document, XML::DocumentFragment, HTML4::Document, # HTML4::DocumentFragment, XSLT::Stylesheet, and XML::Schema. # -# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:149 +# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:148 Nokogiri::XML::ParseOptions::BIG_LINES = T.let(T.unsafe(nil), Integer) # Compact small text nodes. Off by default. # -# ⚠ No modification of the DOM tree is allowed after parsing. libxml2 may crash if you try to -# modify the tree. +# ⚠ No modification of the DOM tree is allowed after parsing. # -# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:133 +# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:132 Nokogiri::XML::ParseOptions::COMPACT = T.let(T.unsafe(nil), Integer) # The options mask used by default used for parsing HTML4::Document and HTML4::DocumentFragment # -# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:158 +# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:162 Nokogiri::XML::ParseOptions::DEFAULT_HTML = T.let(T.unsafe(nil), Integer) # The options mask used by default used for parsing XML::Schema # -# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:161 +# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:165 Nokogiri::XML::ParseOptions::DEFAULT_SCHEMA = T.let(T.unsafe(nil), Integer) # The options mask used by default for parsing XML::Document and XML::DocumentFragment # -# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:152 +# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:151 Nokogiri::XML::ParseOptions::DEFAULT_XML = T.let(T.unsafe(nil), Integer) -# The options mask used by default used for parsing XSLT::Stylesheet +# Shorthand options mask useful for parsing XSLT stylesheets: +# sets RECOVER, NONET, NOENT, DTDLOAD, DTDATTR, NOCDATA, BIG_LINES. # -# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:155 +# 🛡 This option set includes `NOENT` and `DTDLOAD` which are unsafe for untrusted +# documents. Do not parse untrusted XSLT stylesheets. See Nokogiri::XSLT for more +# information. +# +# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:159 Nokogiri::XML::ParseOptions::DEFAULT_XSLT = T.let(T.unsafe(nil), Integer) # Default DTD attributes. On by default for XSLT::Stylesheet. @@ -6335,7 +6339,7 @@ Nokogiri::XML::ParseOptions::DTDATTR = T.let(T.unsafe(nil), Integer) # Load external subsets. On by default for XSLT::Stylesheet. # -# ⚠ It is UNSAFE to set this option when parsing untrusted documents. +# 🛡 It is UNSAFE to set this option when parsing untrusted documents. # # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:85 Nokogiri::XML::ParseOptions::DTDLOAD = T.let(T.unsafe(nil), Integer) @@ -6347,14 +6351,14 @@ Nokogiri::XML::ParseOptions::DTDVALID = T.let(T.unsafe(nil), Integer) # Relax any hardcoded limit from the parser. Off by default. # -# ⚠ It is UNSAFE to set this option when parsing untrusted documents. +# 🛡 It is UNSAFE to set this option when parsing untrusted documents. # -# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:144 +# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:143 Nokogiri::XML::ParseOptions::HUGE = T.let(T.unsafe(nil), Integer) # Do not fixup XInclude xml:base uris. Off by default # -# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:139 +# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:138 Nokogiri::XML::ParseOptions::NOBASEFIX = T.let(T.unsafe(nil), Integer) # Remove blank nodes. Off by default. @@ -6376,7 +6380,7 @@ Nokogiri::XML::ParseOptions::NODICT = T.let(T.unsafe(nil), Integer) # # ⚠ This option enables entity substitution, contrary to what the name implies. # -# ⚠ It is UNSAFE to set this option when parsing untrusted documents. +# 🛡 It is UNSAFE to set this option when parsing untrusted documents. # # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:80 Nokogiri::XML::ParseOptions::NOENT = T.let(T.unsafe(nil), Integer) @@ -6389,7 +6393,7 @@ Nokogiri::XML::ParseOptions::NOERROR = T.let(T.unsafe(nil), Integer) # Forbid network access. On by default for XML::Document, XML::DocumentFragment, # HTML4::Document, HTML4::DocumentFragment, XSLT::Stylesheet, and XML::Schema. # -# ⚠ It is UNSAFE to unset this option when parsing untrusted documents. +# 🛡 It is UNSAFE to unset this option when parsing untrusted documents. # # pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:115 Nokogiri::XML::ParseOptions::NONET = T.let(T.unsafe(nil), Integer) @@ -6411,7 +6415,7 @@ Nokogiri::XML::ParseOptions::NSCLEAN = T.let(T.unsafe(nil), Integer) # Parse using XML-1.0 before update 5. Off by default # -# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:136 +# pkg:gem/nokogiri#lib/nokogiri/xml/parse_options.rb:135 Nokogiri::XML::ParseOptions::OLD10 = T.let(T.unsafe(nil), Integer) # Enable pedantic error reporting. Off by default. @@ -6857,7 +6861,7 @@ module Nokogiri::XML::SAX; end # of ParserContext#replace_entities. (Recall that the default value of # ParserContext#replace_entities is `false`.) # -# ⚠ It is UNSAFE to set ParserContext#replace_entities to `true` when parsing untrusted +# 🛡 It is UNSAFE to set ParserContext#replace_entities to `true` when parsing untrusted # documents. # # 💡 For more information on entity types, see [Wikipedia's page on @@ -7932,8 +7936,14 @@ class Nokogiri::XML::XPathContext end end -# See Nokogiri::XSLT::Stylesheet for creating and manipulating -# Stylesheet object. +# See Nokogiri::XSLT::Stylesheet for creating and manipulating Stylesheet objects. +# +# 🛡 Do not use this module for untrusted stylesheet documents. libxslt does not support +# safely processing untrusted stylesheets. Untrusted stylesheets may access the file system and +# network, consume large amounts of CPU, memory, or other system resources, and IO and file +# access are not restricted. Additionally, the stylesheet is parsed by libxml2 with +NOENT+ and +# +DTDLOAD+ enabled (see ParseOptions::DEFAULT_XSLT), meaning that external entities will be +# resolved and external subsets will be loaded during parsing. # # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 module Nokogiri::XSLT @@ -7944,6 +7954,9 @@ module Nokogiri::XSLT # # Parse the stylesheet in +xsl+, registering optional +modules+ as custom class handlers. # + # 🛡 Do not pass untrusted stylesheet content to this method. See Nokogiri::XSLT for more + # information. + # # [Parameters] # - +xsl+ (String) XSL content to be parsed into a stylesheet # - +modules+ (Hash) A hash of URI-to-handler relations for linking a @@ -7991,7 +8004,7 @@ module Nokogiri::XSLT # # " raB\n" + # # "\n" # - # pkg:gem/nokogiri#lib/nokogiri/xslt.rb:70 + # pkg:gem/nokogiri#lib/nokogiri/xslt.rb:79 def parse(string, modules = T.unsafe(nil)); end # :call-seq: @@ -8005,7 +8018,7 @@ module Nokogiri::XSLT # # [Returns] Array of string parameters, with quotes correctly escaped for use with XSLT::Stylesheet.transform # - # pkg:gem/nokogiri#lib/nokogiri/xslt.rb:94 + # pkg:gem/nokogiri#lib/nokogiri/xslt.rb:103 def quote_params(params); end # call-seq: @@ -8027,15 +8040,20 @@ module Nokogiri::XSLT end end -# A Stylesheet represents an XSLT Stylesheet object. Stylesheet creation -# is done through Nokogiri.XSLT. Here is an example of transforming -# an XML::Document with a Stylesheet: +# A Stylesheet represents an XSLT Stylesheet object. Stylesheet creation is done through +# Nokogiri::XSLT.parse (or the convenience method Nokogiri.XSLT). Here is an example of +# transforming an XML::Document with a Stylesheet: # # doc = Nokogiri::XML(File.read('some_file.xml')) # xslt = Nokogiri::XSLT(File.read('some_transformer.xslt')) # # xslt.transform(doc) # => Nokogiri::XML::Document # +# 🛡 This class does not support execution of untrusted stylesheets. An untrusted +# stylesheet may consume a large amount of CPU, memory, or other system resources during +# transformation, and IO and file access are not restricted. See Nokogiri::XSLT for more +# information about the security implications of untrusted stylesheets. +# # Many XSLT transformations include serialization behavior to emit a non-XML document. For these # cases, please take care to invoke the #serialize method on the result of the transformation: # @@ -8068,7 +8086,7 @@ class Nokogiri::XSLT::Stylesheet # # See Nokogiri::XSLT::Stylesheet#transform for more information and examples. # - # pkg:gem/nokogiri#lib/nokogiri/xslt/stylesheet.rb:44 + # pkg:gem/nokogiri#lib/nokogiri/xslt/stylesheet.rb:49 def apply_to(document, params = T.unsafe(nil)); end # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7 diff --git a/sorbet/rbi/gems/packwerk@3.2.3.rbi b/sorbet/rbi/gems/packwerk@3.3.0.rbi similarity index 75% rename from sorbet/rbi/gems/packwerk@3.2.3.rbi rename to sorbet/rbi/gems/packwerk@3.3.0.rbi index 4343dd8..e7e1900 100644 --- a/sorbet/rbi/gems/packwerk@3.2.3.rbi +++ b/sorbet/rbi/gems/packwerk@3.3.0.rbi @@ -5,7 +5,7 @@ # Please instead update this file by running `bin/tapioca gem packwerk`. -# pkg:gem/packwerk#lib/packwerk.rb:14 +# pkg:gem/packwerk#lib/packwerk.rb:13 module Packwerk extend ::ActiveSupport::Autoload end @@ -18,6 +18,8 @@ class Packwerk::ApplicationValidator include ::Packwerk::Validator extend ::ActiveSupport::Autoload + # @override + # # pkg:gem/packwerk#lib/packwerk/application_validator.rb:25 sig do override @@ -28,7 +30,7 @@ class Packwerk::ApplicationValidator end def call(package_set, configuration); end - # pkg:gem/packwerk#lib/packwerk/application_validator.rb:19 + # pkg:gem/packwerk#lib/packwerk/application_validator.rb:18 sig do params( package_set: Packwerk::PackageSet, @@ -37,33 +39,35 @@ class Packwerk::ApplicationValidator end def check_all(package_set, configuration); end - # pkg:gem/packwerk#lib/packwerk/application_validator.rb:72 + # pkg:gem/packwerk#lib/packwerk/application_validator.rb:73 sig { params(configuration: ::Packwerk::Configuration).returns(::Packwerk::Validator::Result) } def check_application_structure(configuration); end - # pkg:gem/packwerk#lib/packwerk/application_validator.rb:88 + # pkg:gem/packwerk#lib/packwerk/application_validator.rb:89 sig { params(configuration: ::Packwerk::Configuration).returns(::Packwerk::Validator::Result) } def check_package_manifest_paths(configuration); end - # pkg:gem/packwerk#lib/packwerk/application_validator.rb:44 + # pkg:gem/packwerk#lib/packwerk/application_validator.rb:45 sig { params(configuration: ::Packwerk::Configuration).returns(::Packwerk::Validator::Result) } def check_package_manifest_syntax(configuration); end - # pkg:gem/packwerk#lib/packwerk/application_validator.rb:109 + # pkg:gem/packwerk#lib/packwerk/application_validator.rb:110 sig { params(configuration: ::Packwerk::Configuration).returns(::Packwerk::Validator::Result) } def check_root_package_exists(configuration); end - # pkg:gem/packwerk#lib/packwerk/application_validator.rb:37 + # @override + # + # pkg:gem/packwerk#lib/packwerk/application_validator.rb:38 sig { override.returns(T::Array[::String]) } def permitted_keys; end private - # pkg:gem/packwerk#lib/packwerk/application_validator.rb:128 + # pkg:gem/packwerk#lib/packwerk/application_validator.rb:129 sig { params(list: T.untyped).returns(T.untyped) } def format_yaml_strings(list); end - # pkg:gem/packwerk#lib/packwerk/application_validator.rb:133 + # pkg:gem/packwerk#lib/packwerk/application_validator.rb:134 sig { params(configuration: ::Packwerk::Configuration, paths: T::Array[::String]).returns(T::Array[::Pathname]) } def relative_paths(configuration, paths); end end @@ -74,17 +78,19 @@ end class Packwerk::AssociationInspector include ::Packwerk::ConstantNameInspector - # pkg:gem/packwerk#lib/packwerk/association_inspector.rb:29 + # pkg:gem/packwerk#lib/packwerk/association_inspector.rb:17 sig do params( inflector: T.class_of(ActiveSupport::Inflector), - custom_associations: T.any(T::Array[::Symbol], T::Set[::Symbol]), + custom_associations: T::Set[::Symbol], excluded_files: T::Set[::String] ).void end def initialize(inflector:, custom_associations: T.unsafe(nil), excluded_files: T.unsafe(nil)); end - # pkg:gem/packwerk#lib/packwerk/association_inspector.rb:40 + # @override + # + # pkg:gem/packwerk#lib/packwerk/association_inspector.rb:25 sig do override .params( @@ -97,64 +103,61 @@ class Packwerk::AssociationInspector private - # pkg:gem/packwerk#lib/packwerk/association_inspector.rb:65 + # pkg:gem/packwerk#lib/packwerk/association_inspector.rb:50 sig { params(node: ::AST::Node).returns(T::Boolean) } def association?(node); end - # pkg:gem/packwerk#lib/packwerk/association_inspector.rb:79 + # pkg:gem/packwerk#lib/packwerk/association_inspector.rb:64 sig { params(arguments: T::Array[::AST::Node]).returns(T.nilable(T.any(::String, ::Symbol))) } def association_name(arguments); end - # pkg:gem/packwerk#lib/packwerk/association_inspector.rb:71 + # pkg:gem/packwerk#lib/packwerk/association_inspector.rb:56 sig { params(arguments: T::Array[::AST::Node]).returns(T.nilable(::AST::Node)) } def custom_class_name(arguments); end - # pkg:gem/packwerk#lib/packwerk/association_inspector.rb:60 + # pkg:gem/packwerk#lib/packwerk/association_inspector.rb:45 sig { params(relative_file: ::String).returns(T::Boolean) } def excluded?(relative_file); end end -# pkg:gem/packwerk#lib/packwerk/association_inspector.rb:10 -Packwerk::AssociationInspector::CustomAssociations = T.type_alias { T.any(T::Array[::Symbol], T::Set[::Symbol]) } - -# pkg:gem/packwerk#lib/packwerk/association_inspector.rb:12 +# pkg:gem/packwerk#lib/packwerk/association_inspector.rb:9 Packwerk::AssociationInspector::RAILS_ASSOCIATIONS = T.let(T.unsafe(nil), Set) # pkg:gem/packwerk#lib/packwerk/cache.rb:7 class Packwerk::Cache - # pkg:gem/packwerk#lib/packwerk/cache.rb:52 + # pkg:gem/packwerk#lib/packwerk/cache.rb:67 sig { params(enable_cache: T::Boolean, cache_directory: ::Pathname, config_path: T.nilable(::String)).void } def initialize(enable_cache:, cache_directory:, config_path:); end - # pkg:gem/packwerk#lib/packwerk/cache.rb:67 + # pkg:gem/packwerk#lib/packwerk/cache.rb:82 sig { void } def bust_cache!; end - # pkg:gem/packwerk#lib/packwerk/cache.rb:133 + # pkg:gem/packwerk#lib/packwerk/cache.rb:142 sig { params(contents: ::String, contents_key: ::Symbol).void } def bust_cache_if_contents_have_changed(contents, contents_key); end - # pkg:gem/packwerk#lib/packwerk/cache.rb:128 + # pkg:gem/packwerk#lib/packwerk/cache.rb:137 sig { void } def bust_cache_if_inflections_have_changed!; end - # pkg:gem/packwerk#lib/packwerk/cache.rb:121 + # pkg:gem/packwerk#lib/packwerk/cache.rb:130 sig { void } def bust_cache_if_packwerk_yml_has_changed!; end - # pkg:gem/packwerk#lib/packwerk/cache.rb:157 + # pkg:gem/packwerk#lib/packwerk/cache.rb:166 sig { void } def create_cache_directory!; end - # pkg:gem/packwerk#lib/packwerk/cache.rb:109 + # pkg:gem/packwerk#lib/packwerk/cache.rb:118 sig { params(file: ::String).returns(::String) } def digest_for_file(file); end - # pkg:gem/packwerk#lib/packwerk/cache.rb:114 + # pkg:gem/packwerk#lib/packwerk/cache.rb:123 sig { params(str: ::String).returns(::String) } def digest_for_string(str); end - # pkg:gem/packwerk#lib/packwerk/cache.rb:77 + # pkg:gem/packwerk#lib/packwerk/cache.rb:87 sig do params( file_path: ::String, @@ -164,69 +167,92 @@ class Packwerk::Cache def with_cache(file_path, &block); end end -# pkg:gem/packwerk#lib/packwerk/cache.rb:10 -class Packwerk::Cache::CacheContents < ::T::Struct - const :file_contents_digest, ::String - const :unresolved_references, T::Array[::Packwerk::UnresolvedReference] +# pkg:gem/packwerk#lib/packwerk/cache.rb:8 +class Packwerk::Cache::CacheContents + # pkg:gem/packwerk#lib/packwerk/cache.rb:16 + sig { params(file_contents_digest: ::String, unresolved_references: T::Array[::Packwerk::UnresolvedReference]).void } + def initialize(file_contents_digest:, unresolved_references:); end + + # pkg:gem/packwerk#lib/packwerk/cache.rb:10 + sig { returns(::String) } + def file_contents_digest; end - # pkg:gem/packwerk#lib/packwerk/cache.rb:39 + # pkg:gem/packwerk#lib/packwerk/cache.rb:59 sig { returns(::String) } def serialize; end + # pkg:gem/packwerk#lib/packwerk/cache.rb:42 + sig { params(_args: T.untyped).returns(::String) } + def to_json(*_args); end + + # pkg:gem/packwerk#lib/packwerk/cache.rb:13 + sig { returns(T::Array[::Packwerk::UnresolvedReference]) } + def unresolved_references; end + class << self - # pkg:gem/packwerk#lib/packwerk/cache.rb:20 + # pkg:gem/packwerk#lib/packwerk/cache.rb:23 sig { params(serialized_cache_contents: ::String).returns(::Packwerk::Cache::CacheContents) } def deserialize(serialized_cache_contents); end end end -# pkg:gem/packwerk#lib/packwerk/cache.rb:44 +# pkg:gem/packwerk#lib/packwerk/cache.rb:64 Packwerk::Cache::CacheShape = T.type_alias { T::Hash[::String, ::Packwerk::Cache::CacheContents] } +# @abstract +# # pkg:gem/packwerk#lib/packwerk/checker.rb:5 module Packwerk::Checker abstract! + # @abstract + # # pkg:gem/packwerk#lib/packwerk/checker.rb:58 sig { abstract.params(reference: ::Packwerk::Reference).returns(T::Boolean) } def invalid_reference?(reference); end - # pkg:gem/packwerk#lib/packwerk/checker.rb:61 + # @abstract + # + # pkg:gem/packwerk#lib/packwerk/checker.rb:62 sig { abstract.params(reference: ::Packwerk::Reference).returns(::String) } def message(reference); end - # pkg:gem/packwerk#lib/packwerk/checker.rb:55 + # @abstract + # + # pkg:gem/packwerk#lib/packwerk/checker.rb:54 sig { abstract.params(offense: ::Packwerk::ReferenceOffense).returns(T::Boolean) } def strict_mode_violation?(offense); end - # pkg:gem/packwerk#lib/packwerk/checker.rb:52 + # @abstract + # + # pkg:gem/packwerk#lib/packwerk/checker.rb:50 sig { abstract.returns(::String) } def violation_type; end class << self - # pkg:gem/packwerk#lib/packwerk/checker.rb:20 + # pkg:gem/packwerk#lib/packwerk/checker.rb:17 sig { returns(T::Array[::Packwerk::Checker]) } def all; end - # pkg:gem/packwerk#lib/packwerk/checker.rb:26 + # pkg:gem/packwerk#lib/packwerk/checker.rb:23 sig { params(violation_type: ::String).returns(::Packwerk::Checker) } def find(violation_type); end - # pkg:gem/packwerk#lib/packwerk/checker.rb:15 + # pkg:gem/packwerk#lib/packwerk/checker.rb:12 sig { params(base: T::Class[T.anything]).void } def included(base); end private - # pkg:gem/packwerk#lib/packwerk/checker.rb:43 + # pkg:gem/packwerk#lib/packwerk/checker.rb:40 sig { params(name: ::String).returns(::Packwerk::Checker) } def checker_by_violation_type(name); end - # pkg:gem/packwerk#lib/packwerk/checker.rb:38 + # pkg:gem/packwerk#lib/packwerk/checker.rb:35 sig { returns(T::Array[T::Class[T.anything]]) } def checkers; end - # pkg:gem/packwerk#lib/packwerk/checker.rb:33 + # pkg:gem/packwerk#lib/packwerk/checker.rb:30 sig { void } def load_defaults; end end @@ -236,7 +262,7 @@ end # # pkg:gem/packwerk#lib/packwerk/cli.rb:6 class Packwerk::Cli - # pkg:gem/packwerk#lib/packwerk/cli.rb:19 + # pkg:gem/packwerk#lib/packwerk/cli.rb:8 sig do params( configuration: T.nilable(::Packwerk::Configuration), @@ -249,11 +275,11 @@ class Packwerk::Cli end def initialize(configuration: T.unsafe(nil), out: T.unsafe(nil), err_out: T.unsafe(nil), environment: T.unsafe(nil), style: T.unsafe(nil), offenses_formatter: T.unsafe(nil)); end - # pkg:gem/packwerk#lib/packwerk/cli.rb:46 + # pkg:gem/packwerk#lib/packwerk/cli.rb:32 sig { params(args: T::Array[::String]).returns(T::Boolean) } def execute_command(args); end - # pkg:gem/packwerk#lib/packwerk/cli.rb:40 + # pkg:gem/packwerk#lib/packwerk/cli.rb:26 sig { params(args: T::Array[::String]).returns(T.noreturn) } def run(args); end end @@ -263,31 +289,33 @@ module Packwerk::Commands extend ::ActiveSupport::Autoload class << self - # pkg:gem/packwerk#lib/packwerk/commands.rb:35 + # pkg:gem/packwerk#lib/packwerk/commands.rb:32 sig { returns(T::Array[::Packwerk::Commands::LazyLoadedEntry]) } def all; end - # pkg:gem/packwerk#lib/packwerk/commands.rb:28 + # pkg:gem/packwerk#lib/packwerk/commands.rb:25 sig { params(name_or_alias: ::String).returns(T.nilable(T.class_of(Packwerk::Commands::BaseCommand))) } def for(name_or_alias); end - # pkg:gem/packwerk#lib/packwerk/commands.rb:23 + # pkg:gem/packwerk#lib/packwerk/commands.rb:20 sig { params(name: ::String, aliases: T::Array[::String]).void } def register(name, aliases: T.unsafe(nil)); end private - # pkg:gem/packwerk#lib/packwerk/commands.rb:42 + # pkg:gem/packwerk#lib/packwerk/commands.rb:39 sig { returns(T::Array[::Packwerk::Commands::LazyLoadedEntry]) } def registry; end end end +# @abstract +# # pkg:gem/packwerk#lib/packwerk/commands/base_command.rb:6 class Packwerk::Commands::BaseCommand abstract! - # pkg:gem/packwerk#lib/packwerk/commands/base_command.rb:36 + # pkg:gem/packwerk#lib/packwerk/commands/base_command.rb:25 sig do params( args: T::Array[::String], @@ -300,38 +328,40 @@ class Packwerk::Commands::BaseCommand end def initialize(args, configuration:, out:, err_out:, progress_formatter:, offenses_formatter:); end - # pkg:gem/packwerk#lib/packwerk/commands/base_command.rb:46 + # @abstract + # + # pkg:gem/packwerk#lib/packwerk/commands/base_command.rb:36 sig { abstract.returns(T::Boolean) } def run; end private - # pkg:gem/packwerk#lib/packwerk/commands/base_command.rb:51 + # pkg:gem/packwerk#lib/packwerk/commands/base_command.rb:41 sig { returns(T::Array[::String]) } def args; end - # pkg:gem/packwerk#lib/packwerk/commands/base_command.rb:54 + # pkg:gem/packwerk#lib/packwerk/commands/base_command.rb:44 sig { returns(::Packwerk::Configuration) } def configuration; end - # pkg:gem/packwerk#lib/packwerk/commands/base_command.rb:60 + # pkg:gem/packwerk#lib/packwerk/commands/base_command.rb:50 sig { returns(T.any(::IO, ::StringIO)) } def err_out; end - # pkg:gem/packwerk#lib/packwerk/commands/base_command.rb:66 + # pkg:gem/packwerk#lib/packwerk/commands/base_command.rb:56 sig { returns(::Packwerk::OffensesFormatter) } def offenses_formatter; end - # pkg:gem/packwerk#lib/packwerk/commands/base_command.rb:57 + # pkg:gem/packwerk#lib/packwerk/commands/base_command.rb:47 sig { returns(T.any(::IO, ::StringIO)) } def out; end - # pkg:gem/packwerk#lib/packwerk/commands/base_command.rb:63 + # pkg:gem/packwerk#lib/packwerk/commands/base_command.rb:53 sig { returns(::Packwerk::Formatters::ProgressFormatter) } def progress_formatter; end class << self - # pkg:gem/packwerk#lib/packwerk/commands/base_command.rb:17 + # pkg:gem/packwerk#lib/packwerk/commands/base_command.rb:15 sig { params(description: T.nilable(::String)).returns(::String) } def description(description = T.unsafe(nil)); end end @@ -341,6 +371,8 @@ end class Packwerk::Commands::CheckCommand < ::Packwerk::Commands::BaseCommand include ::Packwerk::Commands::UsesParseRun + # @override + # # pkg:gem/packwerk#lib/packwerk/commands/check_command.rb:13 sig { override.returns(T::Boolean) } def run; end @@ -358,43 +390,47 @@ end # pkg:gem/packwerk#lib/packwerk/commands/help_command.rb:6 class Packwerk::Commands::HelpCommand < ::Packwerk::Commands::BaseCommand - # pkg:gem/packwerk#lib/packwerk/commands/help_command.rb:12 + # @override + # + # pkg:gem/packwerk#lib/packwerk/commands/help_command.rb:11 sig { override.returns(T::Boolean) } def run; end private - # pkg:gem/packwerk#lib/packwerk/commands/help_command.rb:26 + # pkg:gem/packwerk#lib/packwerk/commands/help_command.rb:25 sig { returns(::String) } def command_help_lines; end end # pkg:gem/packwerk#lib/packwerk/commands/init_command.rb:6 class Packwerk::Commands::InitCommand < ::Packwerk::Commands::BaseCommand - # pkg:gem/packwerk#lib/packwerk/commands/init_command.rb:12 + # @override + # + # pkg:gem/packwerk#lib/packwerk/commands/init_command.rb:11 sig { override.returns(T::Boolean) } def run; end end # pkg:gem/packwerk#lib/packwerk/commands/lazy_loaded_entry.rb:6 class Packwerk::Commands::LazyLoadedEntry - # pkg:gem/packwerk#lib/packwerk/commands/lazy_loaded_entry.rb:13 + # pkg:gem/packwerk#lib/packwerk/commands/lazy_loaded_entry.rb:11 sig { params(name: ::String, aliases: T::Array[::String]).void } def initialize(name, aliases: T.unsafe(nil)); end - # pkg:gem/packwerk#lib/packwerk/commands/lazy_loaded_entry.rb:19 + # pkg:gem/packwerk#lib/packwerk/commands/lazy_loaded_entry.rb:17 sig { returns(T.class_of(Packwerk::Commands::BaseCommand)) } def command_class; end - # pkg:gem/packwerk#lib/packwerk/commands/lazy_loaded_entry.rb:25 + # pkg:gem/packwerk#lib/packwerk/commands/lazy_loaded_entry.rb:23 sig { returns(::String) } def description; end - # pkg:gem/packwerk#lib/packwerk/commands/lazy_loaded_entry.rb:30 + # pkg:gem/packwerk#lib/packwerk/commands/lazy_loaded_entry.rb:28 sig { params(name_or_alias: ::String).returns(T::Boolean) } def matches_command?(name_or_alias); end - # pkg:gem/packwerk#lib/packwerk/commands/lazy_loaded_entry.rb:10 + # pkg:gem/packwerk#lib/packwerk/commands/lazy_loaded_entry.rb:8 sig { returns(::String) } def name; end end @@ -403,6 +439,8 @@ end class Packwerk::Commands::UpdateTodoCommand < ::Packwerk::Commands::BaseCommand include ::Packwerk::Commands::UsesParseRun + # @override + # # pkg:gem/packwerk#lib/packwerk/commands/update_todo_command.rb:13 sig { override.returns(T::Boolean) } def run; end @@ -412,7 +450,7 @@ end module Packwerk::Commands::UsesParseRun requires_ancestor { Packwerk::Commands::BaseCommand } - # pkg:gem/packwerk#lib/packwerk/commands/uses_parse_run.rb:24 + # pkg:gem/packwerk#lib/packwerk/commands/uses_parse_run.rb:14 sig do params( args: T::Array[::String], @@ -427,125 +465,129 @@ module Packwerk::Commands::UsesParseRun private - # pkg:gem/packwerk#lib/packwerk/commands/uses_parse_run.rb:34 + # pkg:gem/packwerk#lib/packwerk/commands/uses_parse_run.rb:24 sig { returns(::Packwerk::FilesForProcessing) } def fetch_files_to_process; end - # pkg:gem/packwerk#lib/packwerk/commands/uses_parse_run.rb:43 + # pkg:gem/packwerk#lib/packwerk/commands/uses_parse_run.rb:33 sig { returns(T.nilable(::Packwerk::OffensesFormatter)) } def offenses_formatter_from_options; end - # pkg:gem/packwerk#lib/packwerk/commands/uses_parse_run.rb:48 + # pkg:gem/packwerk#lib/packwerk/commands/uses_parse_run.rb:38 sig { returns(::Packwerk::ParseRun) } def parse_run; end - # pkg:gem/packwerk#lib/packwerk/commands/uses_parse_run.rb:56 + # pkg:gem/packwerk#lib/packwerk/commands/uses_parse_run.rb:46 sig { returns(T::Hash[::Symbol, T.untyped]) } def parsed_options; end end # pkg:gem/packwerk#lib/packwerk/commands/validate_command.rb:6 class Packwerk::Commands::ValidateCommand < ::Packwerk::Commands::BaseCommand - # pkg:gem/packwerk#lib/packwerk/commands/validate_command.rb:12 + # @override + # + # pkg:gem/packwerk#lib/packwerk/commands/validate_command.rb:11 sig { override.returns(T::Boolean) } def run; end private - # pkg:gem/packwerk#lib/packwerk/commands/validate_command.rb:38 + # pkg:gem/packwerk#lib/packwerk/commands/validate_command.rb:37 sig { returns(Packwerk::PackageSet) } def package_set; end - # pkg:gem/packwerk#lib/packwerk/commands/validate_command.rb:33 + # pkg:gem/packwerk#lib/packwerk/commands/validate_command.rb:32 sig { returns(::Packwerk::ApplicationValidator) } def validator; end end # pkg:gem/packwerk#lib/packwerk/commands/version_command.rb:6 class Packwerk::Commands::VersionCommand < ::Packwerk::Commands::BaseCommand - # pkg:gem/packwerk#lib/packwerk/commands/version_command.rb:12 + # @override + # + # pkg:gem/packwerk#lib/packwerk/commands/version_command.rb:11 sig { override.returns(T::Boolean) } def run; end end # pkg:gem/packwerk#lib/packwerk/configuration.rb:8 class Packwerk::Configuration - # pkg:gem/packwerk#lib/packwerk/configuration.rb:75 + # pkg:gem/packwerk#lib/packwerk/configuration.rb:66 sig { params(configs: T::Hash[::String, T.untyped], config_path: T.nilable(::String)).void } def initialize(configs = T.unsafe(nil), config_path: T.unsafe(nil)); end - # pkg:gem/packwerk#lib/packwerk/configuration.rb:58 + # pkg:gem/packwerk#lib/packwerk/configuration.rb:54 sig { returns(T::Array[::String]) } def associations_exclude; end - # pkg:gem/packwerk#lib/packwerk/configuration.rb:64 + # pkg:gem/packwerk#lib/packwerk/configuration.rb:60 sig { returns(::Pathname) } def cache_directory; end - # pkg:gem/packwerk#lib/packwerk/configuration.rb:118 + # pkg:gem/packwerk#lib/packwerk/configuration.rb:104 sig { returns(T::Boolean) } def cache_enabled?; end - # pkg:gem/packwerk#lib/packwerk/configuration.rb:61 + # pkg:gem/packwerk#lib/packwerk/configuration.rb:57 sig { returns(T.nilable(::String)) } def config_path; end - # pkg:gem/packwerk#lib/packwerk/configuration.rb:55 + # pkg:gem/packwerk#lib/packwerk/configuration.rb:51 sig { returns(T::Array[::Symbol]) } def custom_associations; end - # pkg:gem/packwerk#lib/packwerk/configuration.rb:46 + # pkg:gem/packwerk#lib/packwerk/configuration.rb:42 sig { returns(T::Array[::String]) } def exclude; end - # pkg:gem/packwerk#lib/packwerk/configuration.rb:43 + # pkg:gem/packwerk#lib/packwerk/configuration.rb:39 sig { returns(T::Array[::String]) } def include; end - # pkg:gem/packwerk#lib/packwerk/configuration.rb:100 - sig { returns(T::Hash[::String, ::Module]) } + # pkg:gem/packwerk#lib/packwerk/configuration.rb:89 + sig { returns(T::Hash[::String, T::Module[T.anything]]) } def load_paths; end - # pkg:gem/packwerk#lib/packwerk/configuration.rb:113 + # pkg:gem/packwerk#lib/packwerk/configuration.rb:99 sig { returns(::Packwerk::OffensesFormatter) } def offenses_formatter; end - # pkg:gem/packwerk#lib/packwerk/configuration.rb:52 + # pkg:gem/packwerk#lib/packwerk/configuration.rb:48 sig { returns(T.any(::String, T::Array[::String])) } def package_paths; end - # pkg:gem/packwerk#lib/packwerk/configuration.rb:67 + # pkg:gem/packwerk#lib/packwerk/configuration.rb:63 sig { params(parallel: T::Boolean).returns(T::Boolean) } def parallel=(parallel); end - # pkg:gem/packwerk#lib/packwerk/configuration.rb:108 + # pkg:gem/packwerk#lib/packwerk/configuration.rb:94 sig { returns(T::Boolean) } def parallel?; end - # pkg:gem/packwerk#lib/packwerk/configuration.rb:49 + # pkg:gem/packwerk#lib/packwerk/configuration.rb:45 sig { returns(::String) } def root_path; end class << self - # pkg:gem/packwerk#lib/packwerk/configuration.rb:15 + # pkg:gem/packwerk#lib/packwerk/configuration.rb:11 sig { params(path: ::String).returns(::Packwerk::Configuration) } def from_path(path = T.unsafe(nil)); end private - # pkg:gem/packwerk#lib/packwerk/configuration.rb:30 + # pkg:gem/packwerk#lib/packwerk/configuration.rb:26 sig { params(path: ::String).returns(::Packwerk::Configuration) } def from_packwerk_config(path); end end end -# pkg:gem/packwerk#lib/packwerk/configuration.rb:38 +# pkg:gem/packwerk#lib/packwerk/configuration.rb:34 Packwerk::Configuration::DEFAULT_CONFIG_PATH = T.let(T.unsafe(nil), String) -# pkg:gem/packwerk#lib/packwerk/configuration.rb:40 +# pkg:gem/packwerk#lib/packwerk/configuration.rb:36 Packwerk::Configuration::DEFAULT_EXCLUDE_GLOBS = T.let(T.unsafe(nil), Array) -# pkg:gem/packwerk#lib/packwerk/configuration.rb:39 +# pkg:gem/packwerk#lib/packwerk/configuration.rb:35 Packwerk::Configuration::DEFAULT_INCLUDE_GLOBS = T.let(T.unsafe(nil), Array) # Extracts a constant name from an AST node of type :const @@ -554,7 +596,9 @@ Packwerk::Configuration::DEFAULT_INCLUDE_GLOBS = T.let(T.unsafe(nil), Array) class Packwerk::ConstNodeInspector include ::Packwerk::ConstantNameInspector - # pkg:gem/packwerk#lib/packwerk/const_node_inspector.rb:15 + # @override + # + # pkg:gem/packwerk#lib/packwerk/const_node_inspector.rb:11 sig do override .params( @@ -567,53 +611,53 @@ class Packwerk::ConstNodeInspector private - # pkg:gem/packwerk#lib/packwerk/const_node_inspector.rb:43 + # pkg:gem/packwerk#lib/packwerk/const_node_inspector.rb:39 sig { params(node: ::AST::Node, parent: ::AST::Node).returns(T.nilable(T::Boolean)) } def constant_in_module_or_class_definition?(node, parent:); end - # pkg:gem/packwerk#lib/packwerk/const_node_inspector.rb:49 + # pkg:gem/packwerk#lib/packwerk/const_node_inspector.rb:45 sig { params(ancestors: T::Array[::AST::Node]).returns(::String) } def fully_qualify_constant(ancestors); end - # pkg:gem/packwerk#lib/packwerk/const_node_inspector.rb:38 + # pkg:gem/packwerk#lib/packwerk/const_node_inspector.rb:34 sig { params(parent: T.nilable(::AST::Node)).returns(T::Boolean) } def root_constant?(parent); end end -# pkg:gem/packwerk#lib/packwerk/constant_context.rb:7 +# pkg:gem/packwerk#lib/packwerk/constant_context.rb:5 class Packwerk::ConstantContext < ::Struct - # pkg:gem/packwerk#lib/packwerk/constant_context.rb:7 + # pkg:gem/packwerk#lib/packwerk/constant_context.rb:5 def location; end - # pkg:gem/packwerk#lib/packwerk/constant_context.rb:7 + # pkg:gem/packwerk#lib/packwerk/constant_context.rb:5 def location=(_); end - # pkg:gem/packwerk#lib/packwerk/constant_context.rb:7 + # pkg:gem/packwerk#lib/packwerk/constant_context.rb:5 def name; end - # pkg:gem/packwerk#lib/packwerk/constant_context.rb:7 + # pkg:gem/packwerk#lib/packwerk/constant_context.rb:5 def name=(_); end - # pkg:gem/packwerk#lib/packwerk/constant_context.rb:7 + # pkg:gem/packwerk#lib/packwerk/constant_context.rb:5 def package; end - # pkg:gem/packwerk#lib/packwerk/constant_context.rb:7 + # pkg:gem/packwerk#lib/packwerk/constant_context.rb:5 def package=(_); end class << self - # pkg:gem/packwerk#lib/packwerk/constant_context.rb:7 + # pkg:gem/packwerk#lib/packwerk/constant_context.rb:5 def [](*_arg0); end - # pkg:gem/packwerk#lib/packwerk/constant_context.rb:7 + # pkg:gem/packwerk#lib/packwerk/constant_context.rb:5 def inspect; end - # pkg:gem/packwerk#lib/packwerk/constant_context.rb:7 + # pkg:gem/packwerk#lib/packwerk/constant_context.rb:5 def keyword_init?; end - # pkg:gem/packwerk#lib/packwerk/constant_context.rb:7 + # pkg:gem/packwerk#lib/packwerk/constant_context.rb:5 def members; end - # pkg:gem/packwerk#lib/packwerk/constant_context.rb:7 + # pkg:gem/packwerk#lib/packwerk/constant_context.rb:5 def new(*_arg0); end end end @@ -634,7 +678,7 @@ class Packwerk::ConstantDiscovery # @param constant_resolver [ConstantResolver] # @param packages [Packwerk::PackageSet] # - # pkg:gem/packwerk#lib/packwerk/constant_discovery.rb:25 + # pkg:gem/packwerk#lib/packwerk/constant_discovery.rb:21 sig { params(constant_resolver: ::ConstantResolver, packages: Packwerk::PackageSet).void } def initialize(constant_resolver:, packages:); end @@ -646,7 +690,7 @@ class Packwerk::ConstantDiscovery # used, e.g. ["Apps", "Models"] for `Apps::Models`. Defaults to [] which means top level. # @return [ConstantContext] # - # pkg:gem/packwerk#lib/packwerk/constant_discovery.rb:58 + # pkg:gem/packwerk#lib/packwerk/constant_discovery.rb:45 sig do params( const_name: ::String, @@ -662,18 +706,21 @@ class Packwerk::ConstantDiscovery # @return [Packwerk::Package] the package that contains the given file, # or nil if the path is not owned by any component # - # pkg:gem/packwerk#lib/packwerk/constant_discovery.rb:41 + # pkg:gem/packwerk#lib/packwerk/constant_discovery.rb:33 sig { params(path: ::String).returns(::Packwerk::Package) } def package_from_path(path); end end # An interface describing an object that can extract a constant name from an AST node. +# @interface # # pkg:gem/packwerk#lib/packwerk/constant_name_inspector.rb:8 module Packwerk::ConstantNameInspector interface! - # pkg:gem/packwerk#lib/packwerk/constant_name_inspector.rb:19 + # @abstract + # + # pkg:gem/packwerk#lib/packwerk/constant_name_inspector.rb:15 sig do abstract .params( @@ -685,10 +732,10 @@ module Packwerk::ConstantNameInspector def constant_name_from_node(node, ancestors:, relative_file:); end end -# pkg:gem/packwerk#lib/packwerk/cache.rb:162 +# pkg:gem/packwerk#lib/packwerk/cache.rb:171 class Packwerk::Debug class << self - # pkg:gem/packwerk#lib/packwerk/cache.rb:167 + # pkg:gem/packwerk#lib/packwerk/cache.rb:174 sig { params(out: ::String).void } def out(out); end end @@ -700,7 +747,7 @@ end # pkg:gem/packwerk#lib/packwerk/extension_loader.rb:7 module Packwerk::ExtensionLoader class << self - # pkg:gem/packwerk#lib/packwerk/extension_loader.rb:11 + # pkg:gem/packwerk#lib/packwerk/extension_loader.rb:10 sig { params(require_directive: ::String, config_dir_path: ::String).void } def load(require_directive, config_dir_path); end end @@ -708,7 +755,7 @@ end # pkg:gem/packwerk#lib/packwerk/file_processor.rb:7 class Packwerk::FileProcessor - # pkg:gem/packwerk#lib/packwerk/file_processor.rb:26 + # pkg:gem/packwerk#lib/packwerk/file_processor.rb:16 sig do params( node_processor_factory: ::Packwerk::NodeProcessorFactory, @@ -718,41 +765,55 @@ class Packwerk::FileProcessor end def initialize(node_processor_factory:, cache:, parser_factory: T.unsafe(nil)); end - # pkg:gem/packwerk#lib/packwerk/file_processor.rb:40 + # pkg:gem/packwerk#lib/packwerk/file_processor.rb:37 sig { params(relative_file: ::String).returns(::Packwerk::FileProcessor::ProcessedFile) } def call(relative_file); end private - # pkg:gem/packwerk#lib/packwerk/file_processor.rb:85 + # pkg:gem/packwerk#lib/packwerk/file_processor.rb:80 sig { params(relative_file: ::String, parser: ::Packwerk::Parsers::ParserInterface).returns(T.untyped) } def parse_into_ast(relative_file, parser); end - # pkg:gem/packwerk#lib/packwerk/file_processor.rb:92 + # pkg:gem/packwerk#lib/packwerk/file_processor.rb:87 sig { params(file_path: ::String).returns(T.nilable(::Packwerk::Parsers::ParserInterface)) } def parser_for(file_path); end - # pkg:gem/packwerk#lib/packwerk/file_processor.rb:74 + # pkg:gem/packwerk#lib/packwerk/file_processor.rb:69 sig { params(node: ::Parser::AST::Node, relative_file: ::String).returns(T::Array[::Packwerk::UnresolvedReference]) } def references_from_ast(node, relative_file); end end -# pkg:gem/packwerk#lib/packwerk/file_processor.rb:32 -class Packwerk::FileProcessor::ProcessedFile < ::T::Struct - const :unresolved_references, T::Array[::Packwerk::UnresolvedReference], default: T.unsafe(nil) - const :offenses, T::Array[::Packwerk::Offense], default: T.unsafe(nil) +# pkg:gem/packwerk#lib/packwerk/file_processor.rb:22 +class Packwerk::FileProcessor::ProcessedFile + # pkg:gem/packwerk#lib/packwerk/file_processor.rb:30 + sig do + params( + unresolved_references: T::Array[::Packwerk::UnresolvedReference], + offenses: T::Array[::Packwerk::Offense] + ).void + end + def initialize(unresolved_references: T.unsafe(nil), offenses: T.unsafe(nil)); end + + # pkg:gem/packwerk#lib/packwerk/file_processor.rb:27 + sig { returns(T::Array[::Packwerk::Offense]) } + def offenses; end + + # pkg:gem/packwerk#lib/packwerk/file_processor.rb:24 + sig { returns(T::Array[::Packwerk::UnresolvedReference]) } + def unresolved_references; end end -# pkg:gem/packwerk#lib/packwerk/file_processor.rb:10 +# pkg:gem/packwerk#lib/packwerk/file_processor.rb:8 class Packwerk::FileProcessor::UnknownFileTypeResult < ::Packwerk::Offense - # pkg:gem/packwerk#lib/packwerk/file_processor.rb:14 + # pkg:gem/packwerk#lib/packwerk/file_processor.rb:10 sig { params(file: ::String).void } def initialize(file:); end end # pkg:gem/packwerk#lib/packwerk/files_for_processing.rb:5 class Packwerk::FilesForProcessing - # pkg:gem/packwerk#lib/packwerk/files_for_processing.rb:32 + # pkg:gem/packwerk#lib/packwerk/files_for_processing.rb:16 sig do params( relative_file_paths: T::Array[::String], @@ -762,42 +823,42 @@ class Packwerk::FilesForProcessing end def initialize(relative_file_paths, configuration, ignore_nested_packages); end - # pkg:gem/packwerk#lib/packwerk/files_for_processing.rb:41 + # pkg:gem/packwerk#lib/packwerk/files_for_processing.rb:25 sig { returns(T::Set[::String]) } def files; end - # pkg:gem/packwerk#lib/packwerk/files_for_processing.rb:46 + # pkg:gem/packwerk#lib/packwerk/files_for_processing.rb:30 sig { returns(T::Boolean) } def files_specified?; end private - # pkg:gem/packwerk#lib/packwerk/files_for_processing.rb:105 + # pkg:gem/packwerk#lib/packwerk/files_for_processing.rb:89 sig { returns(T::Set[::String]) } def configured_excluded_files; end - # pkg:gem/packwerk#lib/packwerk/files_for_processing.rb:100 + # pkg:gem/packwerk#lib/packwerk/files_for_processing.rb:84 sig { returns(T::Set[::String]) } def configured_included_files; end - # pkg:gem/packwerk#lib/packwerk/files_for_processing.rb:53 + # pkg:gem/packwerk#lib/packwerk/files_for_processing.rb:37 sig { returns(T::Set[::String]) } def files_for_processing; end - # pkg:gem/packwerk#lib/packwerk/files_for_processing.rb:110 + # pkg:gem/packwerk#lib/packwerk/files_for_processing.rb:94 sig { params(relative_globs: T::Array[::String]).returns(T::Set[::String]) } def relative_files_for_globs(relative_globs); end - # pkg:gem/packwerk#lib/packwerk/files_for_processing.rb:64 + # pkg:gem/packwerk#lib/packwerk/files_for_processing.rb:48 sig { returns(T::Set[::String]) } def specified_files; end - # pkg:gem/packwerk#lib/packwerk/files_for_processing.rb:77 + # pkg:gem/packwerk#lib/packwerk/files_for_processing.rb:61 sig { params(relative_file_path: ::String).returns(T::Set[::String]) } def specified_included_files(relative_file_path); end class << self - # pkg:gem/packwerk#lib/packwerk/files_for_processing.rb:20 + # pkg:gem/packwerk#lib/packwerk/files_for_processing.rb:10 sig do params( relative_file_paths: T::Array[::String], @@ -809,10 +870,10 @@ class Packwerk::FilesForProcessing end end -# pkg:gem/packwerk#lib/packwerk/files_for_processing.rb:8 +# pkg:gem/packwerk#lib/packwerk/files_for_processing.rb:6 Packwerk::FilesForProcessing::RelativeFileSet = T.type_alias { T::Set[::String] } -# pkg:gem/packwerk#lib/packwerk.rb:44 +# pkg:gem/packwerk#lib/packwerk.rb:43 module Packwerk::Formatters extend ::ActiveSupport::Autoload end @@ -821,14 +882,20 @@ end class Packwerk::Formatters::DefaultOffensesFormatter include ::Packwerk::OffensesFormatter - # pkg:gem/packwerk#lib/packwerk/formatters/default_offenses_formatter.rb:33 + # @override + # + # pkg:gem/packwerk#lib/packwerk/formatters/default_offenses_formatter.rb:34 sig { override.returns(::String) } def identifier; end - # pkg:gem/packwerk#lib/packwerk/formatters/default_offenses_formatter.rb:14 + # @override + # + # pkg:gem/packwerk#lib/packwerk/formatters/default_offenses_formatter.rb:13 sig { override.params(offenses: T::Array[T.nilable(::Packwerk::Offense)]).returns(::String) } def show_offenses(offenses); end + # @override + # # pkg:gem/packwerk#lib/packwerk/formatters/default_offenses_formatter.rb:24 sig do override @@ -839,25 +906,27 @@ class Packwerk::Formatters::DefaultOffensesFormatter end def show_stale_violations(offense_collection, file_set); end - # pkg:gem/packwerk#lib/packwerk/formatters/default_offenses_formatter.rb:38 + # @override + # + # pkg:gem/packwerk#lib/packwerk/formatters/default_offenses_formatter.rb:40 sig { override.params(strict_mode_violations: T::Array[::Packwerk::ReferenceOffense]).returns(::String) } def show_strict_mode_violations(strict_mode_violations); end private - # pkg:gem/packwerk#lib/packwerk/formatters/default_offenses_formatter.rb:54 + # pkg:gem/packwerk#lib/packwerk/formatters/default_offenses_formatter.rb:56 sig { params(offense: ::Packwerk::ReferenceOffense).returns(::String) } def format_strict_mode_violation(offense); end - # pkg:gem/packwerk#lib/packwerk/formatters/default_offenses_formatter.rb:63 + # pkg:gem/packwerk#lib/packwerk/formatters/default_offenses_formatter.rb:65 sig { params(offenses: T::Array[T.nilable(::Packwerk::Offense)]).returns(::String) } def offenses_list(offenses); end - # pkg:gem/packwerk#lib/packwerk/formatters/default_offenses_formatter.rb:71 + # pkg:gem/packwerk#lib/packwerk/formatters/default_offenses_formatter.rb:73 sig { params(offenses: T::Array[T.nilable(::Packwerk::Offense)]).returns(::String) } def offenses_summary(offenses); end - # pkg:gem/packwerk#lib/packwerk/formatters/default_offenses_formatter.rb:49 + # pkg:gem/packwerk#lib/packwerk/formatters/default_offenses_formatter.rb:51 sig { returns(::Packwerk::OutputStyle) } def style; end end @@ -867,96 +936,96 @@ Packwerk::Formatters::DefaultOffensesFormatter::IDENTIFIER = T.let(T.unsafe(nil) # pkg:gem/packwerk#lib/packwerk/formatters/progress_formatter.rb:8 class Packwerk::Formatters::ProgressFormatter - # pkg:gem/packwerk#lib/packwerk/formatters/progress_formatter.rb:12 + # pkg:gem/packwerk#lib/packwerk/formatters/progress_formatter.rb:10 sig { params(out: T.any(::IO, ::StringIO), style: ::Packwerk::OutputStyle).void } def initialize(out, style: T.unsafe(nil)); end - # pkg:gem/packwerk#lib/packwerk/formatters/progress_formatter.rb:34 + # pkg:gem/packwerk#lib/packwerk/formatters/progress_formatter.rb:32 sig { params(failed: T::Boolean).void } def increment_progress(failed = T.unsafe(nil)); end - # pkg:gem/packwerk#lib/packwerk/formatters/progress_formatter.rb:53 + # pkg:gem/packwerk#lib/packwerk/formatters/progress_formatter.rb:51 sig { void } def interrupted; end - # pkg:gem/packwerk#lib/packwerk/formatters/progress_formatter.rb:48 + # pkg:gem/packwerk#lib/packwerk/formatters/progress_formatter.rb:46 sig { void } def mark_as_failed; end - # pkg:gem/packwerk#lib/packwerk/formatters/progress_formatter.rb:43 + # pkg:gem/packwerk#lib/packwerk/formatters/progress_formatter.rb:41 sig { void } def mark_as_inspected; end - # pkg:gem/packwerk#lib/packwerk/formatters/progress_formatter.rb:26 + # pkg:gem/packwerk#lib/packwerk/formatters/progress_formatter.rb:24 sig { params(target_files: T::Set[::String], block: T.proc.void).void } def started_inspection(target_files, &block); end - # pkg:gem/packwerk#lib/packwerk/formatters/progress_formatter.rb:18 + # pkg:gem/packwerk#lib/packwerk/formatters/progress_formatter.rb:16 sig { params(block: T.proc.void).void } def started_validation(&block); end private - # pkg:gem/packwerk#lib/packwerk/formatters/progress_formatter.rb:62 + # pkg:gem/packwerk#lib/packwerk/formatters/progress_formatter.rb:60 sig { params(execution_time: ::Float).void } def finished(execution_time); end - # pkg:gem/packwerk#lib/packwerk/formatters/progress_formatter.rb:74 + # pkg:gem/packwerk#lib/packwerk/formatters/progress_formatter.rb:72 sig { params(target_files: T::Set[::String]).void } def start_inspection(target_files); end - # pkg:gem/packwerk#lib/packwerk/formatters/progress_formatter.rb:69 + # pkg:gem/packwerk#lib/packwerk/formatters/progress_formatter.rb:67 sig { void } def start_validation; end end -# pkg:gem/packwerk#lib/packwerk.rb:79 +# pkg:gem/packwerk#lib/packwerk.rb:78 module Packwerk::Generators extend ::ActiveSupport::Autoload end # pkg:gem/packwerk#lib/packwerk/generators/configuration_file.rb:8 class Packwerk::Generators::ConfigurationFile - # pkg:gem/packwerk#lib/packwerk/generators/configuration_file.rb:23 + # pkg:gem/packwerk#lib/packwerk/generators/configuration_file.rb:19 sig { params(root: ::String, out: T.any(::IO, ::StringIO)).void } def initialize(root:, out: T.unsafe(nil)); end - # pkg:gem/packwerk#lib/packwerk/generators/configuration_file.rb:29 + # pkg:gem/packwerk#lib/packwerk/generators/configuration_file.rb:25 sig { returns(T::Boolean) } def generate; end private - # pkg:gem/packwerk#lib/packwerk/generators/configuration_file.rb:47 + # pkg:gem/packwerk#lib/packwerk/generators/configuration_file.rb:43 sig { returns(::String) } def render; end - # pkg:gem/packwerk#lib/packwerk/generators/configuration_file.rb:52 + # pkg:gem/packwerk#lib/packwerk/generators/configuration_file.rb:48 sig { returns(::String) } def template; end class << self - # pkg:gem/packwerk#lib/packwerk/generators/configuration_file.rb:17 + # pkg:gem/packwerk#lib/packwerk/generators/configuration_file.rb:13 sig { params(root: ::String, out: T.any(::IO, ::StringIO)).returns(T::Boolean) } def generate(root:, out:); end end end -# pkg:gem/packwerk#lib/packwerk/generators/configuration_file.rb:11 +# pkg:gem/packwerk#lib/packwerk/generators/configuration_file.rb:9 Packwerk::Generators::ConfigurationFile::CONFIGURATION_TEMPLATE_FILE_PATH = T.let(T.unsafe(nil), String) # pkg:gem/packwerk#lib/packwerk/generators/root_package.rb:6 class Packwerk::Generators::RootPackage - # pkg:gem/packwerk#lib/packwerk/generators/root_package.rb:19 + # pkg:gem/packwerk#lib/packwerk/generators/root_package.rb:15 sig { params(root: ::String, out: T.any(::IO, ::StringIO)).void } def initialize(root:, out: T.unsafe(nil)); end - # pkg:gem/packwerk#lib/packwerk/generators/root_package.rb:25 + # pkg:gem/packwerk#lib/packwerk/generators/root_package.rb:21 sig { returns(T::Boolean) } def generate; end class << self - # pkg:gem/packwerk#lib/packwerk/generators/root_package.rb:13 + # pkg:gem/packwerk#lib/packwerk/generators/root_package.rb:9 sig { params(root: ::String, out: T.any(::IO, ::StringIO)).returns(T::Boolean) } def generate(root:, out:); end end @@ -968,7 +1037,7 @@ end class Packwerk::Graph include ::TSort - # pkg:gem/packwerk#lib/packwerk/graph.rb:18 + # pkg:gem/packwerk#lib/packwerk/graph.rb:12 sig do params( edges: T::Hash[T.nilable(T.any(::Integer, ::String)), T::Array[T.nilable(T.any(::Integer, ::String))]] @@ -976,22 +1045,22 @@ class Packwerk::Graph end def initialize(edges); end - # pkg:gem/packwerk#lib/packwerk/graph.rb:26 + # pkg:gem/packwerk#lib/packwerk/graph.rb:20 def acyclic?; end - # pkg:gem/packwerk#lib/packwerk/graph.rb:22 + # pkg:gem/packwerk#lib/packwerk/graph.rb:16 def cycles; end private - # pkg:gem/packwerk#lib/packwerk/graph.rb:37 + # pkg:gem/packwerk#lib/packwerk/graph.rb:31 def tsort_each_child(node, &block); end - # pkg:gem/packwerk#lib/packwerk/graph.rb:30 + # pkg:gem/packwerk#lib/packwerk/graph.rb:24 def tsort_each_node(&block); end end -# pkg:gem/packwerk#lib/packwerk/graph.rb:34 +# pkg:gem/packwerk#lib/packwerk/graph.rb:28 Packwerk::Graph::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) # pkg:gem/packwerk#lib/packwerk/node.rb:5 @@ -1034,27 +1103,27 @@ end # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:9 module Packwerk::NodeHelpers class << self - # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:122 + # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:115 sig { params(node: ::AST::Node).returns(T::Boolean) } def class?(node); end - # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:16 + # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:14 sig { params(class_or_module_node: ::AST::Node).returns(::String) } def class_or_module_name(class_or_module_node); end - # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:112 + # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:105 sig { params(node: ::AST::Node).returns(T::Boolean) } def constant?(node); end - # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:117 + # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:110 sig { params(node: ::AST::Node).returns(T::Boolean) } def constant_assignment?(node); end - # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:31 + # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:29 sig { params(constant_node: ::AST::Node).returns(::String) } def constant_name(constant_node); end - # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:68 + # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:61 sig do params( node: ::AST::Node, @@ -1063,101 +1132,101 @@ module Packwerk::NodeHelpers end def each_child(node, &block); end - # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:79 + # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:72 sig { params(starting_node: ::AST::Node, ancestors: T::Array[::AST::Node]).returns(T::Array[::String]) } def enclosing_namespace_path(starting_node, ancestors:); end - # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:132 + # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:125 sig { params(node: ::AST::Node).returns(T::Boolean) } def hash?(node); end - # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:92 + # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:85 sig { params(string_or_symbol_node: ::AST::Node).returns(T.any(::String, ::Symbol)) } def literal_value(string_or_symbol_node); end - # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:106 + # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:99 sig { params(node: ::Parser::AST::Node).returns(::Packwerk::Node::Location) } def location(node); end - # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:147 + # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:140 sig { params(method_call_node: ::AST::Node).returns(T::Array[::AST::Node]) } def method_arguments(method_call_node); end - # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:127 + # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:120 sig { params(node: ::AST::Node).returns(T::Boolean) } def method_call?(node); end - # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:156 + # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:149 sig { params(method_call_node: ::AST::Node).returns(::Symbol) } def method_name(method_call_node); end - # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:165 + # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:158 sig { params(node: ::AST::Node).returns(T.nilable(::String)) } def module_name_from_definition(node); end - # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:190 + # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:183 sig { params(node: ::AST::Node).returns(T.nilable(::Packwerk::Node::Location)) } def name_location(node); end - # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:200 + # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:194 sig { params(class_node: ::AST::Node).returns(T.nilable(::AST::Node)) } def parent_class(class_node); end - # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:209 + # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:203 sig { params(ancestors: T::Array[::AST::Node]).returns(::String) } def parent_module_name(ancestors:); end - # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:137 + # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:130 sig { params(node: ::AST::Node).returns(T::Boolean) } def string?(node); end - # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:142 + # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:135 sig { params(node: ::AST::Node).returns(T::Boolean) } def symbol?(node); end - # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:221 + # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:215 sig { params(hash_node: ::AST::Node, key: ::Symbol).returns(T.untyped) } def value_from_hash(hash_node, key); end private - # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:303 + # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:297 sig { params(node: T.nilable(::AST::Node)).returns(T::Boolean) } def dynamic_class_creation?(node); end - # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:254 + # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:248 sig { params(hash_pair_node: ::AST::Node).returns(T.untyped) } def hash_pair_key(hash_pair_node); end - # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:265 + # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:259 sig { params(hash_pair_node: ::AST::Node).returns(T.untyped) } def hash_pair_value(hash_pair_node); end - # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:276 + # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:270 sig { params(hash_node: ::AST::Node).returns(T::Array[::AST::Node]) } def hash_pairs(hash_node); end - # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:285 + # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:279 sig { params(block_node: ::AST::Node).returns(::AST::Node) } def method_call_node(block_node); end - # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:294 + # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:288 sig { params(node: ::AST::Node).returns(T::Boolean) } def module_creation?(node); end - # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:310 + # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:304 sig { params(node: ::AST::Node).returns(T.nilable(::String)) } def name_from_block_definition(node); end - # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:318 + # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:312 sig { params(node: ::AST::Node).returns(T.nilable(::String)) } def name_part_from_definition(node); end - # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:328 + # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:322 sig { params(method_call_or_block_node: ::AST::Node).returns(T.nilable(::AST::Node)) } def receiver(method_call_or_block_node); end - # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:249 + # pkg:gem/packwerk#lib/packwerk/node_helpers.rb:243 sig { params(node: ::AST::Node).returns(::Symbol) } def type_of(node); end end @@ -1170,11 +1239,11 @@ class Packwerk::NodeHelpers::TypeError < ::ArgumentError; end # # pkg:gem/packwerk#lib/packwerk/node_processor.rb:6 class Packwerk::NodeProcessor - # pkg:gem/packwerk#lib/packwerk/node_processor.rb:15 + # pkg:gem/packwerk#lib/packwerk/node_processor.rb:8 sig { params(reference_extractor: ::Packwerk::ReferenceExtractor, relative_file: ::String).void } def initialize(reference_extractor:, relative_file:); end - # pkg:gem/packwerk#lib/packwerk/node_processor.rb:26 + # pkg:gem/packwerk#lib/packwerk/node_processor.rb:14 sig do params( node: ::Parser::AST::Node, @@ -1185,18 +1254,26 @@ class Packwerk::NodeProcessor end # pkg:gem/packwerk#lib/packwerk/node_processor_factory.rb:5 -class Packwerk::NodeProcessorFactory < ::T::Struct - const :root_path, ::String - const :context_provider, ::Packwerk::ConstantDiscovery - const :constant_name_inspectors, T::Array[::Packwerk::ConstantNameInspector] - +class Packwerk::NodeProcessorFactory # pkg:gem/packwerk#lib/packwerk/node_processor_factory.rb:13 + sig { params(root_path: ::String, constant_name_inspectors: T::Array[::Packwerk::ConstantNameInspector]).void } + def initialize(root_path:, constant_name_inspectors:); end + + # pkg:gem/packwerk#lib/packwerk/node_processor_factory.rb:10 + sig { returns(T::Array[::Packwerk::ConstantNameInspector]) } + def constant_name_inspectors; end + + # pkg:gem/packwerk#lib/packwerk/node_processor_factory.rb:19 sig { params(relative_file: ::String, node: ::AST::Node).returns(::Packwerk::NodeProcessor) } def for(relative_file:, node:); end + # pkg:gem/packwerk#lib/packwerk/node_processor_factory.rb:7 + sig { returns(::String) } + def root_path; end + private - # pkg:gem/packwerk#lib/packwerk/node_processor_factory.rb:23 + # pkg:gem/packwerk#lib/packwerk/node_processor_factory.rb:29 sig { params(node: ::AST::Node).returns(::Packwerk::ReferenceExtractor) } def reference_extractor(node:); end end @@ -1205,11 +1282,11 @@ end # # pkg:gem/packwerk#lib/packwerk/node_visitor.rb:6 class Packwerk::NodeVisitor - # pkg:gem/packwerk#lib/packwerk/node_visitor.rb:10 + # pkg:gem/packwerk#lib/packwerk/node_visitor.rb:8 sig { params(node_processor: ::Packwerk::NodeProcessor).void } def initialize(node_processor:); end - # pkg:gem/packwerk#lib/packwerk/node_visitor.rb:21 + # pkg:gem/packwerk#lib/packwerk/node_visitor.rb:13 sig do params( node: ::Parser::AST::Node, @@ -1222,117 +1299,125 @@ end # pkg:gem/packwerk#lib/packwerk/offense.rb:7 class Packwerk::Offense - # pkg:gem/packwerk#lib/packwerk/offense.rb:24 + # pkg:gem/packwerk#lib/packwerk/offense.rb:18 sig { params(file: ::String, message: ::String, location: T.nilable(::Packwerk::Node::Location)).void } def initialize(file:, message:, location: T.unsafe(nil)); end - # pkg:gem/packwerk#lib/packwerk/offense.rb:15 + # pkg:gem/packwerk#lib/packwerk/offense.rb:12 sig { returns(::String) } def file; end - # pkg:gem/packwerk#lib/packwerk/offense.rb:12 + # pkg:gem/packwerk#lib/packwerk/offense.rb:9 sig { returns(T.nilable(::Packwerk::Node::Location)) } def location; end - # pkg:gem/packwerk#lib/packwerk/offense.rb:18 + # pkg:gem/packwerk#lib/packwerk/offense.rb:15 sig { returns(::String) } def message; end - # pkg:gem/packwerk#lib/packwerk/offense.rb:31 + # pkg:gem/packwerk#lib/packwerk/offense.rb:25 sig { params(style: ::Packwerk::OutputStyle).returns(::String) } def to_s(style = T.unsafe(nil)); end end # pkg:gem/packwerk#lib/packwerk/offense_collection.rb:7 class Packwerk::OffenseCollection - # pkg:gem/packwerk#lib/packwerk/offense_collection.rb:17 + # pkg:gem/packwerk#lib/packwerk/offense_collection.rb:9 sig { params(root_path: ::String, package_todos: T::Hash[::Packwerk::Package, ::Packwerk::PackageTodo]).void } def initialize(root_path, package_todos = T.unsafe(nil)); end - # pkg:gem/packwerk#lib/packwerk/offense_collection.rb:52 + # pkg:gem/packwerk#lib/packwerk/offense_collection.rb:39 sig { params(offense: ::Packwerk::Offense).void } def add_offense(offense); end - # pkg:gem/packwerk#lib/packwerk/offense_collection.rb:45 + # pkg:gem/packwerk#lib/packwerk/offense_collection.rb:34 sig { params(offenses: T::Array[::Packwerk::Offense]).void } def add_offenses(offenses); end - # pkg:gem/packwerk#lib/packwerk/offense_collection.rb:29 + # pkg:gem/packwerk#lib/packwerk/offense_collection.rb:21 sig { returns(T::Array[::Packwerk::Offense]) } def errors; end - # pkg:gem/packwerk#lib/packwerk/offense_collection.rb:38 + # pkg:gem/packwerk#lib/packwerk/offense_collection.rb:27 sig { params(offense: ::Packwerk::Offense).returns(T::Boolean) } def listed?(offense); end - # pkg:gem/packwerk#lib/packwerk/offense_collection.rb:26 + # pkg:gem/packwerk#lib/packwerk/offense_collection.rb:18 sig { returns(T::Array[::Packwerk::ReferenceOffense]) } def new_violations; end - # pkg:gem/packwerk#lib/packwerk/offense_collection.rb:84 + # pkg:gem/packwerk#lib/packwerk/offense_collection.rb:71 sig { returns(T::Array[::Packwerk::Offense]) } def outstanding_offenses; end - # pkg:gem/packwerk#lib/packwerk/offense_collection.rb:78 + # pkg:gem/packwerk#lib/packwerk/offense_collection.rb:65 sig { params(package_set: Packwerk::PackageSet).void } def persist_package_todo_files(package_set); end - # pkg:gem/packwerk#lib/packwerk/offense_collection.rb:71 + # pkg:gem/packwerk#lib/packwerk/offense_collection.rb:58 sig { params(for_files: T::Set[::String]).returns(T::Boolean) } def stale_violations?(for_files); end - # pkg:gem/packwerk#lib/packwerk/offense_collection.rb:32 + # pkg:gem/packwerk#lib/packwerk/offense_collection.rb:24 sig { returns(T::Array[::Packwerk::ReferenceOffense]) } def strict_mode_violations; end - # pkg:gem/packwerk#lib/packwerk/offense_collection.rb:89 + # pkg:gem/packwerk#lib/packwerk/offense_collection.rb:76 sig { returns(T::Array[::Packwerk::ReferenceOffense]) } def unlisted_strict_mode_violations; end private - # pkg:gem/packwerk#lib/packwerk/offense_collection.rb:102 + # pkg:gem/packwerk#lib/packwerk/offense_collection.rb:89 sig { params(offense: ::Packwerk::ReferenceOffense).returns(T::Boolean) } def add_to_package_todo(offense); end - # pkg:gem/packwerk#lib/packwerk/offense_collection.rb:96 + # pkg:gem/packwerk#lib/packwerk/offense_collection.rb:83 sig { params(offense: ::Packwerk::ReferenceOffense).returns(T::Boolean) } def already_listed?(offense); end - # pkg:gem/packwerk#lib/packwerk/offense_collection.rb:114 + # pkg:gem/packwerk#lib/packwerk/offense_collection.rb:101 sig { params(package_set: Packwerk::PackageSet).void } def cleanup_extra_package_todo_files(package_set); end - # pkg:gem/packwerk#lib/packwerk/offense_collection.rb:126 + # pkg:gem/packwerk#lib/packwerk/offense_collection.rb:113 sig { void } def dump_package_todo_files; end - # pkg:gem/packwerk#lib/packwerk/offense_collection.rb:139 + # pkg:gem/packwerk#lib/packwerk/offense_collection.rb:126 sig { params(package: ::Packwerk::Package).returns(::String) } def package_todo_file_for(package); end - # pkg:gem/packwerk#lib/packwerk/offense_collection.rb:131 + # pkg:gem/packwerk#lib/packwerk/offense_collection.rb:118 sig { params(package: ::Packwerk::Package).returns(::Packwerk::PackageTodo) } def package_todo_for(package); end - # pkg:gem/packwerk#lib/packwerk/offense_collection.rb:108 + # pkg:gem/packwerk#lib/packwerk/offense_collection.rb:95 sig { params(offense: ::Packwerk::ReferenceOffense).returns(T::Boolean) } def strict_mode_violation?(offense); end end +# @abstract +# # pkg:gem/packwerk#lib/packwerk/offenses_formatter.rb:5 module Packwerk::OffensesFormatter abstract! - # pkg:gem/packwerk#lib/packwerk/offenses_formatter.rb:78 + # @abstract + # + # pkg:gem/packwerk#lib/packwerk/offenses_formatter.rb:75 sig { abstract.returns(::String) } def identifier; end - # pkg:gem/packwerk#lib/packwerk/offenses_formatter.rb:70 + # @abstract + # + # pkg:gem/packwerk#lib/packwerk/offenses_formatter.rb:67 sig { abstract.params(offenses: T::Array[T.nilable(::Packwerk::Offense)]).returns(::String) } def show_offenses(offenses); end - # pkg:gem/packwerk#lib/packwerk/offenses_formatter.rb:74 + # @abstract + # + # pkg:gem/packwerk#lib/packwerk/offenses_formatter.rb:71 sig do abstract .params( @@ -1342,64 +1427,74 @@ module Packwerk::OffensesFormatter end def show_stale_violations(offense_collection, for_files); end - # pkg:gem/packwerk#lib/packwerk/offenses_formatter.rb:82 + # @abstract + # + # pkg:gem/packwerk#lib/packwerk/offenses_formatter.rb:79 sig { abstract.params(strict_mode_violations: T::Array[::Packwerk::ReferenceOffense]).returns(::String) } def show_strict_mode_violations(strict_mode_violations); end class << self - # pkg:gem/packwerk#lib/packwerk/offenses_formatter.rb:29 + # pkg:gem/packwerk#lib/packwerk/offenses_formatter.rb:24 sig { returns(T::Array[::Packwerk::OffensesFormatter]) } def all; end - # pkg:gem/packwerk#lib/packwerk/offenses_formatter.rb:35 + # pkg:gem/packwerk#lib/packwerk/offenses_formatter.rb:30 sig { params(identifier: ::String).returns(::Packwerk::OffensesFormatter) } def find(identifier); end - # pkg:gem/packwerk#lib/packwerk/offenses_formatter.rb:24 + # pkg:gem/packwerk#lib/packwerk/offenses_formatter.rb:19 sig { params(base: T::Class[T.anything]).void } def included(base); end private - # pkg:gem/packwerk#lib/packwerk/offenses_formatter.rb:52 + # pkg:gem/packwerk#lib/packwerk/offenses_formatter.rb:47 sig { params(name: ::String).returns(::Packwerk::OffensesFormatter) } def formatter_by_identifier(name); end - # pkg:gem/packwerk#lib/packwerk/offenses_formatter.rb:42 + # pkg:gem/packwerk#lib/packwerk/offenses_formatter.rb:37 sig { void } def load_defaults; end - # pkg:gem/packwerk#lib/packwerk/offenses_formatter.rb:47 + # pkg:gem/packwerk#lib/packwerk/offenses_formatter.rb:42 sig { returns(T::Array[T::Class[T.anything]]) } def offenses_formatters; end end end -# pkg:gem/packwerk#lib/packwerk/offenses_formatter.rb:11 +# pkg:gem/packwerk#lib/packwerk/offenses_formatter.rb:10 class Packwerk::OffensesFormatter::DuplicateFormatterError < ::StandardError - # pkg:gem/packwerk#lib/packwerk/offenses_formatter.rb:15 + # pkg:gem/packwerk#lib/packwerk/offenses_formatter.rb:12 sig { params(identifier: ::String).void } def initialize(identifier); end end +# @interface +# # pkg:gem/packwerk#lib/packwerk/output_style.rb:5 module Packwerk::OutputStyle interface! - # pkg:gem/packwerk#lib/packwerk/output_style.rb:18 + # @abstract + # + # pkg:gem/packwerk#lib/packwerk/output_style.rb:20 sig { abstract.returns(::String) } def error; end - # pkg:gem/packwerk#lib/packwerk/output_style.rb:15 + # @abstract + # + # pkg:gem/packwerk#lib/packwerk/output_style.rb:16 sig { abstract.returns(::String) } def filename; end + # @abstract + # # pkg:gem/packwerk#lib/packwerk/output_style.rb:12 sig { abstract.returns(::String) } def reset; end end -# pkg:gem/packwerk#lib/packwerk.rb:37 +# pkg:gem/packwerk#lib/packwerk.rb:36 module Packwerk::OutputStyles extend ::ActiveSupport::Autoload end @@ -1410,14 +1505,20 @@ end class Packwerk::OutputStyles::Coloured include ::Packwerk::OutputStyle - # pkg:gem/packwerk#lib/packwerk/output_styles/coloured.rb:23 + # @override + # + # pkg:gem/packwerk#lib/packwerk/output_styles/coloured.rb:25 sig { override.returns(::String) } def error; end - # pkg:gem/packwerk#lib/packwerk/output_styles/coloured.rb:17 + # @override + # + # pkg:gem/packwerk#lib/packwerk/output_styles/coloured.rb:18 sig { override.returns(::String) } def filename; end + # @override + # # pkg:gem/packwerk#lib/packwerk/output_styles/coloured.rb:12 sig { override.returns(::String) } def reset; end @@ -1427,14 +1528,20 @@ end class Packwerk::OutputStyles::Plain include ::Packwerk::OutputStyle - # pkg:gem/packwerk#lib/packwerk/output_styles/plain.rb:21 + # @override + # + # pkg:gem/packwerk#lib/packwerk/output_styles/plain.rb:23 sig { override.returns(::String) } def error; end - # pkg:gem/packwerk#lib/packwerk/output_styles/plain.rb:16 + # @override + # + # pkg:gem/packwerk#lib/packwerk/output_styles/plain.rb:17 sig { override.returns(::String) } def filename; end + # @override + # # pkg:gem/packwerk#lib/packwerk/output_styles/plain.rb:11 sig { override.returns(::String) } def reset; end @@ -1448,56 +1555,56 @@ end class Packwerk::Package include ::Comparable - # pkg:gem/packwerk#lib/packwerk/package.rb:24 + # pkg:gem/packwerk#lib/packwerk/package.rb:23 sig { params(name: ::String, config: T.nilable(T::Hash[::String, T.untyped])).void } def initialize(name:, config: T.unsafe(nil)); end - # pkg:gem/packwerk#lib/packwerk/package.rb:49 + # pkg:gem/packwerk#lib/packwerk/package.rb:48 sig { params(other: T.untyped).returns(T.nilable(::Integer)) } def <=>(other); end - # pkg:gem/packwerk#lib/packwerk/package.rb:21 + # pkg:gem/packwerk#lib/packwerk/package.rb:20 sig { returns(T::Hash[T.untyped, T.untyped]) } def config; end - # pkg:gem/packwerk#lib/packwerk/package.rb:18 + # pkg:gem/packwerk#lib/packwerk/package.rb:17 sig { returns(T::Array[::String]) } def dependencies; end - # pkg:gem/packwerk#lib/packwerk/package.rb:37 + # pkg:gem/packwerk#lib/packwerk/package.rb:36 sig { params(package: ::Packwerk::Package).returns(T::Boolean) } def dependency?(package); end - # pkg:gem/packwerk#lib/packwerk/package.rb:32 + # pkg:gem/packwerk#lib/packwerk/package.rb:31 sig { returns(T::Boolean) } def enforce_dependencies?; end - # pkg:gem/packwerk#lib/packwerk/package.rb:56 + # pkg:gem/packwerk#lib/packwerk/package.rb:55 sig { params(other: T.untyped).returns(T::Boolean) } def eql?(other); end - # pkg:gem/packwerk#lib/packwerk/package.rb:61 + # pkg:gem/packwerk#lib/packwerk/package.rb:60 sig { returns(::Integer) } def hash; end - # pkg:gem/packwerk#lib/packwerk/package.rb:15 + # pkg:gem/packwerk#lib/packwerk/package.rb:14 sig { returns(::String) } def name; end - # pkg:gem/packwerk#lib/packwerk/package.rb:42 + # pkg:gem/packwerk#lib/packwerk/package.rb:41 sig { params(path: ::String).returns(T::Boolean) } def package_path?(path); end - # pkg:gem/packwerk#lib/packwerk/package.rb:71 + # pkg:gem/packwerk#lib/packwerk/package.rb:70 sig { returns(T::Boolean) } def root?; end - # pkg:gem/packwerk#lib/packwerk/package.rb:66 + # pkg:gem/packwerk#lib/packwerk/package.rb:65 sig { returns(::String) } def to_s; end end -# pkg:gem/packwerk#lib/packwerk/package.rb:12 +# pkg:gem/packwerk#lib/packwerk/package.rb:11 Packwerk::Package::ROOT_PACKAGE_NAME = T.let(T.unsafe(nil), String) # A set of {Packwerk::Package}s as well as methods to parse packages from the filesystem. @@ -1509,28 +1616,30 @@ class Packwerk::PackageSet Elem = type_member { { fixed: Packwerk::Package } } - # pkg:gem/packwerk#lib/packwerk/package_set.rb:79 + # pkg:gem/packwerk#lib/packwerk/package_set.rb:71 sig { params(packages: T::Array[::Packwerk::Package]).void } def initialize(packages); end - # pkg:gem/packwerk#lib/packwerk/package_set.rb:88 + # @override + # + # pkg:gem/packwerk#lib/packwerk/package_set.rb:81 sig { override.params(blk: T.proc.params(arg0: ::Packwerk::Package).returns(T.untyped)).returns(T.untyped) } def each(&blk); end - # pkg:gem/packwerk#lib/packwerk/package_set.rb:93 + # pkg:gem/packwerk#lib/packwerk/package_set.rb:86 sig { params(name: ::String).returns(T.nilable(::Packwerk::Package)) } def fetch(name); end - # pkg:gem/packwerk#lib/packwerk/package_set.rb:98 + # pkg:gem/packwerk#lib/packwerk/package_set.rb:91 sig { params(file_path: T.any(::Pathname, ::String)).returns(::Packwerk::Package) } def package_from_path(file_path); end - # pkg:gem/packwerk#lib/packwerk/package_set.rb:76 + # pkg:gem/packwerk#lib/packwerk/package_set.rb:68 sig { returns(T::Hash[::String, ::Packwerk::Package]) } def packages; end class << self - # pkg:gem/packwerk#lib/packwerk/package_set.rb:24 + # pkg:gem/packwerk#lib/packwerk/package_set.rb:22 sig do params( root_path: ::String, @@ -1539,7 +1648,7 @@ class Packwerk::PackageSet end def load_all_from(root_path, package_pathspec: T.unsafe(nil)); end - # pkg:gem/packwerk#lib/packwerk/package_set.rb:44 + # pkg:gem/packwerk#lib/packwerk/package_set.rb:36 sig do params( root_path: ::String, @@ -1551,11 +1660,11 @@ class Packwerk::PackageSet private - # pkg:gem/packwerk#lib/packwerk/package_set.rb:61 + # pkg:gem/packwerk#lib/packwerk/package_set.rb:53 sig { params(packages: T::Array[::Packwerk::Package]).void } def create_root_package_if_none_in(packages); end - # pkg:gem/packwerk#lib/packwerk/package_set.rb:68 + # pkg:gem/packwerk#lib/packwerk/package_set.rb:60 sig { params(globs: T::Array[::String], path: ::Pathname).returns(T::Boolean) } def exclude_path?(globs, path); end end @@ -1566,49 +1675,49 @@ Packwerk::PackageSet::PACKAGE_CONFIG_FILENAME = T.let(T.unsafe(nil), String) # pkg:gem/packwerk#lib/packwerk/package_todo.rb:7 class Packwerk::PackageTodo - # pkg:gem/packwerk#lib/packwerk/package_todo.rb:19 + # pkg:gem/packwerk#lib/packwerk/package_todo.rb:15 sig { params(package: ::Packwerk::Package, path: ::String).void } def initialize(package, path); end - # pkg:gem/packwerk#lib/packwerk/package_todo.rb:43 + # pkg:gem/packwerk#lib/packwerk/package_todo.rb:34 sig { params(reference: ::Packwerk::Reference, violation_type: ::String).returns(T::Boolean) } def add_entries(reference, violation_type); end - # pkg:gem/packwerk#lib/packwerk/package_todo.rb:97 + # pkg:gem/packwerk#lib/packwerk/package_todo.rb:88 sig { void } def delete_if_exists; end - # pkg:gem/packwerk#lib/packwerk/package_todo.rb:75 + # pkg:gem/packwerk#lib/packwerk/package_todo.rb:66 sig { void } def dump; end - # pkg:gem/packwerk#lib/packwerk/package_todo.rb:30 + # pkg:gem/packwerk#lib/packwerk/package_todo.rb:23 sig { params(reference: ::Packwerk::Reference, violation_type: ::String).returns(T::Boolean) } def listed?(reference, violation_type:); end - # pkg:gem/packwerk#lib/packwerk/package_todo.rb:58 + # pkg:gem/packwerk#lib/packwerk/package_todo.rb:49 sig { params(for_files: T::Set[::String]).returns(T::Boolean) } def stale_violations?(for_files); end private - # pkg:gem/packwerk#lib/packwerk/package_todo.rb:107 + # pkg:gem/packwerk#lib/packwerk/package_todo.rb:98 sig { params(package: ::String).returns(T::Array[::String]) } def deleted_files_for(package); end - # pkg:gem/packwerk#lib/packwerk/package_todo.rb:168 + # pkg:gem/packwerk#lib/packwerk/package_todo.rb:159 sig { params(path: ::String).returns(T::Hash[::String, T::Hash[::String, T::Hash[::String, T::Array[::String]]]]) } def load_yaml_file(path); end - # pkg:gem/packwerk#lib/packwerk/package_todo.rb:104 + # pkg:gem/packwerk#lib/packwerk/package_todo.rb:95 sig { returns(T::Hash[::String, T::Hash[::String, T::Hash[::String, T::Array[::String]]]]) } def new_entries; end - # pkg:gem/packwerk#lib/packwerk/package_todo.rb:163 + # pkg:gem/packwerk#lib/packwerk/package_todo.rb:154 sig { returns(T::Hash[::String, T::Hash[::String, T::Hash[::String, T::Array[::String]]]]) } def old_entries; end - # pkg:gem/packwerk#lib/packwerk/package_todo.rb:133 + # pkg:gem/packwerk#lib/packwerk/package_todo.rb:124 sig do params( package_violations: T::Hash[::String, T::Hash[::String, T::Array[::String]]], @@ -1617,11 +1726,11 @@ class Packwerk::PackageTodo end def package_violations_for(package_violations, files:); end - # pkg:gem/packwerk#lib/packwerk/package_todo.rb:150 + # pkg:gem/packwerk#lib/packwerk/package_todo.rb:141 sig { returns(T::Hash[::String, T::Hash[::String, T::Hash[::String, T::Array[::String]]]]) } def prepare_entries_for_dump; end - # pkg:gem/packwerk#lib/packwerk/package_todo.rb:114 + # pkg:gem/packwerk#lib/packwerk/package_todo.rb:105 sig do params( package: ::String, @@ -1631,28 +1740,28 @@ class Packwerk::PackageTodo def stale_violation_for_package?(package, violations:); end end -# pkg:gem/packwerk#lib/packwerk/package_todo.rb:11 +# pkg:gem/packwerk#lib/packwerk/package_todo.rb:9 Packwerk::PackageTodo::ConstantName = T.type_alias { ::String } -# pkg:gem/packwerk#lib/packwerk/package_todo.rb:14 +# pkg:gem/packwerk#lib/packwerk/package_todo.rb:12 Packwerk::PackageTodo::Entries = T.type_alias { T::Hash[::String, T::Hash[::String, T::Hash[::String, T::Array[::String]]]] } -# pkg:gem/packwerk#lib/packwerk/package_todo.rb:13 +# pkg:gem/packwerk#lib/packwerk/package_todo.rb:11 Packwerk::PackageTodo::Entry = T.type_alias { T::Hash[::String, T::Hash[::String, T::Array[::String]]] } -# pkg:gem/packwerk#lib/packwerk/package_todo.rb:12 +# pkg:gem/packwerk#lib/packwerk/package_todo.rb:10 Packwerk::PackageTodo::FilePath = T.type_alias { ::String } -# pkg:gem/packwerk#lib/packwerk/package_todo.rb:10 +# pkg:gem/packwerk#lib/packwerk/package_todo.rb:8 Packwerk::PackageTodo::PackageName = T.type_alias { ::String } # pkg:gem/packwerk#lib/packwerk/parse_run.rb:7 class Packwerk::ParseRun - # pkg:gem/packwerk#lib/packwerk/parse_run.rb:20 + # pkg:gem/packwerk#lib/packwerk/parse_run.rb:11 sig { params(relative_file_set: T::Set[::String], parallel: T::Boolean).void } def initialize(relative_file_set:, parallel:); end - # pkg:gem/packwerk#lib/packwerk/parse_run.rb:34 + # pkg:gem/packwerk#lib/packwerk/parse_run.rb:17 sig do params( run_context: ::Packwerk::RunContext, @@ -1664,7 +1773,7 @@ class Packwerk::ParseRun private - # pkg:gem/packwerk#lib/packwerk/parse_run.rb:54 + # pkg:gem/packwerk#lib/packwerk/parse_run.rb:32 sig do params( run_context: ::Packwerk::RunContext, @@ -1673,28 +1782,28 @@ class Packwerk::ParseRun end def process_file_proc(run_context, &block); end - # pkg:gem/packwerk#lib/packwerk/parse_run.rb:72 + # pkg:gem/packwerk#lib/packwerk/parse_run.rb:45 sig do params( on_interrupt: T.nilable(T.proc.void), - block: T.proc.params(path: ::String).returns(T::Array[::Packwerk::Offense]) + block: T.proc.params(arg0: T.untyped).returns(T.untyped) ).returns(T::Array[::Packwerk::Offense]) end def serial_find_offenses(on_interrupt: T.unsafe(nil), &block); end end -# pkg:gem/packwerk#lib/packwerk/parse_run.rb:10 +# pkg:gem/packwerk#lib/packwerk/parse_run.rb:8 Packwerk::ParseRun::ProcessFileProc = T.type_alias { T.proc.params(path: ::String).returns(T::Array[::Packwerk::Offense]) } # A collection of constant definitions parsed from an Abstract Syntax Tree (AST). # # pkg:gem/packwerk#lib/packwerk/parsed_constant_definitions.rb:8 class Packwerk::ParsedConstantDefinitions - # pkg:gem/packwerk#lib/packwerk/parsed_constant_definitions.rb:30 + # pkg:gem/packwerk#lib/packwerk/parsed_constant_definitions.rb:26 sig { params(root_node: T.nilable(::AST::Node)).void } def initialize(root_node:); end - # pkg:gem/packwerk#lib/packwerk/parsed_constant_definitions.rb:43 + # pkg:gem/packwerk#lib/packwerk/parsed_constant_definitions.rb:33 sig do params( constant_name: ::String, @@ -1706,7 +1815,7 @@ class Packwerk::ParsedConstantDefinitions private - # pkg:gem/packwerk#lib/packwerk/parsed_constant_definitions.rb:79 + # pkg:gem/packwerk#lib/packwerk/parsed_constant_definitions.rb:65 sig do params( constant_name: ::String, @@ -1716,14 +1825,14 @@ class Packwerk::ParsedConstantDefinitions end def add_definition(constant_name, current_namespace_path, location); end - # pkg:gem/packwerk#lib/packwerk/parsed_constant_definitions.rb:55 + # pkg:gem/packwerk#lib/packwerk/parsed_constant_definitions.rb:45 sig { params(node: ::AST::Node, current_namespace_path: T::Array[T.nilable(::String)]).void } def collect_local_definitions_from_root(node, current_namespace_path = T.unsafe(nil)); end class << self # What fully qualified constants can this constant refer to in this context? # - # pkg:gem/packwerk#lib/packwerk/parsed_constant_definitions.rb:16 + # pkg:gem/packwerk#lib/packwerk/parsed_constant_definitions.rb:12 sig { params(constant_name: ::String, namespace_path: T::Array[T.nilable(::String)]).returns(T::Array[::String]) } def reference_qualifications(constant_name, namespace_path:); end end @@ -1736,21 +1845,23 @@ module Packwerk::Parsers; end class Packwerk::Parsers::Erb include ::Packwerk::Parsers::ParserInterface - # pkg:gem/packwerk#lib/packwerk/parsers/erb.rb:17 + # pkg:gem/packwerk#lib/packwerk/parsers/erb.rb:15 sig { params(parser_class: T.untyped, ruby_parser: ::Packwerk::Parsers::Ruby).void } def initialize(parser_class: T.unsafe(nil), ruby_parser: T.unsafe(nil)); end - # pkg:gem/packwerk#lib/packwerk/parsers/erb.rb:23 + # @override + # + # pkg:gem/packwerk#lib/packwerk/parsers/erb.rb:22 sig { override.params(io: T.any(::IO, ::StringIO), file_path: ::String).returns(T.untyped) } def call(io:, file_path: T.unsafe(nil)); end - # pkg:gem/packwerk#lib/packwerk/parsers/erb.rb:30 + # pkg:gem/packwerk#lib/packwerk/parsers/erb.rb:29 sig { params(buffer: ::Parser::Source::Buffer, file_path: ::String).returns(T.nilable(::AST::Node)) } def parse_buffer(buffer, file_path:); end private - # pkg:gem/packwerk#lib/packwerk/parsers/erb.rb:71 + # pkg:gem/packwerk#lib/packwerk/parsers/erb.rb:60 sig do params( node: T.nilable(T.any(::AST::Node, ::String)), @@ -1759,7 +1870,7 @@ class Packwerk::Parsers::Erb end def code_nodes(node, &block); end - # pkg:gem/packwerk#lib/packwerk/parsers/erb.rb:49 + # pkg:gem/packwerk#lib/packwerk/parsers/erb.rb:43 sig { params(erb_ast: T.all(::AST::Node, ::Object), file_path: ::String).returns(T.nilable(::AST::Node)) } def to_ruby_ast(erb_ast, file_path); end end @@ -1770,7 +1881,7 @@ class Packwerk::Parsers::Factory include ::Singleton extend ::Singleton::SingletonClassMethods - # pkg:gem/packwerk#lib/packwerk/parsers/factory.rb:24 + # pkg:gem/packwerk#lib/packwerk/parsers/factory.rb:23 sig { void } def initialize; end @@ -1782,34 +1893,34 @@ class Packwerk::Parsers::Factory sig { params(klass: T.nilable(T::Class[T.anything])).void } def erb_parser_class=(klass); end - # pkg:gem/packwerk#lib/packwerk/parsers/factory.rb:31 + # pkg:gem/packwerk#lib/packwerk/parsers/factory.rb:30 sig { params(path: ::String).returns(T.nilable(::Packwerk::Parsers::ParserInterface)) } def for_path(path); end class << self private - # pkg:gem/packwerk#lib/packwerk/parsers/factory.rb:10 + # pkg:gem/packwerk#lib/packwerk/parsers/factory.rb:9 def allocate; end - # pkg:gem/packwerk#lib/packwerk/parsers/factory.rb:10 + # pkg:gem/packwerk#lib/packwerk/parsers/factory.rb:9 def new(*_arg0); end end end -# pkg:gem/packwerk#lib/packwerk/parsers/factory.rb:20 +# pkg:gem/packwerk#lib/packwerk/parsers/factory.rb:19 Packwerk::Parsers::Factory::ERB_REGEX = T.let(T.unsafe(nil), Regexp) -# pkg:gem/packwerk#lib/packwerk/parsers/factory.rb:12 +# pkg:gem/packwerk#lib/packwerk/parsers/factory.rb:11 Packwerk::Parsers::Factory::RUBY_REGEX = T.let(T.unsafe(nil), Regexp) # pkg:gem/packwerk#lib/packwerk/parsers.rb:13 class Packwerk::Parsers::ParseError < ::StandardError - # pkg:gem/packwerk#lib/packwerk/parsers.rb:20 + # pkg:gem/packwerk#lib/packwerk/parsers.rb:18 sig { params(result: ::Packwerk::Parsers::ParseResult).void } def initialize(result); end - # pkg:gem/packwerk#lib/packwerk/parsers.rb:17 + # pkg:gem/packwerk#lib/packwerk/parsers.rb:15 sig { returns(::Packwerk::Parsers::ParseResult) } def result; end end @@ -1817,12 +1928,16 @@ end # pkg:gem/packwerk#lib/packwerk/parsers.rb:11 class Packwerk::Parsers::ParseResult < ::Packwerk::Offense; end +# @interface +# # pkg:gem/packwerk#lib/packwerk/parsers/parser_interface.rb:6 module Packwerk::Parsers::ParserInterface requires_ancestor { Kernel } interface! + # @abstract + # # pkg:gem/packwerk#lib/packwerk/parsers/parser_interface.rb:15 sig { abstract.params(io: T.any(::IO, ::StringIO), file_path: ::String).returns(T.untyped) } def call(io:, file_path:); end @@ -1832,31 +1947,33 @@ end class Packwerk::Parsers::Ruby include ::Packwerk::Parsers::ParserInterface - # pkg:gem/packwerk#lib/packwerk/parsers/ruby.rb:41 + # pkg:gem/packwerk#lib/packwerk/parsers/ruby.rb:35 sig { params(parser_class: T.untyped).void } def initialize(parser_class: T.unsafe(nil)); end - # pkg:gem/packwerk#lib/packwerk/parsers/ruby.rb:47 + # @override + # + # pkg:gem/packwerk#lib/packwerk/parsers/ruby.rb:42 sig { override.params(io: T.any(::IO, ::StringIO), file_path: ::String).returns(T.nilable(::Parser::AST::Node)) } def call(io:, file_path: T.unsafe(nil)); end end -# pkg:gem/packwerk#lib/packwerk/parsers/ruby.rb:14 +# pkg:gem/packwerk#lib/packwerk/parsers/ruby.rb:12 class Packwerk::Parsers::Ruby::RaiseExceptionsParser < ::Prism::Translation::Parser - # pkg:gem/packwerk#lib/packwerk/parsers/ruby.rb:18 + # pkg:gem/packwerk#lib/packwerk/parsers/ruby.rb:14 sig { params(builder: T.untyped).void } def initialize(builder); end private - # pkg:gem/packwerk#lib/packwerk/parsers/ruby.rb:26 + # pkg:gem/packwerk#lib/packwerk/parsers/ruby.rb:22 sig { params(error: ::Prism::ParseError).returns(T::Boolean) } def valid_error?(error); end end -# pkg:gem/packwerk#lib/packwerk/parsers/ruby.rb:31 -class Packwerk::Parsers::Ruby::TolerateInvalidUtf8Builder < ::Parser::Builders::Default - # pkg:gem/packwerk#lib/packwerk/parsers/ruby.rb:35 +# pkg:gem/packwerk#lib/packwerk/parsers/ruby.rb:27 +class Packwerk::Parsers::Ruby::TolerateInvalidUtf8Builder < ::Prism::Translation::Parser::Builder + # pkg:gem/packwerk#lib/packwerk/parsers/ruby.rb:29 sig { params(token: T.untyped).returns(T.untyped) } def string_value(token); end end @@ -1869,40 +1986,40 @@ Packwerk::PathSpec = T.type_alias { T.any(::String, T::Array[::String]) } # pkg:gem/packwerk#lib/packwerk/rails_load_paths.rb:10 module Packwerk::RailsLoadPaths class << self - # pkg:gem/packwerk#lib/packwerk/rails_load_paths.rb:15 - sig { params(root: ::String, environment: ::String).returns(T::Hash[::String, ::Module]) } + # pkg:gem/packwerk#lib/packwerk/rails_load_paths.rb:13 + sig { params(root: ::String, environment: ::String).returns(T::Hash[::String, T::Module[T.anything]]) } def for(root, environment:); end private - # pkg:gem/packwerk#lib/packwerk/rails_load_paths.rb:65 - sig { params(paths: T::Hash[T.untyped, ::Module]).void } + # pkg:gem/packwerk#lib/packwerk/rails_load_paths.rb:60 + sig { params(paths: T::Hash[T.untyped, T::Module[T.anything]]).void } def assert_load_paths_present(paths); end - # pkg:gem/packwerk#lib/packwerk/rails_load_paths.rb:26 - sig { returns(T::Hash[::String, ::Module]) } + # pkg:gem/packwerk#lib/packwerk/rails_load_paths.rb:24 + sig { returns(T::Hash[::String, T::Module[T.anything]]) } def extract_application_autoload_paths; end - # pkg:gem/packwerk#lib/packwerk/rails_load_paths.rb:36 + # pkg:gem/packwerk#lib/packwerk/rails_load_paths.rb:31 sig do params( - all_paths: T::Hash[::String, ::Module], + all_paths: T::Hash[::String, T::Module[T.anything]], bundle_path: ::Pathname, rails_root: ::Pathname - ).returns(T::Hash[::Pathname, ::Module]) + ).returns(T::Hash[::Pathname, T::Module[T.anything]]) end def filter_relevant_paths(all_paths, bundle_path: T.unsafe(nil), rails_root: T.unsafe(nil)); end - # pkg:gem/packwerk#lib/packwerk/rails_load_paths.rb:47 + # pkg:gem/packwerk#lib/packwerk/rails_load_paths.rb:42 sig do params( - load_paths: T::Hash[::Pathname, ::Module], + load_paths: T::Hash[::Pathname, T::Module[T.anything]], rails_root: ::Pathname - ).returns(T::Hash[::String, ::Module]) + ).returns(T::Hash[::String, T::Module[T.anything]]) end def relative_path_strings(load_paths, rails_root: T.unsafe(nil)); end - # pkg:gem/packwerk#lib/packwerk/rails_load_paths.rb:52 + # pkg:gem/packwerk#lib/packwerk/rails_load_paths.rb:47 sig { params(root: ::String, environment: ::String).void } def require_application(root, environment); end end @@ -1954,12 +2071,12 @@ class Packwerk::Reference < ::Struct end end -# pkg:gem/packwerk#lib/packwerk.rb:88 +# pkg:gem/packwerk#lib/packwerk.rb:87 module Packwerk::ReferenceChecking extend ::ActiveSupport::Autoload end -# pkg:gem/packwerk#lib/packwerk.rb:93 +# pkg:gem/packwerk#lib/packwerk.rb:92 module Packwerk::ReferenceChecking::Checkers extend ::ActiveSupport::Autoload end @@ -1970,39 +2087,47 @@ end class Packwerk::ReferenceChecking::Checkers::DependencyChecker include ::Packwerk::Checker - # pkg:gem/packwerk#lib/packwerk/reference_checking/checkers/dependency_checker.rb:24 + # @override + # + # pkg:gem/packwerk#lib/packwerk/reference_checking/checkers/dependency_checker.rb:21 sig { override.params(reference: ::Packwerk::Reference).returns(T::Boolean) } def invalid_reference?(reference); end - # pkg:gem/packwerk#lib/packwerk/reference_checking/checkers/dependency_checker.rb:36 + # @override + # + # pkg:gem/packwerk#lib/packwerk/reference_checking/checkers/dependency_checker.rb:30 sig { override.params(reference: ::Packwerk::Reference).returns(::String) } def message(reference); end - # pkg:gem/packwerk#lib/packwerk/reference_checking/checkers/dependency_checker.rb:50 + # @override + # + # pkg:gem/packwerk#lib/packwerk/reference_checking/checkers/dependency_checker.rb:45 sig { override.params(offense: ::Packwerk::ReferenceOffense).returns(T::Boolean) } def strict_mode_violation?(offense); end + # @override + # # pkg:gem/packwerk#lib/packwerk/reference_checking/checkers/dependency_checker.rb:15 sig { override.returns(::String) } def violation_type; end private - # pkg:gem/packwerk#lib/packwerk/reference_checking/checkers/dependency_checker.rb:58 + # pkg:gem/packwerk#lib/packwerk/reference_checking/checkers/dependency_checker.rb:53 sig { params(reference: ::Packwerk::Reference).returns(::String) } def standard_help_message(reference); end end -# pkg:gem/packwerk#lib/packwerk/reference_checking/checkers/dependency_checker.rb:12 +# pkg:gem/packwerk#lib/packwerk/reference_checking/checkers/dependency_checker.rb:11 Packwerk::ReferenceChecking::Checkers::DependencyChecker::VIOLATION_TYPE = T.let(T.unsafe(nil), String) # pkg:gem/packwerk#lib/packwerk/reference_checking/reference_checker.rb:6 class Packwerk::ReferenceChecking::ReferenceChecker - # pkg:gem/packwerk#lib/packwerk/reference_checking/reference_checker.rb:10 + # pkg:gem/packwerk#lib/packwerk/reference_checking/reference_checker.rb:8 sig { params(checkers: T::Array[::Packwerk::Checker]).void } def initialize(checkers); end - # pkg:gem/packwerk#lib/packwerk/reference_checking/reference_checker.rb:19 + # pkg:gem/packwerk#lib/packwerk/reference_checking/reference_checker.rb:13 sig { params(reference: ::Packwerk::Reference).returns(T::Array[::Packwerk::Offense]) } def call(reference); end end @@ -2011,7 +2136,7 @@ end # # pkg:gem/packwerk#lib/packwerk/reference_extractor.rb:6 class Packwerk::ReferenceExtractor - # pkg:gem/packwerk#lib/packwerk/reference_extractor.rb:59 + # pkg:gem/packwerk#lib/packwerk/reference_extractor.rb:44 sig do params( constant_name_inspectors: T::Array[::Packwerk::ConstantNameInspector], @@ -2021,7 +2146,7 @@ class Packwerk::ReferenceExtractor end def initialize(constant_name_inspectors:, root_node:, root_path:); end - # pkg:gem/packwerk#lib/packwerk/reference_extractor.rb:79 + # pkg:gem/packwerk#lib/packwerk/reference_extractor.rb:55 sig do params( node: ::Parser::AST::Node, @@ -2033,7 +2158,7 @@ class Packwerk::ReferenceExtractor private - # pkg:gem/packwerk#lib/packwerk/reference_extractor.rb:113 + # pkg:gem/packwerk#lib/packwerk/reference_extractor.rb:82 sig do params( inspector: ::Packwerk::ConstantNameInspector, @@ -2044,7 +2169,7 @@ class Packwerk::ReferenceExtractor end def inspect_node(inspector, node:, ancestors:, relative_file:); end - # pkg:gem/packwerk#lib/packwerk/reference_extractor.rb:158 + # pkg:gem/packwerk#lib/packwerk/reference_extractor.rb:115 sig do params( constant_name: ::String, @@ -2054,7 +2179,7 @@ class Packwerk::ReferenceExtractor end def local_reference?(constant_name, name_location, namespace_path); end - # pkg:gem/packwerk#lib/packwerk/reference_extractor.rb:136 + # pkg:gem/packwerk#lib/packwerk/reference_extractor.rb:99 sig do params( constant_name: ::String, @@ -2066,7 +2191,7 @@ class Packwerk::ReferenceExtractor def reference_from_constant(constant_name, node:, ancestors:, relative_file:); end class << self - # pkg:gem/packwerk#lib/packwerk/reference_extractor.rb:18 + # pkg:gem/packwerk#lib/packwerk/reference_extractor.rb:9 sig do params( unresolved_references: T::Array[::Packwerk::UnresolvedReference], @@ -2081,7 +2206,7 @@ end # # pkg:gem/packwerk#lib/packwerk/reference_offense.rb:6 class Packwerk::ReferenceOffense < ::Packwerk::Offense - # pkg:gem/packwerk#lib/packwerk/reference_offense.rb:25 + # pkg:gem/packwerk#lib/packwerk/reference_offense.rb:14 sig do params( reference: ::Packwerk::Reference, @@ -2092,11 +2217,11 @@ class Packwerk::ReferenceOffense < ::Packwerk::Offense end def initialize(reference:, violation_type:, message:, location: T.unsafe(nil)); end - # pkg:gem/packwerk#lib/packwerk/reference_offense.rb:11 + # pkg:gem/packwerk#lib/packwerk/reference_offense.rb:8 sig { returns(::Packwerk::Reference) } def reference; end - # pkg:gem/packwerk#lib/packwerk/reference_offense.rb:14 + # pkg:gem/packwerk#lib/packwerk/reference_offense.rb:11 sig { returns(::String) } def violation_type; end end @@ -2105,16 +2230,16 @@ end # # pkg:gem/packwerk#lib/packwerk/run_context.rb:8 class Packwerk::RunContext - # pkg:gem/packwerk#lib/packwerk/run_context.rb:48 + # pkg:gem/packwerk#lib/packwerk/run_context.rb:28 sig do params( root_path: ::String, - load_paths: T::Hash[::String, ::Module], + load_paths: T::Hash[::String, T::Module[T.anything]], inflector: T.class_of(ActiveSupport::Inflector), cache_directory: ::Pathname, config_path: T.nilable(::String), package_paths: T.nilable(T.any(::String, T::Array[::String])), - custom_associations: T.any(T::Array[::Symbol], T::Set[::Symbol]), + custom_associations: T::Set[::Symbol], associations_exclude: T::Array[::String], exclude: T::Array[::String], checkers: T::Array[::Packwerk::Checker], @@ -2123,42 +2248,42 @@ class Packwerk::RunContext end def initialize(root_path:, load_paths:, inflector:, cache_directory:, config_path: T.unsafe(nil), package_paths: T.unsafe(nil), custom_associations: T.unsafe(nil), associations_exclude: T.unsafe(nil), exclude: T.unsafe(nil), checkers: T.unsafe(nil), cache_enabled: T.unsafe(nil)); end - # pkg:gem/packwerk#lib/packwerk/run_context.rb:96 + # pkg:gem/packwerk#lib/packwerk/run_context.rb:74 sig { returns(Packwerk::PackageSet) } def package_set; end - # pkg:gem/packwerk#lib/packwerk/run_context.rb:83 + # pkg:gem/packwerk#lib/packwerk/run_context.rb:61 sig { params(relative_file: ::String).returns(T::Array[::Packwerk::Offense]) } def process_file(relative_file:); end private - # pkg:gem/packwerk#lib/packwerk/run_context.rb:135 + # pkg:gem/packwerk#lib/packwerk/run_context.rb:112 sig { returns(T::Array[::Packwerk::ConstantNameInspector]) } def constant_name_inspectors; end - # pkg:gem/packwerk#lib/packwerk/run_context.rb:117 + # pkg:gem/packwerk#lib/packwerk/run_context.rb:94 sig { returns(::Packwerk::ConstantDiscovery) } def context_provider; end - # pkg:gem/packwerk#lib/packwerk/run_context.rb:103 + # pkg:gem/packwerk#lib/packwerk/run_context.rb:81 sig { returns(::Packwerk::FileProcessor) } def file_processor; end - # pkg:gem/packwerk#lib/packwerk/run_context.rb:108 + # pkg:gem/packwerk#lib/packwerk/run_context.rb:86 sig { returns(::Packwerk::NodeProcessorFactory) } def node_processor_factory; end - # pkg:gem/packwerk#lib/packwerk/run_context.rb:147 + # pkg:gem/packwerk#lib/packwerk/run_context.rb:124 sig { params(relative_globs: T::Array[::String]).returns(T::Set[::String]) } def relative_files_for_globs(relative_globs); end - # pkg:gem/packwerk#lib/packwerk/run_context.rb:125 + # pkg:gem/packwerk#lib/packwerk/run_context.rb:102 sig { returns(::ConstantResolver) } def resolver; end class << self - # pkg:gem/packwerk#lib/packwerk/run_context.rb:17 + # pkg:gem/packwerk#lib/packwerk/run_context.rb:11 sig { params(configuration: ::Packwerk::Configuration).returns(::Packwerk::RunContext) } def from_configuration(configuration); end end @@ -2216,13 +2341,17 @@ end # pkg:gem/packwerk#lib/packwerk/version.rb:5 Packwerk::VERSION = T.let(T.unsafe(nil), String) +# @abstract +# # pkg:gem/packwerk#lib/packwerk/validator.rb:9 module Packwerk::Validator extend ::ActiveSupport::Autoload abstract! - # pkg:gem/packwerk#lib/packwerk/validator.rb:50 + # @abstract + # + # pkg:gem/packwerk#lib/packwerk/validator.rb:49 sig do abstract .params( @@ -2232,7 +2361,7 @@ module Packwerk::Validator end def call(package_set, configuration); end - # pkg:gem/packwerk#lib/packwerk/validator.rb:81 + # pkg:gem/packwerk#lib/packwerk/validator.rb:69 sig do params( results: T::Array[::Packwerk::Validator::Result], @@ -2243,11 +2372,11 @@ module Packwerk::Validator end def merge_results(results, separator: T.unsafe(nil), before_errors: T.unsafe(nil), after_errors: T.unsafe(nil)); end - # pkg:gem/packwerk#lib/packwerk/validator.rb:69 + # pkg:gem/packwerk#lib/packwerk/validator.rb:64 sig { params(configuration: ::Packwerk::Configuration).returns(T.any(::String, T::Array[::String])) } def package_glob(configuration); end - # pkg:gem/packwerk#lib/packwerk/validator.rb:62 + # pkg:gem/packwerk#lib/packwerk/validator.rb:57 sig do params( configuration: ::Packwerk::Configuration, @@ -2256,50 +2385,61 @@ module Packwerk::Validator end def package_manifests(configuration, glob_pattern = T.unsafe(nil)); end - # pkg:gem/packwerk#lib/packwerk/validator.rb:54 + # pkg:gem/packwerk#lib/packwerk/validator.rb:52 sig { params(configuration: ::Packwerk::Configuration, setting: T.untyped).returns(T.untyped) } def package_manifests_settings_for(configuration, setting); end - # pkg:gem/packwerk#lib/packwerk/validator.rb:46 + # @abstract + # + # pkg:gem/packwerk#lib/packwerk/validator.rb:45 sig { abstract.returns(T::Array[::String]) } def permitted_keys; end - # pkg:gem/packwerk#lib/packwerk/validator.rb:100 + # pkg:gem/packwerk#lib/packwerk/validator.rb:88 sig { params(configuration: ::Packwerk::Configuration, path: ::String).returns(::Pathname) } def relative_path(configuration, path); end class << self - # pkg:gem/packwerk#lib/packwerk/validator.rb:27 + # pkg:gem/packwerk#lib/packwerk/validator.rb:25 sig { returns(T::Array[::Packwerk::Validator]) } def all; end - # pkg:gem/packwerk#lib/packwerk/validator.rb:22 + # pkg:gem/packwerk#lib/packwerk/validator.rb:20 sig { params(base: T::Class[T.anything]).void } def included(base); end private - # pkg:gem/packwerk#lib/packwerk/validator.rb:35 + # pkg:gem/packwerk#lib/packwerk/validator.rb:33 sig { void } def load_defaults; end - # pkg:gem/packwerk#lib/packwerk/validator.rb:40 + # pkg:gem/packwerk#lib/packwerk/validator.rb:38 sig { returns(T::Array[T::Class[T.anything]]) } def validators; end end end # pkg:gem/packwerk#lib/packwerk/validator/result.rb:6 -class Packwerk::Validator::Result < ::T::Struct - const :ok, T::Boolean - const :error_value, T.nilable(::String) +class Packwerk::Validator::Result + # pkg:gem/packwerk#lib/packwerk/validator/result.rb:14 + sig { params(ok: T::Boolean, error_value: T.nilable(::String)).void } + def initialize(ok:, error_value: T.unsafe(nil)); end + + # pkg:gem/packwerk#lib/packwerk/validator/result.rb:11 + sig { returns(T.nilable(::String)) } + def error_value; end - # pkg:gem/packwerk#lib/packwerk/validator/result.rb:13 + # pkg:gem/packwerk#lib/packwerk/validator/result.rb:8 + sig { returns(T::Boolean) } + def ok; end + + # pkg:gem/packwerk#lib/packwerk/validator/result.rb:20 sig { returns(T::Boolean) } def ok?; end end -# pkg:gem/packwerk#lib/packwerk.rb:51 +# pkg:gem/packwerk#lib/packwerk.rb:50 module Packwerk::Validators extend ::ActiveSupport::Autoload end @@ -2308,7 +2448,9 @@ end class Packwerk::Validators::DependencyValidator include ::Packwerk::Validator - # pkg:gem/packwerk#lib/packwerk/validators/dependency_validator.rb:13 + # @override + # + # pkg:gem/packwerk#lib/packwerk/validators/dependency_validator.rb:11 sig do override .params( @@ -2318,7 +2460,9 @@ class Packwerk::Validators::DependencyValidator end def call(package_set, configuration); end - # pkg:gem/packwerk#lib/packwerk/validators/dependency_validator.rb:24 + # @override + # + # pkg:gem/packwerk#lib/packwerk/validators/dependency_validator.rb:23 sig { override.returns(T::Array[::String]) } def permitted_keys; end @@ -2332,23 +2476,23 @@ class Packwerk::Validators::DependencyValidator # # ["a -> b -> c -> a", "b -> c -> b"] # - # pkg:gem/packwerk#lib/packwerk/validators/dependency_validator.rb:146 + # pkg:gem/packwerk#lib/packwerk/validators/dependency_validator.rb:145 sig { params(cycles: T.untyped).returns(T::Array[::String]) } def build_cycle_strings(cycles); end - # pkg:gem/packwerk#lib/packwerk/validators/dependency_validator.rb:67 + # pkg:gem/packwerk#lib/packwerk/validators/dependency_validator.rb:66 sig { params(package_set: Packwerk::PackageSet).returns(::Packwerk::Validator::Result) } def check_acyclic_graph(package_set); end - # pkg:gem/packwerk#lib/packwerk/validators/dependency_validator.rb:34 + # pkg:gem/packwerk#lib/packwerk/validators/dependency_validator.rb:33 sig { params(configuration: ::Packwerk::Configuration).returns(::Packwerk::Validator::Result) } def check_package_manifest_syntax(configuration); end - # pkg:gem/packwerk#lib/packwerk/validators/dependency_validator.rb:94 + # pkg:gem/packwerk#lib/packwerk/validators/dependency_validator.rb:93 sig { params(configuration: ::Packwerk::Configuration).returns(::Packwerk::Validator::Result) } def check_valid_package_dependencies(configuration); end - # pkg:gem/packwerk#lib/packwerk/validators/dependency_validator.rb:130 + # pkg:gem/packwerk#lib/packwerk/validators/dependency_validator.rb:129 sig { params(configuration: ::Packwerk::Configuration, path: T.untyped).returns(T::Boolean) } def invalid_package_path?(configuration, path); end end diff --git a/sorbet/rbi/gems/parser@3.3.10.2.rbi b/sorbet/rbi/gems/parser@3.3.11.1.rbi similarity index 100% rename from sorbet/rbi/gems/parser@3.3.10.2.rbi rename to sorbet/rbi/gems/parser@3.3.11.1.rbi diff --git a/sorbet/rbi/gems/public_suffix@7.0.5.rbi b/sorbet/rbi/gems/public_suffix@7.0.5.rbi deleted file mode 100644 index 6e03d22..0000000 --- a/sorbet/rbi/gems/public_suffix@7.0.5.rbi +++ /dev/null @@ -1,9 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `public_suffix` gem. -# Please instead update this file by running `bin/tapioca gem public_suffix`. - - -# THIS IS AN EMPTY RBI FILE. -# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/railties@8.1.2.rbi b/sorbet/rbi/gems/railties@8.1.3.rbi similarity index 98% rename from sorbet/rbi/gems/railties@8.1.2.rbi rename to sorbet/rbi/gems/railties@8.1.3.rbi index 4ed9ed7..c3dc917 100644 --- a/sorbet/rbi/gems/railties@8.1.2.rbi +++ b/sorbet/rbi/gems/railties@8.1.3.rbi @@ -643,13 +643,13 @@ class Rails::Application::Configuration < ::Rails::Engine::Configuration # pkg:gem/railties#lib/rails/application/configuration.rb:14 def allow_concurrency=(_arg0); end - # pkg:gem/railties#lib/rails/application/configuration.rb:585 + # pkg:gem/railties#lib/rails/application/configuration.rb:582 def annotations; end # pkg:gem/railties#lib/rails/application/configuration.rb:29 def api_only; end - # pkg:gem/railties#lib/rails/application/configuration.rb:398 + # pkg:gem/railties#lib/rails/application/configuration.rb:395 def api_only=(value); end # pkg:gem/railties#lib/rails/application/configuration.rb:14 @@ -670,10 +670,10 @@ class Rails::Application::Configuration < ::Rails::Engine::Configuration # pkg:gem/railties#lib/rails/application/configuration.rb:14 def autoflush_log=(_arg0); end - # pkg:gem/railties#lib/rails/application/configuration.rb:493 + # pkg:gem/railties#lib/rails/application/configuration.rb:490 def autoload_lib(ignore:); end - # pkg:gem/railties#lib/rails/application/configuration.rb:505 + # pkg:gem/railties#lib/rails/application/configuration.rb:502 def autoload_lib_once(ignore:); end # pkg:gem/railties#lib/rails/application/configuration.rb:14 @@ -682,7 +682,7 @@ class Rails::Application::Configuration < ::Rails::Engine::Configuration # pkg:gem/railties#lib/rails/application/configuration.rb:14 def beginning_of_week=(_arg0); end - # pkg:gem/railties#lib/rails/application/configuration.rb:410 + # pkg:gem/railties#lib/rails/application/configuration.rb:407 def broadcast_log_level; end # pkg:gem/railties#lib/rails/application/configuration.rb:14 @@ -697,10 +697,10 @@ class Rails::Application::Configuration < ::Rails::Engine::Configuration # pkg:gem/railties#lib/rails/application/configuration.rb:14 def cache_store=(_arg0); end - # pkg:gem/railties#lib/rails/application/configuration.rb:517 + # pkg:gem/railties#lib/rails/application/configuration.rb:514 def colorize_logging; end - # pkg:gem/railties#lib/rails/application/configuration.rb:521 + # pkg:gem/railties#lib/rails/application/configuration.rb:518 def colorize_logging=(val); end # pkg:gem/railties#lib/rails/application/configuration.rb:14 @@ -717,7 +717,7 @@ class Rails::Application::Configuration < ::Rails::Engine::Configuration # Configures the ActionDispatch::ContentSecurityPolicy. # - # pkg:gem/railties#lib/rails/application/configuration.rb:590 + # pkg:gem/railties#lib/rails/application/configuration.rb:587 def content_security_policy(&block); end # pkg:gem/railties#lib/rails/application/configuration.rb:14 @@ -753,16 +753,16 @@ class Rails::Application::Configuration < ::Rails::Engine::Configuration # Loads and returns the entire raw configuration of database from # values stored in config/database.yml. # - # pkg:gem/railties#lib/rails/application/configuration.rb:456 + # pkg:gem/railties#lib/rails/application/configuration.rb:453 def database_configuration; end - # pkg:gem/railties#lib/rails/application/configuration.rb:412 + # pkg:gem/railties#lib/rails/application/configuration.rb:409 def debug_exception_response_format; end - # pkg:gem/railties#lib/rails/application/configuration.rb:416 + # pkg:gem/railties#lib/rails/application/configuration.rb:413 def debug_exception_response_format=(_arg0); end - # pkg:gem/railties#lib/rails/application/configuration.rb:607 + # pkg:gem/railties#lib/rails/application/configuration.rb:604 def default_log_file; end # pkg:gem/railties#lib/rails/application/configuration.rb:14 @@ -783,16 +783,16 @@ class Rails::Application::Configuration < ::Rails::Engine::Configuration # pkg:gem/railties#lib/rails/application/configuration.rb:14 def eager_load=(_arg0); end - # pkg:gem/railties#lib/rails/application/configuration.rb:382 + # pkg:gem/railties#lib/rails/application/configuration.rb:379 def enable_reloading; end - # pkg:gem/railties#lib/rails/application/configuration.rb:386 + # pkg:gem/railties#lib/rails/application/configuration.rb:383 def enable_reloading=(value); end # pkg:gem/railties#lib/rails/application/configuration.rb:29 def encoding; end - # pkg:gem/railties#lib/rails/application/configuration.rb:390 + # pkg:gem/railties#lib/rails/application/configuration.rb:387 def encoding=(value); end # pkg:gem/railties#lib/rails/application/configuration.rb:14 @@ -843,7 +843,7 @@ class Rails::Application::Configuration < ::Rails::Engine::Configuration # pkg:gem/railties#lib/rails/application/configuration.rb:14 def hosts=(_arg0); end - # pkg:gem/railties#lib/rails/application/configuration.rb:619 + # pkg:gem/railties#lib/rails/application/configuration.rb:616 def inspect; end # Load the config/database.yml to create the Rake tasks for @@ -852,7 +852,7 @@ class Rails::Application::Configuration < ::Rails::Engine::Configuration # # Do not use this method, use #database_configuration instead. # - # pkg:gem/railties#lib/rails/application/configuration.rb:438 + # pkg:gem/railties#lib/rails/application/configuration.rb:435 def load_database_yaml; end # Loads default configuration values for a target version. This includes @@ -881,7 +881,7 @@ class Rails::Application::Configuration < ::Rails::Engine::Configuration # pkg:gem/railties#lib/rails/application/configuration.rb:29 def log_level; end - # pkg:gem/railties#lib/rails/application/configuration.rb:405 + # pkg:gem/railties#lib/rails/application/configuration.rb:402 def log_level=(level); end # pkg:gem/railties#lib/rails/application/configuration.rb:14 @@ -896,12 +896,12 @@ class Rails::Application::Configuration < ::Rails::Engine::Configuration # pkg:gem/railties#lib/rails/application/configuration.rb:14 def logger=(_arg0); end - # pkg:gem/railties#lib/rails/application/configuration.rb:418 + # pkg:gem/railties#lib/rails/application/configuration.rb:415 def paths; end # Configures the ActionDispatch::PermissionsPolicy. # - # pkg:gem/railties#lib/rails/application/configuration.rb:599 + # pkg:gem/railties#lib/rails/application/configuration.rb:596 def permissions_policy(&block); end # pkg:gem/railties#lib/rails/application/configuration.rb:14 @@ -940,7 +940,7 @@ class Rails::Application::Configuration < ::Rails::Engine::Configuration # pkg:gem/railties#lib/rails/application/configuration.rb:14 def reload_classes_only_on_change=(_arg0); end - # pkg:gem/railties#lib/rails/application/configuration.rb:378 + # pkg:gem/railties#lib/rails/application/configuration.rb:375 def reloading_enabled?; end # pkg:gem/railties#lib/rails/application/configuration.rb:14 @@ -955,10 +955,10 @@ class Rails::Application::Configuration < ::Rails::Engine::Configuration # pkg:gem/railties#lib/rails/application/configuration.rb:14 def sandbox_by_default=(_arg0); end - # pkg:gem/railties#lib/rails/application/configuration.rb:526 + # pkg:gem/railties#lib/rails/application/configuration.rb:523 def secret_key_base; end - # pkg:gem/railties#lib/rails/application/configuration.rb:538 + # pkg:gem/railties#lib/rails/application/configuration.rb:535 def secret_key_base=(new_secret_key_base); end # pkg:gem/railties#lib/rails/application/configuration.rb:14 @@ -989,10 +989,10 @@ class Rails::Application::Configuration < ::Rails::Engine::Configuration # # use ActionDispatch::Session::MyCustomStore as the session store # config.session_store :my_custom_store # - # pkg:gem/railties#lib/rails/application/configuration.rb:565 + # pkg:gem/railties#lib/rails/application/configuration.rb:562 def session_store(new_session_store = T.unsafe(nil), **options); end - # pkg:gem/railties#lib/rails/application/configuration.rb:581 + # pkg:gem/railties#lib/rails/application/configuration.rb:578 def session_store?; end # pkg:gem/railties#lib/rails/application/configuration.rb:14 @@ -1027,24 +1027,24 @@ class Rails::Application::Configuration < ::Rails::Engine::Configuration private - # pkg:gem/railties#lib/rails/application/configuration.rb:646 + # pkg:gem/railties#lib/rails/application/configuration.rb:643 def credentials_defaults; end - # pkg:gem/railties#lib/rails/application/configuration.rb:656 + # pkg:gem/railties#lib/rails/application/configuration.rb:653 def generate_local_secret; end end -# pkg:gem/railties#lib/rails/application/configuration.rb:623 +# pkg:gem/railties#lib/rails/application/configuration.rb:620 class Rails::Application::Configuration::Custom - # pkg:gem/railties#lib/rails/application/configuration.rb:624 + # pkg:gem/railties#lib/rails/application/configuration.rb:621 def initialize; end - # pkg:gem/railties#lib/rails/application/configuration.rb:628 + # pkg:gem/railties#lib/rails/application/configuration.rb:625 def method_missing(method, *args); end private - # pkg:gem/railties#lib/rails/application/configuration.rb:640 + # pkg:gem/railties#lib/rails/application/configuration.rb:637 def respond_to_missing?(symbol, _); end end diff --git a/sorbet/rbi/gems/rake@13.3.1.rbi b/sorbet/rbi/gems/rake@13.4.2.rbi similarity index 93% rename from sorbet/rbi/gems/rake@13.3.1.rbi rename to sorbet/rbi/gems/rake@13.4.2.rbi index 408ed8b..a310a8c 100644 --- a/sorbet/rbi/gems/rake@13.3.1.rbi +++ b/sorbet/rbi/gems/rake@13.4.2.rbi @@ -9,7 +9,7 @@ # # Some top level Constants. # -# pkg:gem/rake#lib/rake.rb:67 +# pkg:gem/rake#lib/rake.rb:68 FileList = Rake::FileList # -- @@ -23,13 +23,13 @@ module FileUtils # Example: # ruby %{-pe '$_.upcase!' ['a', 'b', 'c'] # - # pkg:gem/rake#lib/rake/file_utils.rb:126 + # pkg:gem/rake#lib/rake/file_utils.rb:131 def split_all(path); end private @@ -76,14 +76,14 @@ module FileUtils # pkg:gem/rake#lib/rake/file_utils.rb:61 def create_shell_runner(cmd); end - # pkg:gem/rake#lib/rake/file_utils.rb:84 + # pkg:gem/rake#lib/rake/file_utils.rb:89 def set_verbose_option(options); end # pkg:gem/rake#lib/rake/file_utils.rb:71 - def sh_show_command(cmd); end + def sh_show_command(cmd, options = T.unsafe(nil)); end end -# pkg:gem/rake#lib/rake/file_utils.rb:106 +# pkg:gem/rake#lib/rake/file_utils.rb:111 FileUtils::LN_SUPPORTED = T.let(T.unsafe(nil), Array) # Path to the currently running Ruby program @@ -205,25 +205,25 @@ end # Rake main application object. When invoking +rake+ from the # command line, a Rake::Application object is created and run. # -# pkg:gem/rake#lib/rake/application.rb:19 +# pkg:gem/rake#lib/rake/application.rb:20 class Rake::Application include ::Rake::TaskManager include ::Rake::TraceOutput # Initialize a Rake::Application object. # - # pkg:gem/rake#lib/rake/application.rb:49 + # pkg:gem/rake#lib/rake/application.rb:50 def initialize; end # Add a file to the list of files to be imported. # - # pkg:gem/rake#lib/rake/application.rb:800 + # pkg:gem/rake#lib/rake/application.rb:793 def add_import(fn); end # Add a loader to handle imported files ending in the extension # +ext+. # - # pkg:gem/rake#lib/rake/application.rb:161 + # pkg:gem/rake#lib/rake/application.rb:162 def add_loader(ext, loader); end # Collect the list of tasks on the command line. If no tasks are @@ -235,13 +235,13 @@ class Rake::Application # recognised command-line options, which OptionParser.parse will # have taken care of already. # - # pkg:gem/rake#lib/rake/application.rb:781 + # pkg:gem/rake#lib/rake/application.rb:774 def collect_command_line_tasks(args); end # Default task name ("default"). # (May be overridden by subclasses) # - # pkg:gem/rake#lib/rake/application.rb:795 + # pkg:gem/rake#lib/rake/application.rb:788 def default_task_name; end # Warn about deprecated usage. @@ -249,131 +249,131 @@ class Rake::Application # Example: # Rake.application.deprecate("import", "Rake.import", caller.first) # - # pkg:gem/rake#lib/rake/application.rb:288 + # pkg:gem/rake#lib/rake/application.rb:283 def deprecate(old_usage, new_usage, call_site); end - # pkg:gem/rake#lib/rake/application.rb:250 + # pkg:gem/rake#lib/rake/application.rb:245 def display_cause_details(ex); end # Display the error message that caused the exception. # - # pkg:gem/rake#lib/rake/application.rb:234 + # pkg:gem/rake#lib/rake/application.rb:229 def display_error_message(ex); end - # pkg:gem/rake#lib/rake/application.rb:275 + # pkg:gem/rake#lib/rake/application.rb:270 def display_exception_backtrace(ex); end - # pkg:gem/rake#lib/rake/application.rb:242 + # pkg:gem/rake#lib/rake/application.rb:237 def display_exception_details(ex); end - # pkg:gem/rake#lib/rake/application.rb:257 + # pkg:gem/rake#lib/rake/application.rb:252 def display_exception_details_seen; end - # pkg:gem/rake#lib/rake/application.rb:265 + # pkg:gem/rake#lib/rake/application.rb:260 def display_exception_message_details(ex); end # Display the tasks and prerequisites # - # pkg:gem/rake#lib/rake/application.rb:411 + # pkg:gem/rake#lib/rake/application.rb:406 def display_prerequisites; end # Display the tasks and comments. # - # pkg:gem/rake#lib/rake/application.rb:328 + # pkg:gem/rake#lib/rake/application.rb:323 def display_tasks_and_comments; end # Calculate the dynamic width of the # - # pkg:gem/rake#lib/rake/application.rb:379 + # pkg:gem/rake#lib/rake/application.rb:374 def dynamic_width; end - # pkg:gem/rake#lib/rake/application.rb:383 + # pkg:gem/rake#lib/rake/application.rb:378 def dynamic_width_stty; end - # pkg:gem/rake#lib/rake/application.rb:387 + # pkg:gem/rake#lib/rake/application.rb:382 def dynamic_width_tput; end # Exit the program because of an unhandled exception. # (may be overridden by subclasses) # - # pkg:gem/rake#lib/rake/application.rb:229 + # pkg:gem/rake#lib/rake/application.rb:224 def exit_because_of_exception(ex); end - # pkg:gem/rake#lib/rake/application.rb:708 + # pkg:gem/rake#lib/rake/application.rb:703 def find_rakefile_location; end # Read and handle the command line options. Returns the command line # arguments that we didn't understand, which should (in theory) be just # task names and env vars. # - # pkg:gem/rake#lib/rake/application.rb:674 + # pkg:gem/rake#lib/rake/application.rb:669 def handle_options(argv); end - # pkg:gem/rake#lib/rake/application.rb:261 + # pkg:gem/rake#lib/rake/application.rb:256 def has_cause?(ex); end # True if one of the files in RAKEFILES is in the current directory. # If a match is found, it is copied into @rakefile. # - # pkg:gem/rake#lib/rake/application.rb:304 + # pkg:gem/rake#lib/rake/application.rb:299 def have_rakefile; end # Initialize the command line parameters and app name. # - # pkg:gem/rake#lib/rake/application.rb:88 + # pkg:gem/rake#lib/rake/application.rb:89 def init(app_name = T.unsafe(nil), argv = T.unsafe(nil)); end # Invokes a task with arguments that are extracted from +task_string+ # - # pkg:gem/rake#lib/rake/application.rb:185 + # pkg:gem/rake#lib/rake/application.rb:180 def invoke_task(task_string); end # Load the pending list of imported files. # - # pkg:gem/rake#lib/rake/application.rb:805 + # pkg:gem/rake#lib/rake/application.rb:798 def load_imports; end # Find the rakefile and then load it and any pending imports. # - # pkg:gem/rake#lib/rake/application.rb:124 + # pkg:gem/rake#lib/rake/application.rb:125 def load_rakefile; end # The name of the application (typically 'rake') # - # pkg:gem/rake#lib/rake/application.rb:24 + # pkg:gem/rake#lib/rake/application.rb:25 def name; end # Application options from the command line # - # pkg:gem/rake#lib/rake/application.rb:167 + # pkg:gem/rake#lib/rake/application.rb:168 def options; end # The original directory where rake was invoked. # - # pkg:gem/rake#lib/rake/application.rb:27 + # pkg:gem/rake#lib/rake/application.rb:28 def original_dir; end - # pkg:gem/rake#lib/rake/application.rb:191 + # pkg:gem/rake#lib/rake/application.rb:186 def parse_task_string(string); end - # pkg:gem/rake#lib/rake/application.rb:720 + # pkg:gem/rake#lib/rake/application.rb:715 def print_rakefile_directory(location); end # Similar to the regular Ruby +require+ command, but will check # for *.rake files in addition to *.rb files. # - # pkg:gem/rake#lib/rake/application.rb:694 + # pkg:gem/rake#lib/rake/application.rb:689 def rake_require(file_name, paths = T.unsafe(nil), loaded = T.unsafe(nil)); end # Name of the actual rakefile used. # - # pkg:gem/rake#lib/rake/application.rb:30 + # pkg:gem/rake#lib/rake/application.rb:31 def rakefile; end - # pkg:gem/rake#lib/rake/application.rb:821 + # pkg:gem/rake#lib/rake/application.rb:814 def rakefile_location(backtrace = T.unsafe(nil)); end - # pkg:gem/rake#lib/rake/application.rb:725 + # pkg:gem/rake#lib/rake/application.rb:720 def raw_load_rakefile; end # Run the Rake application. The run method performs the following @@ -387,116 +387,118 @@ class Rake::Application # +init+ on your application. Then define any tasks. Finally, # call +top_level+ to run your top level tasks. # - # pkg:gem/rake#lib/rake/application.rb:79 + # pkg:gem/rake#lib/rake/application.rb:80 def run(argv = T.unsafe(nil)); end # Run the given block with the thread startup and shutdown. # - # pkg:gem/rake#lib/rake/application.rb:144 + # pkg:gem/rake#lib/rake/application.rb:145 def run_with_threads; end - # pkg:gem/rake#lib/rake/application.rb:830 + # pkg:gem/rake#lib/rake/application.rb:823 def set_default_options; end # Provide standard exception handling for the given block. # - # pkg:gem/rake#lib/rake/application.rb:213 + # pkg:gem/rake#lib/rake/application.rb:208 def standard_exception_handling; end # A list of all the standard options used in rake, suitable for # passing to OptionParser. # - # pkg:gem/rake#lib/rake/application.rb:432 + # pkg:gem/rake#lib/rake/application.rb:427 def standard_rake_options; end # The directory path containing the system wide rakefiles. # - # pkg:gem/rake#lib/rake/application.rb:757 + # pkg:gem/rake#lib/rake/application.rb:752 def system_dir; end # Number of columns on the terminal # - # pkg:gem/rake#lib/rake/application.rb:33 + # pkg:gem/rake#lib/rake/application.rb:34 def terminal_columns; end # Number of columns on the terminal # - # pkg:gem/rake#lib/rake/application.rb:33 + # pkg:gem/rake#lib/rake/application.rb:34 def terminal_columns=(_arg0); end - # pkg:gem/rake#lib/rake/application.rb:367 + # pkg:gem/rake#lib/rake/application.rb:362 def terminal_width; end # Return the thread pool used for multithreaded processing. # - # pkg:gem/rake#lib/rake/application.rb:178 + # pkg:gem/rake#lib/rake/application.rb:173 def thread_pool; end # Run the top level tasks of a Rake application. # - # pkg:gem/rake#lib/rake/application.rb:131 + # pkg:gem/rake#lib/rake/application.rb:132 def top_level; end # List of the top level task names (task names from the command line). # - # pkg:gem/rake#lib/rake/application.rb:36 + # pkg:gem/rake#lib/rake/application.rb:37 def top_level_tasks; end - # pkg:gem/rake#lib/rake/application.rb:418 + # pkg:gem/rake#lib/rake/application.rb:413 def trace(*strings); end - # pkg:gem/rake#lib/rake/application.rb:400 + # pkg:gem/rake#lib/rake/application.rb:395 def truncate(string, width); end # We will truncate output if we are outputting to a TTY or if we've been # given an explicit column width to honor # - # pkg:gem/rake#lib/rake/application.rb:323 + # pkg:gem/rake#lib/rake/application.rb:318 def truncate_output?; end # Override the detected TTY output state (mostly for testing) # - # pkg:gem/rake#lib/rake/application.rb:39 + # pkg:gem/rake#lib/rake/application.rb:40 def tty_output=(_arg0); end # True if we are outputting to TTY, false otherwise # - # pkg:gem/rake#lib/rake/application.rb:317 + # pkg:gem/rake#lib/rake/application.rb:312 def tty_output?; end - # pkg:gem/rake#lib/rake/application.rb:391 + # pkg:gem/rake#lib/rake/application.rb:386 def unix?; end - # pkg:gem/rake#lib/rake/application.rb:396 + # pkg:gem/rake#lib/rake/application.rb:391 def windows?; end private - # pkg:gem/rake#lib/rake/application.rb:751 + # pkg:gem/rake#lib/rake/application.rb:746 def glob(path, &block); end # Does the exception have a task invocation chain? # - # pkg:gem/rake#lib/rake/application.rb:297 + # pkg:gem/rake#lib/rake/application.rb:292 def has_chain?(exception); end - # pkg:gem/rake#lib/rake/application.rb:102 + # pkg:gem/rake#lib/rake/application.rb:103 def load_debug_at_stop_feature; end - # pkg:gem/rake#lib/rake/application.rb:650 + # pkg:gem/rake#lib/rake/application.rb:645 def select_tasks_to_show(options, show_tasks, value); end - # pkg:gem/rake#lib/rake/application.rb:657 + # pkg:gem/rake#lib/rake/application.rb:652 def select_trace_output(options, trace_option, value); end - # pkg:gem/rake#lib/rake/application.rb:423 + # pkg:gem/rake#lib/rake/application.rb:418 def sort_options(options); end - # pkg:gem/rake#lib/rake/application.rb:767 + # The standard directory containing system wide rake files. + # + # pkg:gem/rake#lib/rake/application.rb:757 def standard_system_dir; end end -# pkg:gem/rake#lib/rake/application.rb:41 +# pkg:gem/rake#lib/rake/application.rb:42 Rake::Application::DEFAULT_RAKEFILES = T.let(T.unsafe(nil), Array) # pkg:gem/rake#lib/rake/backtrace.rb:3 @@ -534,7 +536,7 @@ module Rake::Cloneable def initialize_copy(source); end end -# pkg:gem/rake#lib/rake/application.rb:13 +# pkg:gem/rake#lib/rake/application.rb:14 class Rake::CommandLineOptionError < ::StandardError; end # Based on a script at: @@ -1363,9 +1365,6 @@ class Rake::FileList # pkg:gem/rake#lib/rake/file_list.rb:76 def reverse_each(*args, &block); end - # pkg:gem/rake#lib/rake/file_list.rb:76 - def rfind(*args, &block); end - # pkg:gem/rake#lib/rake/file_list.rb:76 def rindex(*args, &block); end @@ -1686,19 +1685,19 @@ module Rake::FileUtilsExt # # temporarily to _v_. Return to the # # original value when code is done. # - # pkg:gem/rake#lib/rake/file_utils_ext.rb:77 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:78 def nowrite(value = T.unsafe(nil)); end # Check that the options do not contain options not listed in # +optdecl+. An ArgumentError exception is thrown if non-declared # options are found. # - # pkg:gem/rake#lib/rake/file_utils_ext.rb:123 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:124 def rake_check_options(options, *optdecl); end # Send the message to the default rake output (which is $stderr). # - # pkg:gem/rake#lib/rake/file_utils_ext.rb:116 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:117 def rake_output_message(message); end # pkg:gem/rake#lib/rake/file_utils_ext.rb:33 @@ -1763,7 +1762,7 @@ module Rake::FileUtilsExt # # instead of actually building the project. # - # pkg:gem/rake#lib/rake/file_utils_ext.rb:107 + # pkg:gem/rake#lib/rake/file_utils_ext.rb:108 def when_writing(msg = T.unsafe(nil)); end class << self @@ -2011,6 +2010,131 @@ class Rake::NameSpace def tasks; end end +# Options used by the Rake command line application. +# +# pkg:gem/rake#lib/rake/options.rb:8 +class Rake::Options + # pkg:gem/rake#lib/rake/options.rb:9 + def always_multitask; end + + # pkg:gem/rake#lib/rake/options.rb:9 + def always_multitask=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:10 + def backtrace; end + + # pkg:gem/rake#lib/rake/options.rb:10 + def backtrace=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:11 + def build_all; end + + # pkg:gem/rake#lib/rake/options.rb:11 + def build_all=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:12 + def dryrun; end + + # pkg:gem/rake#lib/rake/options.rb:12 + def dryrun=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:13 + def ignore_deprecate; end + + # pkg:gem/rake#lib/rake/options.rb:13 + def ignore_deprecate=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:14 + def ignore_system; end + + # pkg:gem/rake#lib/rake/options.rb:14 + def ignore_system=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:15 + def job_stats; end + + # pkg:gem/rake#lib/rake/options.rb:15 + def job_stats=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:16 + def load_system; end + + # pkg:gem/rake#lib/rake/options.rb:16 + def load_system=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:17 + def nosearch; end + + # pkg:gem/rake#lib/rake/options.rb:17 + def nosearch=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:18 + def rakelib; end + + # pkg:gem/rake#lib/rake/options.rb:18 + def rakelib=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:19 + def show_all_tasks; end + + # pkg:gem/rake#lib/rake/options.rb:19 + def show_all_tasks=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:20 + def show_prereqs; end + + # pkg:gem/rake#lib/rake/options.rb:20 + def show_prereqs=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:21 + def show_task_pattern; end + + # pkg:gem/rake#lib/rake/options.rb:21 + def show_task_pattern=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:22 + def show_tasks; end + + # pkg:gem/rake#lib/rake/options.rb:22 + def show_tasks=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:23 + def silent; end + + # pkg:gem/rake#lib/rake/options.rb:23 + def silent=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:24 + def suppress_backtrace_pattern; end + + # pkg:gem/rake#lib/rake/options.rb:24 + def suppress_backtrace_pattern=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:25 + def thread_pool_size; end + + # pkg:gem/rake#lib/rake/options.rb:25 + def thread_pool_size=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:26 + def trace; end + + # pkg:gem/rake#lib/rake/options.rb:26 + def trace=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:27 + def trace_output; end + + # pkg:gem/rake#lib/rake/options.rb:27 + def trace_output=(_arg0); end + + # pkg:gem/rake#lib/rake/options.rb:28 + def trace_rules; end + + # pkg:gem/rake#lib/rake/options.rb:28 + def trace_rules=(_arg0); end +end + # Include PrivateReader to use +private_reader+. # # pkg:gem/rake#lib/rake/private_reader.rb:5 @@ -2704,7 +2828,7 @@ module Rake::TaskManager # Return the current description, clearing it in the process. # - # pkg:gem/rake#lib/rake/task_manager.rb:319 + # pkg:gem/rake#lib/rake/task_manager.rb:321 def get_description; end # Lookup the task name @@ -2747,10 +2871,10 @@ module Rake::TaskManager def trace_rule(level, message); end class << self - # pkg:gem/rake#lib/rake/task_manager.rb:326 + # pkg:gem/rake#lib/rake/task_manager.rb:328 def record_task_metadata; end - # pkg:gem/rake#lib/rake/task_manager.rb:326 + # pkg:gem/rake#lib/rake/task_manager.rb:328 def record_task_metadata=(_arg0); end end end @@ -2884,39 +3008,14 @@ Rake::Version::OTHER = T.let(T.unsafe(nil), Array) # pkg:gem/rake#lib/rake/win32.rb:7 module Rake::Win32 class << self - # Normalize a win32 path so that the slashes are all forward slashes. - # - # pkg:gem/rake#lib/rake/win32.rb:45 - def normalize(path); end - - # The standard directory containing system wide rake files on - # Win 32 systems. Try the following environment variables (in - # order): - # - # * HOME - # * HOMEDRIVE + HOMEPATH - # * APPDATA - # * USERPROFILE - # - # If the above are not defined, the return nil. - # - # pkg:gem/rake#lib/rake/win32.rb:30 - def win32_system_dir; end - # True if running on a windows system. # - # pkg:gem/rake#lib/rake/win32.rb:16 + # pkg:gem/rake#lib/rake/win32.rb:11 def windows?; end end end -# Error indicating a problem in locating the home directory on a -# Win32 system. -# -# pkg:gem/rake#lib/rake/win32.rb:11 -class Rake::Win32::Win32HomeError < ::RuntimeError; end - -# pkg:gem/rake#lib/rake.rb:68 +# pkg:gem/rake#lib/rake.rb:69 RakeFileUtils = Rake::FileUtilsExt # pkg:gem/rake#lib/rake/ext/string.rb:4 diff --git a/sorbet/rbi/gems/regexp_parser@2.11.3.rbi b/sorbet/rbi/gems/regexp_parser@2.12.0.rbi similarity index 98% rename from sorbet/rbi/gems/regexp_parser@2.11.3.rbi rename to sorbet/rbi/gems/regexp_parser@2.12.0.rbi index f3f3167..20c5398 100644 --- a/sorbet/rbi/gems/regexp_parser@2.11.3.rbi +++ b/sorbet/rbi/gems/regexp_parser@2.12.0.rbi @@ -2636,7 +2636,7 @@ class Regexp::Syntax::Base end # pkg:gem/regexp_parser#lib/regexp_parser/syntax/versions.rb:10 -Regexp::Syntax::CURRENT = Regexp::Syntax::V3_5_0 +Regexp::Syntax::CURRENT = Regexp::Syntax::V3_2_0 # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:8 class Regexp::Syntax::InvalidVersionNameError < ::Regexp::Syntax::SyntaxError @@ -2934,7 +2934,7 @@ Regexp::Syntax::Token::PosixClass::Type = T.let(T.unsafe(nil), Symbol) # alias for symmetry between token symbol and Token module name # -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:764 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:809 Regexp::Syntax::Token::Property = Regexp::Syntax::Token::UnicodeProperty # pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/quantifier.rb:5 @@ -2993,236 +2993,258 @@ Regexp::Syntax::Token::SubexpressionCall::Number = T.let(T.unsafe(nil), Array) Regexp::Syntax::Token::Types = T.let(T.unsafe(nil), Array) # pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:5 -module Regexp::Syntax::Token::UnicodeProperty; end +module Regexp::Syntax::Token::UnicodeProperty + class << self + private + + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:6 + def all(name); end + end +end -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:68 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:73 Regexp::Syntax::Token::UnicodeProperty::Age = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:42 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:45 Regexp::Syntax::Token::UnicodeProperty::Age_V1_9_3 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:46 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:49 Regexp::Syntax::Token::UnicodeProperty::Age_V2_0_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:48 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:51 Regexp::Syntax::Token::UnicodeProperty::Age_V2_2_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:50 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:53 Regexp::Syntax::Token::UnicodeProperty::Age_V2_3_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:52 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:55 Regexp::Syntax::Token::UnicodeProperty::Age_V2_4_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:54 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:57 Regexp::Syntax::Token::UnicodeProperty::Age_V2_5_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:56 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:59 Regexp::Syntax::Token::UnicodeProperty::Age_V2_6_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:58 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:61 Regexp::Syntax::Token::UnicodeProperty::Age_V2_6_2 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:60 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:63 Regexp::Syntax::Token::UnicodeProperty::Age_V2_6_3 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:62 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:65 Regexp::Syntax::Token::UnicodeProperty::Age_V3_1_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:64 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:67 Regexp::Syntax::Token::UnicodeProperty::Age_V3_2_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:66 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:69 Regexp::Syntax::Token::UnicodeProperty::Age_V3_5_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:754 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:71 +Regexp::Syntax::Token::UnicodeProperty::Age_V4_0_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:799 Regexp::Syntax::Token::UnicodeProperty::All = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:15 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:18 module Regexp::Syntax::Token::UnicodeProperty::Category; end -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:38 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:41 Regexp::Syntax::Token::UnicodeProperty::Category::All = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:35 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:38 Regexp::Syntax::Token::UnicodeProperty::Category::Codepoint = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:16 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:19 Regexp::Syntax::Token::UnicodeProperty::Category::Letter = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:19 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:22 Regexp::Syntax::Token::UnicodeProperty::Category::Mark = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:22 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:25 Regexp::Syntax::Token::UnicodeProperty::Category::Number = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:25 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:28 Regexp::Syntax::Token::UnicodeProperty::Category::Punctuation = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:32 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:35 Regexp::Syntax::Token::UnicodeProperty::Category::Separator = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:29 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:32 Regexp::Syntax::Token::UnicodeProperty::Category::Symbol = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:8 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:11 Regexp::Syntax::Token::UnicodeProperty::CharType_V1_9_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:11 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:14 Regexp::Syntax::Token::UnicodeProperty::CharType_V2_5_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:143 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:152 Regexp::Syntax::Token::UnicodeProperty::Derived = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:70 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:75 Regexp::Syntax::Token::UnicodeProperty::Derived_V1_9_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:124 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:129 Regexp::Syntax::Token::UnicodeProperty::Derived_V2_0_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:129 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:134 Regexp::Syntax::Token::UnicodeProperty::Derived_V2_4_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:133 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:138 Regexp::Syntax::Token::UnicodeProperty::Derived_V2_5_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:137 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:142 Regexp::Syntax::Token::UnicodeProperty::Derived_V3_5_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:738 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:148 +Regexp::Syntax::Token::UnicodeProperty::Derived_V4_0_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:782 Regexp::Syntax::Token::UnicodeProperty::Emoji = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:708 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:752 Regexp::Syntax::Token::UnicodeProperty::Emoji_V2_5_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:716 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:760 Regexp::Syntax::Token::UnicodeProperty::Emoji_V2_6_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:736 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:780 Regexp::Syntax::Token::UnicodeProperty::Enumerated = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:720 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:764 Regexp::Syntax::Token::UnicodeProperty::Enumerated_V2_4_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:757 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:802 Regexp::Syntax::Token::UnicodeProperty::NonType = T.let(T.unsafe(nil), Symbol) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:13 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:16 Regexp::Syntax::Token::UnicodeProperty::POSIX = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:342 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:365 Regexp::Syntax::Token::UnicodeProperty::Script = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:145 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:154 Regexp::Syntax::Token::UnicodeProperty::Script_V1_9_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:241 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:250 Regexp::Syntax::Token::UnicodeProperty::Script_V1_9_3 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:247 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:256 Regexp::Syntax::Token::UnicodeProperty::Script_V2_0_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:257 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:266 Regexp::Syntax::Token::UnicodeProperty::Script_V2_2_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:283 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:292 Regexp::Syntax::Token::UnicodeProperty::Script_V2_3_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:292 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:301 Regexp::Syntax::Token::UnicodeProperty::Script_V2_4_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:301 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:310 Regexp::Syntax::Token::UnicodeProperty::Script_V2_5_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:308 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:317 Regexp::Syntax::Token::UnicodeProperty::Script_V2_6_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:318 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:327 Regexp::Syntax::Token::UnicodeProperty::Script_V2_6_2 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:325 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:334 Regexp::Syntax::Token::UnicodeProperty::Script_V3_1_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:332 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:341 Regexp::Syntax::Token::UnicodeProperty::Script_V3_2_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:756 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:351 +Regexp::Syntax::Token::UnicodeProperty::Script_V4_0_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:801 Regexp::Syntax::Token::UnicodeProperty::Type = T.let(T.unsafe(nil), Symbol) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:706 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:750 Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:344 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:367 Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V1_9_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:443 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:466 Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_0_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:571 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:594 Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_2_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:606 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:629 Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_3_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:619 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:642 Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_4_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:633 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:656 Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_5_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:643 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:666 Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_6_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:657 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:680 Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_6_2 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:669 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:692 Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V3_1_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:680 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:703 Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V3_2_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:702 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:725 Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V3_5_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:740 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:729 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V4_0_0 = T.let(T.unsafe(nil), Array) + +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:784 Regexp::Syntax::Token::UnicodeProperty::V1_9_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:741 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:785 Regexp::Syntax::Token::UnicodeProperty::V1_9_3 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:742 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:786 Regexp::Syntax::Token::UnicodeProperty::V2_0_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:743 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:787 Regexp::Syntax::Token::UnicodeProperty::V2_2_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:744 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:788 Regexp::Syntax::Token::UnicodeProperty::V2_3_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:745 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:789 Regexp::Syntax::Token::UnicodeProperty::V2_4_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:746 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:790 Regexp::Syntax::Token::UnicodeProperty::V2_5_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:747 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:791 Regexp::Syntax::Token::UnicodeProperty::V2_6_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:748 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:792 Regexp::Syntax::Token::UnicodeProperty::V2_6_2 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:749 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:793 Regexp::Syntax::Token::UnicodeProperty::V2_6_3 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:750 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:794 Regexp::Syntax::Token::UnicodeProperty::V3_1_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:751 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:795 Regexp::Syntax::Token::UnicodeProperty::V3_2_0 = T.let(T.unsafe(nil), Array) -# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:752 +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:796 Regexp::Syntax::Token::UnicodeProperty::V3_5_0 = T.let(T.unsafe(nil), Array) +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/token/unicode_property.rb:797 +Regexp::Syntax::Token::UnicodeProperty::V4_0_0 = T.let(T.unsafe(nil), Array) + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:14 class Regexp::Syntax::UnknownSyntaxNameError < ::Regexp::Syntax::SyntaxError # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:15 @@ -3274,6 +3296,9 @@ class Regexp::Syntax::V3_2_0 < ::Regexp::Syntax::V3_1_0; end # pkg:gem/regexp_parser#lib/regexp_parser/syntax/versions/3.5.0.rb:1 class Regexp::Syntax::V3_5_0 < ::Regexp::Syntax::V3_2_0; end +# pkg:gem/regexp_parser#lib/regexp_parser/syntax/versions/4.0.0.rb:1 +class Regexp::Syntax::V4_0_0 < ::Regexp::Syntax::V3_5_0; end + # pkg:gem/regexp_parser#lib/regexp_parser/syntax/version_lookup.rb:6 Regexp::Syntax::VERSION_CONST_REGEXP = T.let(T.unsafe(nil), Regexp) diff --git a/sorbet/rbi/gems/rubocop-ast@1.49.0.rbi b/sorbet/rbi/gems/rubocop-ast@1.49.1.rbi similarity index 98% rename from sorbet/rbi/gems/rubocop-ast@1.49.0.rbi rename to sorbet/rbi/gems/rubocop-ast@1.49.1.rbi index 5ba513b..5a0b02d 100644 --- a/sorbet/rbi/gems/rubocop-ast@1.49.0.rbi +++ b/sorbet/rbi/gems/rubocop-ast@1.49.1.rbi @@ -958,9 +958,6 @@ module RuboCop::AST::CollectionNode # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 def reverse_each(*_arg0, **_arg1, &_arg2); end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 - def rfind(*_arg0, **_arg1, &_arg2); end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node/mixin/collection_node.rb:13 def rindex(*_arg0, **_arg1, &_arg2); end @@ -3936,15 +3933,21 @@ class RuboCop::AST::NodePattern::Compiler::Binding # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/binding.rb:16 def bind(name); end + # Returns currently bound variable names + # @return [Array] variable names that are currently bound + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/binding.rb:31 + def bound_variables; end + # Yields for each branch of the given union, forbidding unification of # bindings which only appear in a subset of the union. # - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/binding.rb:31 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/binding.rb:37 def union_bind(enum); end private - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/binding.rb:69 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/binding.rb:75 def forbid(names); end end @@ -4217,7 +4220,7 @@ end # Doc on how this fits in the compiling process: # /docs/modules/ROOT/pages/node_pattern.adoc # -# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:16 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:17 class RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler < ::RuboCop::AST::NodePattern::Compiler::Subcompiler # Calls `compile_sequence`; the actual `compile` method # will be used for the different terms of the sequence. @@ -4231,22 +4234,22 @@ class RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler < ::RuboCop::AST: # @api private # - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:251 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:256 def in_sync; end protected - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:226 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:231 def compile_terms(children = T.unsafe(nil), last_arity = T.unsafe(nil)); end # @api private # - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:251 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:256 def cur_index; end # yield `sync_code` iff not already in sync # - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:242 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:247 def sync; end private @@ -4256,92 +4259,99 @@ class RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler < ::RuboCop::AST: # Compilation helpers # - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:165 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:170 def compile_and_advance(term); end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:128 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:133 def compile_any_order_branches(matched_var); end # @return [Array] Else code, and init code (if any) # - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:137 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:142 def compile_any_order_else; end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:180 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:185 def compile_captured_repetition(child_code, child_captures); end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:119 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:124 def compile_case(when_branches, else_code); end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:361 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:366 def compile_child_nb_guard(arity_range); end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:319 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:324 def compile_cur_index; end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:325 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:330 def compile_index(cur = T.unsafe(nil)); end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:353 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:358 def compile_loop(term); end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:347 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:352 def compile_loop_advance(to = T.unsafe(nil)); end # Assumes `@cur_index` is already updated # - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:198 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:203 def compile_matched(kind); end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:304 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:309 def compile_max_matched; end # @return [String] code that evaluates to `false` if the matched arity is too small # - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:270 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:275 def compile_min_check; end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:285 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:290 def compile_remaining; end + # Generate initialization code for unification variables + # @param newly_bound [Array] variable names that were newly bound + # @return [String] initialization code + # + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:424 + def compile_unify_init(newly_bound); end + # @return [Hash] of {subcompiler => code} # - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:373 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:378 def compile_union_forks; end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:313 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:318 def empty_loop; end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:214 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:219 def handle_prev; end # Modifies in place `forks` # Syncs our state # - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:400 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:405 def merge_forks!(forks); end # Modifies in place `forks` to insure that `cur_{child|index}_var` are ok # - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:384 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:389 def preserve_union_start(forks); end # @return [Array] total arities (as Ranges) of remaining children nodes # E.g. For sequence `(_ _? <_ _>)`, arities are: 1, 0..1, 2 # and remaining arities are: 3..4, 2..3, 2..2, 0..0 # - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:259 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:264 def remaining_arities(children, last_arity); end # returns truthy iff `@cur_index` switched to relative from end mode (i.e. < 0) # - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:341 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:346 def use_index_from_end; end # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:88 def visit_any_order; end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:150 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:155 def visit_capture; end # Single node patterns are all handled here @@ -4352,16 +4362,16 @@ class RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler < ::RuboCop::AST: # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:78 def visit_repetition; end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:159 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:164 def visit_rest; end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:104 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:109 def visit_union; end # NOTE: assumes `@cur_index != :seq_head`. Node types using `within_loop` must # have `def in_sequence_head; :raise; end` # - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:333 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:338 def within_loop; end end @@ -4410,7 +4420,7 @@ class RuboCop::AST::NodePattern::Compiler::Subcompiler end end -# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:54 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:27 class RuboCop::AST::NodePattern::Invalid < ::StandardError; end # Lexer class for `NodePattern` @@ -4565,7 +4575,7 @@ class RuboCop::AST::NodePattern::LexerRex::ScanError < ::RuboCop::AST::NodePatte # Helpers for defining methods based on a pattern string # -# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:28 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:30 module RuboCop::AST::NodePattern::Macros # Define a method which applies a pattern to an AST node # @@ -4575,7 +4585,7 @@ module RuboCop::AST::NodePattern::Macros # If the node matches, and no block is provided, the new method will # return the captures, or `true` if there were none. # - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:36 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:38 def def_node_matcher(method_name, pattern_str, **keyword_defaults); end # Define a method which recurses over the descendants of an AST node, @@ -4585,7 +4595,7 @@ module RuboCop::AST::NodePattern::Macros # as soon as it finds a descendant which matches. Otherwise, it will # yield all descendants which match. # - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:46 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern.rb:48 def def_node_search(method_name, pattern_str, **keyword_defaults); end end @@ -4869,116 +4879,116 @@ class RuboCop::AST::NodePattern::Parser < ::Racc::Parser # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.rb:19 def initialize(builder = T.unsafe(nil)); end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:333 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:335 def _reduce_10(val, _values); end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:337 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:339 def _reduce_11(val, _values); end # reduce 12 omitted # - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:343 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:345 def _reduce_13(val, _values); end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:347 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:349 def _reduce_14(val, _values); end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:351 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:353 def _reduce_15(val, _values); end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:355 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:357 def _reduce_16(val, _values); end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:359 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:361 def _reduce_17(val, _values); end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:363 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:365 def _reduce_18(val, _values); end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:367 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:369 def _reduce_19(val, _values); end # reduce 1 omitted # - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:301 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:303 def _reduce_2(val, _values); end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:371 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:373 def _reduce_20(val, _values); end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:375 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:377 def _reduce_21(val, _values); end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:379 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:381 def _reduce_22(val, _values); end # reduce 24 omitted # - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:387 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:389 def _reduce_25(val, _values); end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:393 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:395 def _reduce_26(val, _values); end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:305 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:307 def _reduce_3(val, _values); end # reduce 32 omitted # - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:413 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:415 def _reduce_33(val, _values); end # reduce 36 omitted # - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:423 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:425 def _reduce_37(val, _values); end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:427 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:429 def _reduce_38(val, _values); end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:431 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:433 def _reduce_39(val, _values); end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:309 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:311 def _reduce_4(val, _values); end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:435 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:437 def _reduce_40(val, _values); end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:439 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:441 def _reduce_41(val, _values); end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:443 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:445 def _reduce_42(val, _values); end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:447 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:449 def _reduce_43(val, _values); end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:451 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:453 def _reduce_44(val, _values); end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:455 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:457 def _reduce_45(val, _values); end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:459 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:461 def _reduce_46(val, _values); end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:313 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:315 def _reduce_5(val, _values); end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:317 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:319 def _reduce_6(val, _values); end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:321 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:323 def _reduce_7(val, _values); end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:325 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:327 def _reduce_8(val, _values); end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:329 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:331 def _reduce_9(val, _values); end - # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:463 + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:465 def _reduce_none(val, _values); end # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.rb:46 @@ -5034,10 +5044,10 @@ RuboCop::AST::NodePattern::Parser::Lexer = RuboCop::AST::NodePattern::Lexer # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:227 RuboCop::AST::NodePattern::Parser::Racc_arg = T.let(T.unsafe(nil), Array) -# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:293 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:295 RuboCop::AST::NodePattern::Parser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) -# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:243 +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/parser.racc.rb:244 RuboCop::AST::NodePattern::Parser::Racc_token_to_s_table = T.let(T.unsafe(nil), Array) # Overrides Parser to use `WithMeta` variants and provide additional methods @@ -5144,6 +5154,9 @@ RuboCop::AST::NodePattern::Sets::SET_1_2 = T.let(T.unsafe(nil), Set) # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_ADD_DEPENDENCY_ADD_RUNTIME_DEPENDENCY_ADD_DEVELOPMENT_DEPENDENCY = T.let(T.unsafe(nil), Set) +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_ALL_ANY_CLASS_OF_ETC = T.let(T.unsafe(nil), Set) + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_ALL_CONTEXT = T.let(T.unsafe(nil), Set) @@ -5159,6 +5172,9 @@ RuboCop::AST::NodePattern::Sets::SET_ANY_NONE = T.let(T.unsafe(nil), Set) # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_ARRAY_HASH = T.let(T.unsafe(nil), Set) +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_ATTR_READER_ATTR_WRITER_ATTR_ACCESSOR = T.let(T.unsafe(nil), Set) + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_ATTR_READER_ATTR_WRITER_ATTR_ACCESSOR_ATTR = T.let(T.unsafe(nil), Set) @@ -5246,6 +5262,9 @@ RuboCop::AST::NodePattern::Sets::SET_EXPECT_ALLOW = T.let(T.unsafe(nil), Set) # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_EXPECT_EXPECT_ANY_INSTANCE_OF = T.let(T.unsafe(nil), Set) +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_EXTEND_INCLUDE = T.let(T.unsafe(nil), Set) + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_FILETEST_FILE_DIR_SHELL = T.let(T.unsafe(nil), Set) @@ -5282,12 +5301,18 @@ RuboCop::AST::NodePattern::Sets::SET_GROUP_BY_TO_H_TALLY_ETC = T.let(T.unsafe(ni # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_GSUB_GSUB = T.let(T.unsafe(nil), Set) +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_IF_UNLESS = T.let(T.unsafe(nil), Set) + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_INCLUDE_EXTEND_PREPEND = T.let(T.unsafe(nil), Set) # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_INCLUDE_MEMBER = T.let(T.unsafe(nil), Set) +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_INCLUDE_PREPEND = T.let(T.unsafe(nil), Set) + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_INSTANCE_EVAL_CLASS_EVAL_MODULE_EVAL = T.let(T.unsafe(nil), Set) @@ -5297,6 +5322,9 @@ RuboCop::AST::NodePattern::Sets::SET_INSTANCE_EXEC_CLASS_EXEC_MODULE_EXEC = T.le # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_INTEGER_BIGDECIMAL_COMPLEX_RATIONAL = T.let(T.unsafe(nil), Set) +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_IS_A_KIND_OF = T.let(T.unsafe(nil), Set) + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_IS_EXPECTED_SHOULD_SHOULD_NOT = T.let(T.unsafe(nil), Set) @@ -5357,6 +5385,9 @@ RuboCop::AST::NodePattern::Sets::SET_PRIVATE_PROTECTED_PUBLIC = T.let(T.unsafe(n # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_PROC_LAMBDA = T.let(T.unsafe(nil), Set) +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_PROP_CONST = T.let(T.unsafe(nil), Set) + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_PUBLIC_CONSTANT_PRIVATE_CONSTANT = T.let(T.unsafe(nil), Set) @@ -5396,6 +5427,9 @@ RuboCop::AST::NodePattern::Sets::SET_REQUIRE_REQUIRE_RELATIVE = T.let(T.unsafe(n # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_REVERSE_REVERSE_EACH = T.let(T.unsafe(nil), Set) +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_SELECT_FILTER = T.let(T.unsafe(nil), Set) + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_SELECT_FILTER_FIND_ALL = T.let(T.unsafe(nil), Set) @@ -5408,12 +5442,18 @@ RuboCop::AST::NodePattern::Sets::SET_SEND_PUBLIC_SEND___SEND__ = T.let(T.unsafe( # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_SEND___SEND__ = T.let(T.unsafe(nil), Set) +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_SET_HEADER_GET_HEADER_DELETE_HEADER_HAS_HEADER = T.let(T.unsafe(nil), Set) + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_SET_SORTEDSET = T.let(T.unsafe(nil), Set) # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_SHOULD_SHOULD_NOT = T.let(T.unsafe(nil), Set) +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_SIG_HELPERS = T.let(T.unsafe(nil), Set) + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_SKIP_PENDING = T.let(T.unsafe(nil), Set) @@ -5435,12 +5475,21 @@ RuboCop::AST::NodePattern::Sets::SET_STDOUT_STDERR = T.let(T.unsafe(nil), Set) # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_STRUCT_CLASS = T.let(T.unsafe(nil), Set) +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_STRUCT_IMMUTABLESTRUCT = T.let(T.unsafe(nil), Set) + +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_STRUCT_IMMUTABLESTRUCT_INEXACTSTRUCT = T.let(T.unsafe(nil), Set) + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_SUCC_PRED_NEXT = T.let(T.unsafe(nil), Set) # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_TASK_NAMESPACE = T.let(T.unsafe(nil), Set) +# pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 +RuboCop::AST::NodePattern::Sets::SET_TESTS_ALWAYS = T.let(T.unsafe(nil), Set) + # pkg:gem/rubocop-ast#lib/rubocop/ast/node_pattern/sets.rb:10 RuboCop::AST::NodePattern::Sets::SET_TO_ENUM_ENUM_FOR = T.let(T.unsafe(nil), Set) @@ -6552,6 +6601,9 @@ RuboCop::AST::Token::LEFT_PAREN_TYPES = T.let(T.unsafe(nil), Array) module RuboCop::AST::Traversal extend ::RuboCop::AST::Traversal::CallbackCompiler + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 + def on_(node); end + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on___ENCODING__(node); end @@ -6603,7 +6655,7 @@ module RuboCop::AST::Traversal # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_blockarg(node); end - # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:43 + # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 def on_blocknilarg(node); end # pkg:gem/rubocop-ast#lib/rubocop/ast/traversal.rb:50 diff --git a/sorbet/rbi/gems/rubocop-gusto@10.6.0.rbi b/sorbet/rbi/gems/rubocop-gusto@10.9.3.rbi similarity index 84% rename from sorbet/rbi/gems/rubocop-gusto@10.6.0.rbi rename to sorbet/rbi/gems/rubocop-gusto@10.9.3.rbi index 723c032..62bdd1b 100644 --- a/sorbet/rbi/gems/rubocop-gusto@10.6.0.rbi +++ b/sorbet/rbi/gems/rubocop-gusto@10.9.3.rbi @@ -368,24 +368,24 @@ RuboCop::Cop::Gusto::PaperclipOrAttachable::RESTRICT_ON_SEND = T.let(T.unsafe(ni # # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/perform_class_method.rb:28 class RuboCop::Cop::Gusto::PerformClassMethod < ::RuboCop::Cop::Base - # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/perform_class_method.rb:33 + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/perform_class_method.rb:38 def on_def(node); end - # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/perform_class_method.rb:40 + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/perform_class_method.rb:45 def on_defs(node); end - private + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/perform_class_method.rb:34 + def worker_module_include?(param0 = T.unsafe(nil)); end - # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/perform_class_method.rb:63 - def is_include?(node); end + private - # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/perform_class_method.rb:52 + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/perform_class_method.rb:57 def is_sidekiq_worker?(search_node, method_type); end - # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/perform_class_method.rb:44 + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/perform_class_method.rb:49 def perform_class_method_type(node); end - # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/perform_class_method.rb:67 + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/perform_class_method.rb:65 def worker_modules; end end @@ -518,8 +518,16 @@ RuboCop::Cop::Gusto::RablExtends::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/rails_env.rb:30 class RuboCop::Cop::Gusto::RailsEnv < ::RuboCop::Cop::Base - # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/rails_env.rb:58 + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/rails_env.rb:65 def on_send(node); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/rails_env.rb:58 + def prohibited_rails_env?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/rails_env.rb:71 + def prohibited_predicate?(name); end end # This allow list is derived from: @@ -533,9 +541,6 @@ RuboCop::Cop::Gusto::RailsEnv::ALLOWED_LIST = T.let(T.unsafe(nil), Set) RuboCop::Cop::Gusto::RailsEnv::MSG = T.let(T.unsafe(nil), String) # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/rails_env.rb:55 -RuboCop::Cop::Gusto::RailsEnv::PROHIBITED_CLASS = T.let(T.unsafe(nil), String) - -# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/rails_env.rb:56 RuboCop::Cop::Gusto::RailsEnv::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Detects constants in a rake file because they are defined at the top level. @@ -657,21 +662,24 @@ RuboCop::Cop::Gusto::RegexpBypass::PROHIBITED_END_ANCHOR = T.let(T.unsafe(nil), # # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/rspec_date_time_mock.rb:27 class RuboCop::Cop::Gusto::RspecDateTimeMock < ::RuboCop::Cop::Base - # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/rspec_date_time_mock.rb:54 + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/rspec_date_time_mock.rb:37 + def and_call_original?(param0); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/rspec_date_time_mock.rb:59 def on_send(node); end - # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/rspec_date_time_mock.rb:43 + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/rspec_date_time_mock.rb:48 def time_mock?(param0 = T.unsafe(nil)); end private - # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/rspec_date_time_mock.rb:89 + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/rspec_date_time_mock.rb:92 def and_call_original_in_chain?(node); end # Returns true if the given node is a const or a call chain whose root receiver # is one of the protected time classes (Date/Time/DateTime) # - # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/rspec_date_time_mock.rb:69 + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/rspec_date_time_mock.rb:74 def rooted_in_time_class?(node); end end @@ -686,16 +694,16 @@ RuboCop::Cop::Gusto::RspecDateTimeMock::RESTRICT_ON_SEND = T.let(T.unsafe(nil), # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/sidekiq_params.rb:6 class RuboCop::Cop::Gusto::SidekiqParams < ::RuboCop::Cop::Base - # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/sidekiq_params.rb:10 + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/sidekiq_params.rb:14 def on_def(node); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/sidekiq_params.rb:10 + def perform_with_kwargs?(param0 = T.unsafe(nil)); end end # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/sidekiq_params.rb:7 RuboCop::Cop::Gusto::SidekiqParams::MSG = T.let(T.unsafe(nil), String) -# pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/sidekiq_params.rb:8 -RuboCop::Cop::Gusto::SidekiqParams::PROHIBITED_ARG_TYPES = T.let(T.unsafe(nil), Set) - # Checks that no top-level constants (excluding classes and modules) # are defined. This rule exists to prevent accidental pollution of the # global namespace as well as cases where application code has @@ -786,7 +794,7 @@ class RuboCop::Cop::Gusto::UsePaintNotColorize < ::RuboCop::Cop::Base private - # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/use_paint_not_colorize.rb:222 + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/use_paint_not_colorize.rb:219 def build_paint_call(string_node, foreground, background, styles); end # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/use_paint_not_colorize.rb:130 @@ -795,7 +803,7 @@ class RuboCop::Cop::Gusto::UsePaintNotColorize < ::RuboCop::Cop::Base # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/use_paint_not_colorize.rb:136 def correction(node); end - # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/use_paint_not_colorize.rb:202 + # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/use_paint_not_colorize.rb:199 def extract_string_and_operations(node); end # pkg:gem/rubocop-gusto#lib/rubocop/cop/gusto/use_paint_not_colorize.rb:122 @@ -926,62 +934,153 @@ end # pkg:gem/rubocop-gusto#lib/rubocop/cop/internal_affairs/require_restrict_on_send.rb:27 RuboCop::Cop::InternalAffairs::RequireRestrictOnSend::MSG = T.let(T.unsafe(nil), String) +# pkg:gem/rubocop-gusto#lib/rubocop/cop/rspec/scattered_let.rb:7 +module RuboCop::Cop::RSpec; end + +# Patches the upstream `RSpec/ScatteredLet` cop so that Sorbet `sig` +# declarations attached to `let`/`let!` blocks (Sorbet's RSpec mode) +# do not interrupt the consecutive-let chain. +# +# Without this patch the upstream cop flags valid `sig`+`let` +# arrangements because the intervening `sig` block breaks the +# consecutive-sibling check. (The sig-aware `MoveNode` patch in +# `lib/rubocop/gusto/move_node_patch.rb` handles dragging the `sig` +# along during autocorrect.) +# +# @example +# # good (no longer flagged) +# context "..." do +# sig { returns(Something) } +# let(:thing) { create(:something) } +# +# sig { returns(Other) } +# let(:other) { create(:other) } +# end +# +# pkg:gem/rubocop-gusto#lib/rubocop/cop/rspec/scattered_let.rb:27 +class RuboCop::Cop::RSpec::ScatteredLet < ::RuboCop::Cop::RSpec::Base + # pkg:gem/rubocop-gusto#lib/rubocop/cop/rspec/scattered_let.rb:32 + def sig_block?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/rspec/scattered_let.rb:60 + def build_let_units(children); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/rspec/scattered_let.rb:38 + def check_let_declarations(body); end +end + +# pkg:gem/rubocop-gusto#lib/rubocop/cop/rspec/scattered_let.rb:28 +class RuboCop::Cop::RSpec::ScatteredLet::LetUnit < ::Struct + # pkg:gem/rubocop-gusto#lib/rubocop/cop/rspec/scattered_let.rb:28 + def length; end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/rspec/scattered_let.rb:28 + def length=(_); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/rspec/scattered_let.rb:28 + def let; end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/rspec/scattered_let.rb:28 + def let=(_); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/rspec/scattered_let.rb:28 + def start_index; end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/rspec/scattered_let.rb:28 + def start_index=(_); end + + class << self + # pkg:gem/rubocop-gusto#lib/rubocop/cop/rspec/scattered_let.rb:28 + def [](*_arg0); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/rspec/scattered_let.rb:28 + def inspect; end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/rspec/scattered_let.rb:28 + def keyword_init?; end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/rspec/scattered_let.rb:28 + def members; end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/rspec/scattered_let.rb:28 + def new(*_arg0); end + end +end + # pkg:gem/rubocop-gusto#lib/rubocop/cop/rack/lowercase_header_keys.rb:5 module RuboCop::Cop::Rack; end # Detects HTTP response headers with uppercase characters. -# HTTP response header keys should be lowercase for consistency -# and compatibility with HTTP/2 and modern web standards. +# HTTP response header keys should be lowercase for compatibility +# with HTTP/2 and modern web standards. +# +# HTTP/2 (RFC 9113) requires all header field names to be lowercase. +# Using lowercase keys ensures compatibility across HTTP versions +# and Rack implementations. # # @example # # bad # headers['Content-Type'] = 'application/json' # response.headers['Location'] = '/redirect' +# response.set_header('X-Custom', 'value') +# response.headers['Content-Security-Policy'] += policy # # # good # headers['content-type'] = 'application/json' # response.headers['location'] = '/redirect' +# response.set_header('x-custom', 'value') +# response.headers['content-security-policy'] += policy # -# pkg:gem/rubocop-gusto#lib/rubocop/cop/rack/lowercase_header_keys.rb:19 +# pkg:gem/rubocop-gusto#lib/rubocop/cop/rack/lowercase_header_keys.rb:27 class RuboCop::Cop::Rack::LowercaseHeaderKeys < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # pkg:gem/rubocop-gusto#lib/rubocop/cop/rack/lowercase_header_keys.rb:61 + # pkg:gem/rubocop-gusto#lib/rubocop/cop/rack/lowercase_header_keys.rb:54 def on_csend(node); end - # pkg:gem/rubocop-gusto#lib/rubocop/cop/rack/lowercase_header_keys.rb:50 + # Handle compound assignment: headers['Key'] += val + # Ruby parses this as an op_asgn node, not a []= send + # + # pkg:gem/rubocop-gusto#lib/rubocop/cop/rack/lowercase_header_keys.rb:58 + def on_op_asgn(node); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/rack/lowercase_header_keys.rb:47 def on_send(node); end + # pkg:gem/rubocop-gusto#lib/rubocop/cop/rack/lowercase_header_keys.rb:34 + def response_header_method?(param0 = T.unsafe(nil)); end + private - # pkg:gem/rubocop-gusto#lib/rubocop/cop/rack/lowercase_header_keys.rb:103 + # pkg:gem/rubocop-gusto#lib/rubocop/cop/rack/lowercase_header_keys.rb:123 def add_offense_for_header(node, key_value); end - # Matches: - # headers['...'] = value (bare method call in controller) - # response.headers['...'] = value + # pkg:gem/rubocop-gusto#lib/rubocop/cop/rack/lowercase_header_keys.rb:73 + def check_bracket_access(node); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/rack/lowercase_header_keys.rb:83 + def check_header_method(node); end + + # pkg:gem/rubocop-gusto#lib/rubocop/cop/rack/lowercase_header_keys.rb:88 + def check_key(key_node); end + + # Matches headers receivers that are response-related: + # headers (bare method call in controller) + # response.headers + # self.headers # Does NOT match: # conn.headers, request.headers, client.headers, etc. # - # pkg:gem/rubocop-gusto#lib/rubocop/cop/rack/lowercase_header_keys.rb:77 - def headers_assignment?(node); end - - # pkg:gem/rubocop-gusto#lib/rubocop/cop/rack/lowercase_header_keys.rb:85 - def headers_method_receiver?(receiver); end - - # pkg:gem/rubocop-gusto#lib/rubocop/cop/rack/lowercase_header_keys.rb:65 - def uppercase_known_header?(key); end + # pkg:gem/rubocop-gusto#lib/rubocop/cop/rack/lowercase_header_keys.rb:102 + def response_headers_receiver?(receiver); end end -# Known HTTP headers (case-insensitive check) -# -# pkg:gem/rubocop-gusto#lib/rubocop/cop/rack/lowercase_header_keys.rb:26 -RuboCop::Cop::Rack::LowercaseHeaderKeys::KNOWN_HEADERS = T.let(T.unsafe(nil), Set) - -# pkg:gem/rubocop-gusto#lib/rubocop/cop/rack/lowercase_header_keys.rb:22 +# pkg:gem/rubocop-gusto#lib/rubocop/cop/rack/lowercase_header_keys.rb:30 RuboCop::Cop::Rack::LowercaseHeaderKeys::MSG = T.let(T.unsafe(nil), String) -# pkg:gem/rubocop-gusto#lib/rubocop/cop/rack/lowercase_header_keys.rb:23 +# pkg:gem/rubocop-gusto#lib/rubocop/cop/rack/lowercase_header_keys.rb:31 RuboCop::Cop::Rack::LowercaseHeaderKeys::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # RuboCop Gusto project namespace. @@ -1005,3 +1104,52 @@ end # pkg:gem/rubocop-gusto#lib/rubocop/gusto/version.rb:5 RuboCop::Gusto::VERSION = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-gusto#lib/rubocop/gusto/move_node_patch.rb:6 +module RuboCop::RSpec; end + +# pkg:gem/rubocop-gusto#lib/rubocop/gusto/move_node_patch.rb:7 +module RuboCop::RSpec::Corrector; end + +class RuboCop::RSpec::Corrector::MoveNode + include ::RuboCop::RSpec::Corrector::SigAwareMoveNode +end + +# Patches `MoveNode` to treat Sorbet `sig { ... }` blocks as part of the +# `let`/`subject`/hook they precede. +# +# Sorbet's RSpec mode attaches type signatures to memoized helpers via a +# `sig` block immediately above the declaration: +# +# sig { returns(Something) } +# let(:thing) { create(:something) } +# +# Several rubocop-rspec cops use `MoveNode` to relocate `let`/`subject`/ +# hook nodes (`ScatteredLet`, `LeadingSubject`, `LetBeforeExamples`, +# `HooksBeforeExamples`). Without this patch, the move strands the `sig` +# at the original location. This patch: +# +# 1. Extends the source range of the moved node to include a preceding +# `sig` block, so `sig` is carried with the move. +# 2. In `move_before`, redirects the insertion point above a preceding +# `sig` on the destination, so the destination's `sig` pairing stays +# intact. +# +# pkg:gem/rubocop-gusto#lib/rubocop/gusto/move_node_patch.rb:27 +module RuboCop::RSpec::Corrector::SigAwareMoveNode + extend ::RuboCop::AST::NodePattern::Macros + + # pkg:gem/rubocop-gusto#lib/rubocop/gusto/move_node_patch.rb:35 + def move_before(other); end + + # pkg:gem/rubocop-gusto#lib/rubocop/gusto/move_node_patch.rb:31 + def sig_block?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop-gusto#lib/rubocop/gusto/move_node_patch.rb:42 + def node_range(node); end + + # pkg:gem/rubocop-gusto#lib/rubocop/gusto/move_node_patch.rb:53 + def preceding_sig_block(node); end +end diff --git a/sorbet/rbi/gems/rubocop-sorbet@0.12.0-7b7d3cb5a41cee8207b3cd00c21f5ef43f7140fd.rbi b/sorbet/rbi/gems/rubocop-sorbet@0.12.0-7b7d3cb5a41cee8207b3cd00c21f5ef43f7140fd.rbi new file mode 100644 index 0000000..cd1e317 --- /dev/null +++ b/sorbet/rbi/gems/rubocop-sorbet@0.12.0-7b7d3cb5a41cee8207b3cd00c21f5ef43f7140fd.rbi @@ -0,0 +1,2558 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rubocop-sorbet` gem. +# Please instead update this file by running `bin/tapioca gem rubocop-sorbet`. + + +# pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/version.rb:3 +module RuboCop; end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb:4 +module RuboCop::Cop; end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb:5 +module RuboCop::Cop::Sorbet; end + +# Disallows using `.override(allow_incompatible: true)`. +# Using `allow_incompatible` suggests a violation of the Liskov +# Substitution Principle, meaning that a subclass is not a valid +# subtype of its superclass. This Cop prevents these design smells +# from occurring. +# +# @example +# +# # bad +# sig.override(allow_incompatible: true) +# +# # good +# sig.override +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:21 +class RuboCop::Cop::Sorbet::AllowIncompatibleOverride < ::RuboCop::Cop::Base + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:55 + def on_block(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:72 + def on_numblock(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:49 + def on_send(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:41 + def override?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:36 + def sig?(param0); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:27 + def sig_dot_override?(param0 = T.unsafe(nil)); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:22 +RuboCop::Cop::Sorbet::AllowIncompatibleOverride::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:24 +RuboCop::Cop::Sorbet::AllowIncompatibleOverride::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Disallows binding the return value of `T.any`, `T.all`, `T.enum` +# to a constant directly. To bind the value, one must use `T.type_alias`. +# +# @example +# +# # bad +# FooOrBar = T.any(Foo, Bar) +# +# # good +# FooOrBar = T.type_alias { T.any(Foo, Bar) } +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/binding_constant_without_type_alias.rb:18 +class RuboCop::Cop::Sorbet::BindingConstantWithoutTypeAlias < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/binding_constant_without_type_alias.rb:65 + def on_casgn(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/binding_constant_without_type_alias.rb:48 + def requires_type_alias?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/binding_constant_without_type_alias.rb:38 + def type_alias_with_block?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/binding_constant_without_type_alias.rb:29 + def type_alias_without_block(param0 = T.unsafe(nil)); end + + private + + # Given nested send nodes, returns the leaf with explicit receiver. + # + # i.e. in Ruby + # + # a.b.c.d.e.f + # ^^^ + # + # i.e. in AST + # + # (send (send (send (send (send (send nil :a) :b) :c) :d) :e) :f) + # ^^^^^^^^^^^^^^^^^^^^^^^ + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/binding_constant_without_type_alias.rb:98 + def send_leaf(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/binding_constant_without_type_alias.rb:21 +RuboCop::Cop::Sorbet::BindingConstantWithoutTypeAlias::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/binding_constant_without_type_alias.rb:23 +RuboCop::Cop::Sorbet::BindingConstantWithoutTypeAlias::WITHOUT_BLOCK_MSG = T.let(T.unsafe(nil), String) + +# Disallow defining methods in blocks, to prevent running into issues +# caused by https://github.com/sorbet/sorbet/issues/3609. +# +# As a workaround, use `define_method` instead. +# +# The one exception is for `Class.new` blocks, as long as the result is +# assigned to a constant (i.e. as long as it is not an anonymous class). +# Another exception is for ActiveSupport::Concern `class_methods` blocks. +# +# @example +# # bad +# yielding_method do +# def bad(args) +# # ... +# end +# end +# +# # bad +# Class.new do +# def bad(args) +# # ... +# end +# end +# +# # good +# yielding_method do +# define_method(:good) do |args| +# # ... +# end +# end +# +# # good +# MyClass = Class.new do +# def good(args) +# # ... +# end +# end +# +# # good +# module SomeConcern +# extend ActiveSupport::Concern +# +# class_methods do +# def good(args) +# # ... +# end +# end +# end +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:55 +class RuboCop::Cop::Sorbet::BlockMethodDefinition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:62 + def activesupport_concern_class_methods_block?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:71 + def module_extends_activesupport_concern?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:80 + def on_block(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:94 + def on_numblock(node); end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:186 + def adjust_for_closing_parenthesis(end_pos); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:106 + def autocorrect_method_in_block(corrector, node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:198 + def closing_parenthesis_follows(source); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:175 + def find_end_position_with_arguments(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:182 + def find_end_position_without_arguments(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:167 + def find_method_signature_end_position(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:143 + def handle_method_without_body(node, indent); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:161 + def handle_multiline_method_without_body(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:155 + def handle_single_line_method(node, indent); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:98 + def in_activesupport_concern_class_methods_block?(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:151 + def single_line_method?(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:132 + def transform_args_to_block_args(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:59 +RuboCop::Cop::Sorbet::BlockMethodDefinition::MSG = T.let(T.unsafe(nil), String) + +# Checks for the a mistaken variant of the "obsolete memoization pattern" that used to be required +# on every call, causing the memoized value to be discarded and recomputed on every call. +# +# This cop will correct it to read from the ivar instead of `nil`, which will memoize it correctly. +# +# The result of this correction will be the "obsolete memoization pattern", which can further be corrected by +# the `Sorbet/ObsoleteStrictMemoization` cop. +# +# See `Sorbet/ObsoleteStrictMemoization` for more details. +# +# @safety +# If the computation being memoized had side effects, calling it only once (instead of once on every call +# to the affected method) can be observed, and might be a breaking change. +# +# @example +# # bad +# sig { returns(Foo) } +# def foo +# # This `nil` is likely a mistake, causing the memoized value to be discarded and recomputed on every call. +# @foo = T.let(nil, T.nilable(Foo)) +# @foo ||= some_computation +# end +# +# # good +# sig { returns(Foo) } +# def foo +# # This will now memoize the value as was likely intended, so `some_computation` is only ever called once. +# # ⚠️If `some_computation` has side effects, this might be a breaking change! +# @foo = T.let(@foo, T.nilable(Foo)) +# @foo ||= some_computation +# end +# +# @see Sorbet/ObsoleteStrictMemoization +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/buggy_obsolete_strict_memoization.rb:42 +class RuboCop::Cop::Sorbet::BuggyObsoleteStrictMemoization < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::MatchRange + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::LineLengthHelp + include ::RuboCop::Cop::Sorbet::TargetSorbetVersion + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::Sorbet::TargetSorbetVersion::ClassMethods + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/buggy_obsolete_strict_memoization.rb:55 + def buggy_legacy_memoization_pattern?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/buggy_obsolete_strict_memoization.rb:66 + def on_begin(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/buggy_obsolete_strict_memoization.rb:77 + def relevant_file?(file); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/buggy_obsolete_strict_memoization.rb:51 +RuboCop::Cop::Sorbet::BuggyObsoleteStrictMemoization::MSG = T.let(T.unsafe(nil), String) + +# Ensures that callback conditionals are bound to the right type +# so that they are type checked properly. +# +# @safety +# Auto-correction is unsafe because other libraries define similar style callbacks as Rails, but don't always need +# binding to the attached class. Auto-correcting those usages can lead to false positives and auto-correction +# introduces new typing errors. +# +# @example +# +# # bad +# class Post < ApplicationRecord +# before_create :do_it, if: -> { should_do_it? } +# +# def should_do_it? +# true +# end +# end +# +# # good +# class Post < ApplicationRecord +# before_create :do_it, if: -> { +# T.bind(self, Post) +# should_do_it? +# } +# +# def should_do_it? +# true +# end +# end +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/callback_conditionals_binding.rb:36 +class RuboCop::Cop::Sorbet::CallbackConditionalsBinding < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/callback_conditionals_binding.rb:82 + def argumentless_unbound_callable_callback_conditional?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/callback_conditionals_binding.rb:92 + def on_send(node); end + + private + + # Find the immediately enclosing class or module name. + # Returns `nil`` if the immediate parent (skipping begin if present) is not a class or module. + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/callback_conditionals_binding.rb:129 + def immediately_enclosing_module_name(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/callback_conditionals_binding.rb:40 +RuboCop::Cop::Sorbet::CallbackConditionalsBinding::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/callback_conditionals_binding.rb:42 +RuboCop::Cop::Sorbet::CallbackConditionalsBinding::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Ensure type parameters used in generic methods are always capitalized. +# +# @example +# +# # bad +# sig { type_parameters(:x).params(a: T.type_parameter(:x)).void } +# def foo(a); end +# +# # good +# sig { type_parameters(:X).params(a: T.type_parameter(:X)).void } +# def foo(a: 1); end +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/capitalized_type_parameters.rb:17 +class RuboCop::Cop::Sorbet::CapitalizedTypeParameters < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Sorbet::SignatureHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/capitalized_type_parameters.rb:51 + def on_csend(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/capitalized_type_parameters.rb:47 + def on_send(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/capitalized_type_parameters.rb:35 + def on_signature(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/capitalized_type_parameters.rb:31 + def t_type_parameter?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/capitalized_type_parameters.rb:26 + def type_parameters?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/capitalized_type_parameters.rb:57 + def check_type_parameters_case(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/capitalized_type_parameters.rb:21 +RuboCop::Cop::Sorbet::CapitalizedTypeParameters::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/capitalized_type_parameters.rb:23 +RuboCop::Cop::Sorbet::CapitalizedTypeParameters::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Disallows the usage of `checked(true)`. This usage could cause +# confusion; it could lead some people to believe that a method would be checked +# even if runtime checks have not been enabled on the class or globally. +# Additionally, in the event where checks are enabled, `checked(true)` would +# be redundant; only `checked(false)` or `soft` would change the behaviour. +# +# @example +# +# # bad +# sig { void.checked(true) } +# +# # good +# sig { void } +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb:19 +class RuboCop::Cop::Sorbet::CheckedTrueInSignature < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Sorbet::SignatureHelp + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb:24 + def offending_node(param0); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb:35 + def on_signature(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb:28 +RuboCop::Cop::Sorbet::CheckedTrueInSignature::MESSAGE = T.let(T.unsafe(nil), String) + +# Disallows the calls that are used to get constants fom Strings +# such as +constantize+, +const_get+, and +constants+. +# +# The goal of this cop is to make the code easier to statically analyze, +# more IDE-friendly, and more predictable. It leads to code that clearly +# expresses which values the constant can have. +# +# @example +# +# # bad +# class_name.constantize +# +# # bad +# constants.detect { |c| c.name == "User" } +# +# # bad +# const_get(class_name) +# +# # good +# case class_name +# when "User" +# User +# else +# raise ArgumentError +# end +# +# # good +# { "User" => User }.fetch(class_name) +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/constants_from_strings.rb:36 +class RuboCop::Cop::Sorbet::ConstantsFromStrings < ::RuboCop::Cop::Base + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/constants_from_strings.rb:50 + def on_csend(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/constants_from_strings.rb:47 + def on_send(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/constants_from_strings.rb:37 +RuboCop::Cop::Sorbet::ConstantsFromStrings::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/constants_from_strings.rb:40 +RuboCop::Cop::Sorbet::ConstantsFromStrings::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for blank lines after signatures. +# +# @example +# # bad +# sig { void } +# +# def foo; end +# +# # good +# sig { void } +# def foo; end +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb:17 +class RuboCop::Cop::Sorbet::EmptyLineAfterSig < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Sorbet::SignatureHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb:33 + def on_signature(sig); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb:25 + def sig_or_signable_method_definition?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb:62 + def contains_only_rubocop_directives?(range); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb:66 + def lines_between(node1, node2, buffer: T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb:58 + def next_sibling(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb:22 +RuboCop::Cop::Sorbet::EmptyLineAfterSig::MSG = T.let(T.unsafe(nil), String) + +# Checks that the Sorbet sigil comes as the first magic comment in the file, after the encoding comment if any. +# +# The expected order for magic comments is: (en)?coding, typed, warn_indent then frozen_string_literal. +# +# The ordering is for consistency only, except for the encoding comment which must be first, if present. +# +# For example, the following bad ordering: +# +# ```ruby +# class Foo; end +# ``` +# +# Will be corrected as: +# +# ```ruby +# class Foo; end +# ``` +# +# Only `(en)?coding`, `typed`, `warn_indent` and `frozen_string_literal` magic comments are considered, +# other comments or magic comments are left in the same place. +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:32 +class RuboCop::Cop::Sorbet::EnforceSigilOrder < ::RuboCop::Cop::Sorbet::ValidSigil + include ::RuboCop::Cop::RangeHelp + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:35 + def on_new_investigation; end + + protected + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:93 + def autocorrect(corrector); end + + # checks + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:70 + def check_magic_comments_order(tokens); end + + # Get all the tokens in `processed_source` that match `MAGIC_REGEX` + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:62 + def extract_magic_comments(processed_source); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:46 +RuboCop::Cop::Sorbet::EnforceSigilOrder::CODING_REGEX = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:48 +RuboCop::Cop::Sorbet::EnforceSigilOrder::FROZEN_REGEX = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:47 +RuboCop::Cop::Sorbet::EnforceSigilOrder::INDENT_REGEX = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:57 +RuboCop::Cop::Sorbet::EnforceSigilOrder::MAGIC_REGEX = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:50 +RuboCop::Cop::Sorbet::EnforceSigilOrder::PREFERRED_ORDER = T.let(T.unsafe(nil), Hash) + +# Checks that every method definition and attribute accessor has a Sorbet signature. +# +# It also suggest an autocorrect with placeholders so the following code: +# +# ``` +# def foo(a, b, c); end +# ``` +# +# Will be corrected as: +# +# ``` +# sig { params(a: T.untyped, b: T.untyped, c: T.untyped).returns(T.untyped) +# def foo(a, b, c); end +# ``` +# +# You can configure the placeholders used by changing the following options: +# +# * `ParameterTypePlaceholder`: placeholders used for parameter types (default: 'T.untyped') +# * `ReturnTypePlaceholder`: placeholders used for return types (default: 'T.untyped') +# * `Style`: signature style to enforce - 'sig' for sig blocks, 'rbs' for RBS comments, 'both' to allow either (default: 'sig') +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:26 +class RuboCop::Cop::Sorbet::EnforceSignatures < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Sorbet::SignatureHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:33 + def accessor?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:37 + def on_def(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:41 + def on_defs(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:53 + def on_new_investigation; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:45 + def on_send(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:49 + def on_signature(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:59 + def scope(node); end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:154 + def add_accessor_parameter_if_needed(suggest, symbol, method); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:176 + def allow_rbs?; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:113 + def autocorrect_with_signature_type(corrector, node, type); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:68 + def check_node(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:119 + def create_signature_suggestion(node, type); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:168 + def param_type_placeholder; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:146 + def populate_accessor_suggestion(suggest, node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:136 + def populate_method_definition_suggestion(suggest, node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:128 + def populate_signature_suggestion(suggest, node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:109 + def rbs_checker; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:172 + def return_type_placeholder; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:160 + def set_void_return_for_writer(suggest, method); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:105 + def sig_checker; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:180 + def signature_style; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:164 + def writer_or_accessor?(method); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:209 +class RuboCop::Cop::Sorbet::EnforceSignatures::RBSSignatureChecker < ::RuboCop::Cop::Sorbet::EnforceSignatures::SignatureChecker + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:212 + def signature_node(node); end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:225 + def find_non_send_ancestor(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:210 +RuboCop::Cop::Sorbet::EnforceSignatures::RBSSignatureChecker::RBS_COMMENT_REGEX = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:285 +class RuboCop::Cop::Sorbet::EnforceSignatures::RBSSuggestion + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:288 + def initialize(indent); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:286 + def has_block; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:286 + def has_block=(_arg0); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:286 + def params; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:286 + def params=(_arg0); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:286 + def returns; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:286 + def returns=(_arg0); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:295 + def to_autocorrect; end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:301 + def generate_signature; end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:231 +class RuboCop::Cop::Sorbet::EnforceSignatures::SigSignatureChecker < ::RuboCop::Cop::Sorbet::EnforceSignatures::SignatureChecker + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:232 + def initialize(processed_source); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:245 + def clear_signature(scope); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:241 + def on_signature(node, scope); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:237 + def signature_node(scope); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:250 +class RuboCop::Cop::Sorbet::EnforceSignatures::SigSuggestion + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:253 + def initialize(indent, param_placeholder, return_placeholder); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:251 + def params; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:251 + def params=(_arg0); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:251 + def returns; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:251 + def returns=(_arg0); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:261 + def to_autocorrect; end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:267 + def generate_params; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:274 + def generate_return; end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:195 +class RuboCop::Cop::Sorbet::EnforceSignatures::SignatureChecker + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:196 + def initialize(processed_source); end + + protected + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:204 + def preceding_comments(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:202 + def processed_source; end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:30 +RuboCop::Cop::Sorbet::EnforceSignatures::VALID_STYLES = T.let(T.unsafe(nil), Array) + +# Checks that there is only one Sorbet sigil in a given file +# +# For example, the following class with two sigils +# +# ```ruby +# class Foo; end +# ``` +# +# Will be corrected as: +# +# ```ruby +# class Foo; end +# ``` +# +# Other comments or magic comments are left in place. +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb:26 +class RuboCop::Cop::Sorbet::EnforceSingleSigil < ::RuboCop::Cop::Sorbet::ValidSigil + include ::RuboCop::Cop::RangeHelp + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb:29 + def on_new_investigation; end + + protected + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb:50 + def autocorrect(corrector); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb:44 + def extract_all_sigils(processed_source); end +end + +# Makes the Sorbet `false` sigil mandatory in all files. +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/false_sigil.rb:10 +class RuboCop::Cop::Sorbet::FalseSigil < ::RuboCop::Cop::Sorbet::HasSigil + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/false_sigil.rb:11 + def minimum_strictness; end +end + +# Disallow including the `Comparable` module in `T::Enum`. +# +# @example +# +# # bad +# class Priority < T::Enum +# include Comparable +# +# enums do +# High = new(3) +# Medium = new(2) +# Low = new(1) +# end +# +# def <=>(other) +# serialize <=> other.serialize +# end +# end +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/t_enum/forbid_comparable_t_enum.rb:24 +class RuboCop::Cop::Sorbet::ForbidComparableTEnum < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Sorbet::TEnum + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/t_enum/forbid_comparable_t_enum.rb:32 + def mix_in_comparable?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/t_enum/forbid_comparable_t_enum.rb:36 + def on_send(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/t_enum/forbid_comparable_t_enum.rb:27 +RuboCop::Cop::Sorbet::ForbidComparableTEnum::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/t_enum/forbid_comparable_t_enum.rb:29 +RuboCop::Cop::Sorbet::ForbidComparableTEnum::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Ensures RBI shims do not include a call to extend T::Sig +# or to extend T::Helpers +# +# @example +# +# # bad +# module SomeModule +# extend T::Sig +# extend T::Helpers +# +# sig { returns(String) } +# def foo; end +# end +# +# # good +# module SomeModule +# sig { returns(String) } +# def foo; end +# end +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb:25 +class RuboCop::Cop::Sorbet::ForbidExtendTSigHelpersInShims < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb:33 + def extend_t_sig_or_helpers?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb:37 + def on_send(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb:29 +RuboCop::Cop::Sorbet::ForbidExtendTSigHelpersInShims::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb:30 +RuboCop::Cop::Sorbet::ForbidExtendTSigHelpersInShims::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Correct `send` expressions in include statements by constant literals. +# +# Sorbet, the static checker, is not (yet) able to support constructs on the +# following form: +# +# ```ruby +# class MyClass +# include send_expr +# end +# ``` +# +# Multiple occurences of this can be found in Shopify's code base like: +# +# ```ruby +# include Rails.application.routes.url_helpers +# ``` +# or +# ```ruby +# include Polaris::Engine.helpers +# ``` +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_include_const_literal.rb:29 +class RuboCop::Cop::Sorbet::ForbidIncludeConstLiteral < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_include_const_literal.rb:36 + def dynamic_inclusion?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_include_const_literal.rb:40 + def on_send(node); end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_include_const_literal.rb:52 + def neither_const_nor_self?(node); end + + # Returns true if the node is within a module declaration that is not anonymous. + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_include_const_literal.rb:57 + def within_onymous_module?(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_include_const_literal.rb:32 +RuboCop::Cop::Sorbet::ForbidIncludeConstLiteral::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_include_const_literal.rb:33 +RuboCop::Cop::Sorbet::ForbidIncludeConstLiteral::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Check that code does not call `mixes_in_class_methods` from Sorbet `T::Helpers`. +# +# Good: +# +# ``` +# module M +# extend ActiveSupport::Concern +# +# class_methods do +# ... +# end +# end +# ``` +# +# Bad: +# +# ``` +# module M +# extend T::Helpers +# +# module ClassMethods +# ... +# end +# +# mixes_in_class_methods(ClassMethods) +# end +# ``` +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_mixes_in_class_methods.rb:33 +class RuboCop::Cop::Sorbet::ForbidMixesInClassMethods < ::RuboCop::Cop::Base + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_mixes_in_class_methods.rb:38 + def mixes_in_class_methods?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_mixes_in_class_methods.rb:45 + def on_csend(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_mixes_in_class_methods.rb:42 + def on_send(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_mixes_in_class_methods.rb:34 +RuboCop::Cop::Sorbet::ForbidMixesInClassMethods::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_mixes_in_class_methods.rb:35 +RuboCop::Cop::Sorbet::ForbidMixesInClassMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Makes sure that RBI files are always located under the defined allowed paths. +# +# Options: +# +# * `AllowedPaths`: A list of the paths where RBI files are allowed (default: ["rbi/**", "sorbet/rbi/**"]) +# +# @example +# # bad +# # lib/some_file.rbi +# # other_file.rbi +# +# # good +# # rbi/external_interface.rbi +# # sorbet/rbi/some_file.rbi +# # sorbet/rbi/any/path/for/file.rbi +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_allowed_paths.rb:23 +class RuboCop::Cop::Sorbet::ForbidRBIOutsideOfAllowedPaths < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_allowed_paths.rb:26 + def on_new_investigation; end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_allowed_paths.rb:48 + def allowed_paths; end +end + +# Check that definitions do not use a `sig` block. +# +# Good: +# +# ``` +# #: -> void +# def foo; end +# ``` +# +# Bad: +# +# ``` +# sig { void } +# def foo; end +# ``` +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/forbid_sig.rb:23 +class RuboCop::Cop::Sorbet::ForbidSig < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Sorbet::SignatureHelp + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/forbid_sig.rb:28 + def on_signature(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/forbid_sig.rb:26 +RuboCop::Cop::Sorbet::ForbidSig::MSG = T.let(T.unsafe(nil), String) + +# Check that definitions do not use a `sig` block. +# +# Good: +# +# ``` +# #: -> void +# def foo; end +# ``` +# +# Bad: +# +# ``` +# T::Sig.sig { void } +# def foo; end +# ``` +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/forbid_sig_with_runtime.rb:23 +class RuboCop::Cop::Sorbet::ForbidSigWithRuntime < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Sorbet::SignatureHelp + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/forbid_sig_with_runtime.rb:28 + def on_signature(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/forbid_sig_with_runtime.rb:26 +RuboCop::Cop::Sorbet::ForbidSigWithRuntime::MSG = T.let(T.unsafe(nil), String) + +# Check that `sig` is used instead of `T::Sig::WithoutRuntime.sig`. +# +# Good: +# +# ``` +# sig { void } +# def foo; end +# ``` +# +# Bad: +# +# ``` +# T::Sig::WithoutRuntime.sig { void } +# def foo; end +# ``` +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/forbid_sig_without_runtime.rb:23 +class RuboCop::Cop::Sorbet::ForbidSigWithoutRuntime < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Sorbet::SignatureHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/forbid_sig_without_runtime.rb:29 + def on_signature(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/forbid_sig_without_runtime.rb:27 +RuboCop::Cop::Sorbet::ForbidSigWithoutRuntime::MSG = T.let(T.unsafe(nil), String) + +# Correct superclass `send` expressions by constant literals. +# +# Sorbet, the static checker, is not (yet) able to support constructs on the +# following form: +# +# ```ruby +# class Foo < send_expr; end +# ``` +# +# Multiple occurences of this can be found in Shopify's code base like: +# +# ```ruby +# class ShopScope < Component::TrustedIdScope[ShopIdentity::ShopId] +# ``` +# or +# ```ruby +# class ApiClientEligibility < Struct.new(:api_client, :match_results, :shop) +# ``` +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb:28 +class RuboCop::Cop::Sorbet::ForbidSuperclassConstLiteral < ::RuboCop::Cop::Base + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb:32 + def dynamic_superclass?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb:36 + def on_class(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb:29 +RuboCop::Cop::Sorbet::ForbidSuperclassConstLiteral::MSG = T.let(T.unsafe(nil), String) + +# Disallows using `T.absurd` anywhere. +# +# @example +# +# # bad +# T.absurd(foo) +# +# # good +# x #: absurd +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_absurd.rb:17 +class RuboCop::Cop::Sorbet::ForbidTAbsurd < ::RuboCop::Cop::Base + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_absurd.rb:27 + def on_csend(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_absurd.rb:24 + def on_send(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_absurd.rb:22 + def t_absurd?(param0 = T.unsafe(nil)); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_absurd.rb:18 +RuboCop::Cop::Sorbet::ForbidTAbsurd::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_absurd.rb:19 +RuboCop::Cop::Sorbet::ForbidTAbsurd::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Detect and autocorrect `T.any(..., NilClass, ...)` to `T.nilable(...)` +# +# @example +# +# # bad +# T.any(String, NilClass) +# T.any(NilClass, String) +# T.any(NilClass, Symbol, String) +# +# # good +# T.nilable(String) +# T.nilable(String) +# T.nilable(T.any(Symbol, String)) +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_any_with_nil.rb:19 +class RuboCop::Cop::Sorbet::ForbidTAnyWithNil < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_any_with_nil.rb:31 + def nil_const_node?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_any_with_nil.rb:48 + def on_csend(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_any_with_nil.rb:35 + def on_send(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_any_with_nil.rb:26 + def t_any_call?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_any_with_nil.rb:52 + def build_replacement(non_nil_args); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_any_with_nil.rb:22 +RuboCop::Cop::Sorbet::ForbidTAnyWithNil::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_any_with_nil.rb:23 +RuboCop::Cop::Sorbet::ForbidTAnyWithNil::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Disallows using `T.bind` anywhere. +# +# @example +# +# # bad +# T.bind(self, Integer) +# +# # good +# #: self as Integer +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_bind.rb:17 +class RuboCop::Cop::Sorbet::ForbidTBind < ::RuboCop::Cop::Base + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_bind.rb:27 + def on_csend(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_bind.rb:24 + def on_send(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_bind.rb:22 + def t_bind?(param0 = T.unsafe(nil)); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_bind.rb:18 +RuboCop::Cop::Sorbet::ForbidTBind::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_bind.rb:19 +RuboCop::Cop::Sorbet::ForbidTBind::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Disallows using `T.cast` anywhere. +# +# @example +# +# # bad +# T.cast(foo, Integer) +# +# # good +# foo #: as Integer +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_cast.rb:17 +class RuboCop::Cop::Sorbet::ForbidTCast < ::RuboCop::Cop::Base + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_cast.rb:27 + def on_csend(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_cast.rb:24 + def on_send(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_cast.rb:22 + def t_cast?(param0 = T.unsafe(nil)); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_cast.rb:18 +RuboCop::Cop::Sorbet::ForbidTCast::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_cast.rb:19 +RuboCop::Cop::Sorbet::ForbidTCast::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Disallow using `T::Enum`. +# +# @example +# +# # bad +# class MyEnum < T::Enum +# enums do +# A = new +# B = new +# end +# end +# +# # good +# class MyEnum +# A = "a" +# B = "b" +# C = "c" +# end +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_enum.rb:26 +class RuboCop::Cop::Sorbet::ForbidTEnum < ::RuboCop::Cop::Base + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_enum.rb:34 + def on_class(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_enum.rb:30 + def t_enum?(param0 = T.unsafe(nil)); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_enum.rb:27 +RuboCop::Cop::Sorbet::ForbidTEnum::MSG = T.let(T.unsafe(nil), String) + +# Forbids `extend T::Helpers` and `include T::Helpers` in classes and modules. +# +# This is useful when using RBS or RBS-inline syntax for type signatures, +# where `T::Helpers` is not needed and including it is redundant. +# +# @example +# +# # bad +# class Example +# extend T::Helpers +# end +# +# # bad +# module Example +# include T::Helpers +# end +# +# # good +# class Example +# end +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_helpers.rb:26 +class RuboCop::Cop::Sorbet::ForbidTHelpers < ::RuboCop::Cop::Base + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_helpers.rb:40 + def on_csend(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_helpers.rb:35 + def on_send(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_helpers.rb:31 + def t_helpers?(param0 = T.unsafe(nil)); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_helpers.rb:27 +RuboCop::Cop::Sorbet::ForbidTHelpers::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_helpers.rb:28 +RuboCop::Cop::Sorbet::ForbidTHelpers::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Disallows using `T.let` anywhere. +# +# @example +# +# # bad +# T.let(foo, Integer) +# +# # good +# foo #: Integer +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_let.rb:17 +class RuboCop::Cop::Sorbet::ForbidTLet < ::RuboCop::Cop::Base + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_let.rb:27 + def on_csend(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_let.rb:24 + def on_send(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_let.rb:22 + def t_let?(param0 = T.unsafe(nil)); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_let.rb:18 +RuboCop::Cop::Sorbet::ForbidTLet::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_let.rb:19 +RuboCop::Cop::Sorbet::ForbidTLet::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Disallows using `T.must` anywhere. +# +# @example +# +# # bad +# T.must(foo) +# +# # good +# foo #: as !nil +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_must.rb:17 +class RuboCop::Cop::Sorbet::ForbidTMust < ::RuboCop::Cop::Base + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_must.rb:27 + def on_csend(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_must.rb:24 + def on_send(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_must.rb:22 + def t_must?(param0 = T.unsafe(nil)); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_must.rb:18 +RuboCop::Cop::Sorbet::ForbidTMust::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_must.rb:19 +RuboCop::Cop::Sorbet::ForbidTMust::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Forbids `extend T::Sig` and `include T::Sig` in classes and modules. +# +# This is useful when using RBS or RBS-inline syntax for type signatures, +# where `T::Sig` is not needed and including it is redundant. +# +# @example +# +# # bad +# class Example +# extend T::Sig +# end +# +# # bad +# module Example +# include T::Sig +# end +# +# # good +# class Example +# end +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_sig.rb:26 +class RuboCop::Cop::Sorbet::ForbidTSig < ::RuboCop::Cop::Base + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_sig.rb:40 + def on_csend(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_sig.rb:35 + def on_send(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_sig.rb:31 + def t_sig?(param0 = T.unsafe(nil)); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_sig.rb:27 +RuboCop::Cop::Sorbet::ForbidTSig::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_sig.rb:28 +RuboCop::Cop::Sorbet::ForbidTSig::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Disallow using `T::Struct` and `T::Props`. +# +# @example +# +# # bad +# class MyStruct < T::Struct +# const :foo, String +# prop :bar, Integer, default: 0 +# +# def some_method; end +# end +# +# # good +# class MyStruct +# extend T::Sig +# +# sig { returns(String) } +# attr_reader :foo +# +# sig { returns(Integer) } +# attr_accessor :bar +# +# sig { params(foo: String, bar: Integer) } +# def initialize(foo:, bar: 0) +# @foo = foo +# @bar = bar +# end +# +# def some_method; end +# end +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:38 +class RuboCop::Cop::Sorbet::ForbidTStruct < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::CommentsHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:169 + def on_class(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:210 + def on_send(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:167 + def t_props?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:162 + def t_struct?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:218 + def initialize_method(indent, props); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:258 + def previous_line_blank?(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:47 +RuboCop::Cop::Sorbet::ForbidTStruct::MSG_PROPS = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:46 +RuboCop::Cop::Sorbet::ForbidTStruct::MSG_STRUCT = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:104 +class RuboCop::Cop::Sorbet::ForbidTStruct::Property + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:107 + def initialize(node, kind, name, type, default:, factory:); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:123 + def attr_accessor; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:119 + def attr_sig; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:105 + def default; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:105 + def factory; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:144 + def initialize_assign; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:131 + def initialize_param; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:127 + def initialize_sig_param; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:105 + def kind; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:105 + def name; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:151 + def nilable?; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:105 + def node; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:155 + def type; end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:44 +RuboCop::Cop::Sorbet::ForbidTStruct::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# This class walks down the class body of a T::Struct and collects all the properties that will need to be +# translated into `attr_reader` and `attr_accessor` methods. +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:51 +class RuboCop::Cop::Sorbet::ForbidTStruct::TStructWalker + include ::RuboCop::AST::Traversal + extend ::RuboCop::AST::NodePattern::Macros + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:57 + def initialize; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:63 + def extend_t_sig?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:55 + def has_extend_t_sig; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:72 + def on_send(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:55 + def props; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:68 + def t_struct_prop?(param0 = T.unsafe(nil)); end +end + +# Disallows using `T.type_alias` anywhere. +# +# @example +# +# # bad +# STRING_OR_INTEGER = T.type_alias { T.any(Integer, String) } +# +# # good +# #: type string_or_integer = Integer | String +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_type_alias.rb:17 +class RuboCop::Cop::Sorbet::ForbidTTypeAlias < ::RuboCop::Cop::Base + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_type_alias.rb:23 + def on_block(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_type_alias.rb:26 + def on_numblock(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_type_alias.rb:21 + def t_type_alias?(param0 = T.unsafe(nil)); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_type_alias.rb:18 +RuboCop::Cop::Sorbet::ForbidTTypeAlias::MSG = T.let(T.unsafe(nil), String) + +# Disallows using `T.unsafe` anywhere. +# +# @example +# +# # bad +# T.unsafe(foo) +# +# # good +# foo +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_unsafe.rb:17 +class RuboCop::Cop::Sorbet::ForbidTUnsafe < ::RuboCop::Cop::Base + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_unsafe.rb:27 + def on_csend(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_unsafe.rb:24 + def on_send(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_unsafe.rb:22 + def t_unsafe?(param0 = T.unsafe(nil)); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_unsafe.rb:18 +RuboCop::Cop::Sorbet::ForbidTUnsafe::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_unsafe.rb:19 +RuboCop::Cop::Sorbet::ForbidTUnsafe::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Disallows using `T.untyped` anywhere. +# +# @example +# +# # bad +# sig { params(my_argument: T.untyped).void } +# def foo(my_argument); end +# +# # good +# sig { params(my_argument: String).void } +# def foo(my_argument); end +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_untyped.rb:20 +class RuboCop::Cop::Sorbet::ForbidTUntyped < ::RuboCop::Cop::Base + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_untyped.rb:27 + def on_send(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_untyped.rb:25 + def t_untyped?(param0 = T.unsafe(nil)); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_untyped.rb:21 +RuboCop::Cop::Sorbet::ForbidTUntyped::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_untyped.rb:22 +RuboCop::Cop::Sorbet::ForbidTUntyped::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Disallows defining type aliases that contain shapes +# +# @example +# +# # bad +# Foo = T.type_alias { { foo: Integer } } +# +# # good +# class Foo +# extend T::Sig +# +# sig { params(foo: Integer).void } +# def initialize(foo) +# @foo = foo +# end +# end +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_type_aliased_shapes.rb:24 +class RuboCop::Cop::Sorbet::ForbidTypeAliasedShapes < ::RuboCop::Cop::Base + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_type_aliased_shapes.rb:36 + def on_block(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_type_aliased_shapes.rb:40 + def on_numblock(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_type_aliased_shapes.rb:28 + def shape_type_alias?(param0 = T.unsafe(nil)); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_type_aliased_shapes.rb:25 +RuboCop::Cop::Sorbet::ForbidTypeAliasedShapes::MSG = T.let(T.unsafe(nil), String) + +# Disallows use of `T.untyped` or `T.nilable(T.untyped)` +# as a prop type for `T::Struct` or `T::ImmutableStruct`. +# +# @example +# +# # bad +# class SomeClass < T::Struct +# const :foo, T.untyped +# prop :bar, T.nilable(T.untyped) +# end +# +# # good +# class SomeClass < T::Struct +# const :foo, Integer +# prop :bar, T.nilable(String) +# end +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb:25 +class RuboCop::Cop::Sorbet::ForbidUntypedStructProps < ::RuboCop::Cop::Base + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb:54 + def on_class(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb:44 + def subclass_of_t_struct?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb:39 + def t_nilable_untyped(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb:29 + def t_struct(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb:34 + def t_untyped(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb:50 + def untyped_props(param0); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb:26 +RuboCop::Cop::Sorbet::ForbidUntypedStructProps::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi_versioning/gem_version_annotation_helper.rb:6 +module RuboCop::Cop::Sorbet::GemVersionAnnotationHelper + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi_versioning/gem_version_annotation_helper.rb:9 + def gem_version_annotations; end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi_versioning/gem_version_annotation_helper.rb:17 + def gem_version_annotation?(comment); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi_versioning/gem_version_annotation_helper.rb:21 + def gem_versions(comment); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi_versioning/gem_version_annotation_helper.rb:7 +RuboCop::Cop::Sorbet::GemVersionAnnotationHelper::VERSION_PREFIX = T.let(T.unsafe(nil), String) + +# Makes the Sorbet typed sigil mandatory in all files. +# +# Options: +# +# * `SuggestedStrictness`: Sorbet strictness level suggested in offense messages (default: 'false') +# * `MinimumStrictness`: If set, make offense if the strictness level in the file is below this one +# +# If a `SuggestedStrictness` level is specified, it will be used in autocorrect. +# If a `MinimumStrictness` level is specified, it will be used in offense messages and autocorrect. +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/has_sigil.rb:18 +class RuboCop::Cop::Sorbet::HasSigil < ::RuboCop::Cop::Sorbet::ValidSigil + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/has_sigil.rb:19 + def require_sigil_on_all_files?; end +end + +# Makes the Sorbet `ignore` sigil mandatory in all files. +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/ignore_sigil.rb:10 +class RuboCop::Cop::Sorbet::IgnoreSigil < ::RuboCop::Cop::Sorbet::HasSigil + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/ignore_sigil.rb:11 + def minimum_strictness; end +end + +# Disallows declaring implicit conversion methods. +# Since Sorbet is a nominal (not structural) type system, +# implicit conversion is currently unsupported. +# +# @example +# +# # bad +# def to_str; end +# +# # good +# def to_str(x); end +# +# # bad +# def self.to_str; end +# +# # good +# def self.to_str(x); end +# +# # bad +# alias to_str to_s +# +# @see https://docs.ruby-lang.org/en/master/implicit_conversion_rdoc.html +# @note Since the arity of aliased methods is not checked, false positives may result. +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/implicit_conversion_method.rb:31 +class RuboCop::Cop::Sorbet::ImplicitConversionMethod < ::RuboCop::Cop::Base + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/implicit_conversion_method.rb:37 + def on_alias(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/implicit_conversion_method.rb:42 + def on_def(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/implicit_conversion_method.rb:48 + def on_defs(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/implicit_conversion_method.rb:50 + def on_send(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/implicit_conversion_method.rb:32 +RuboCop::Cop::Sorbet::ImplicitConversionMethod::IMPLICIT_CONVERSION_METHODS = T.let(T.unsafe(nil), Array) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/implicit_conversion_method.rb:33 +RuboCop::Cop::Sorbet::ImplicitConversionMethod::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/implicit_conversion_method.rb:35 +RuboCop::Cop::Sorbet::ImplicitConversionMethod::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the ordering of keyword arguments required by +# sorbet-runtime. The ordering requires that all keyword arguments +# are at the end of the parameters list, and all keyword arguments +# with a default value must be after those without default values. +# +# @example +# +# # bad +# sig { params(a: Integer, b: String).void } +# def foo(a: 1, b:); end +# +# # good +# sig { params(b: String, a: Integer).void } +# def foo(b:, a: 1); end +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb:20 +class RuboCop::Cop::Sorbet::KeywordArgumentOrdering < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Sorbet::SignatureHelp + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb:23 + def on_signature(node); end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb:34 + def check_order_for_kwoptargs(parameters); end +end + +# Disallow creating a `T::Enum` with less than two values. +# +# @example +# +# # bad +# class ErrorMessages < T::Enum +# enums do +# ServerError = new("There was a server error.") +# end +# end +# +# # good +# class ErrorMessages < T::Enum +# enums do +# ServerError = new("There was a server error.") +# NotFound = new("The resource was not found.") +# end +# end +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/t_enum/multiple_t_enum_values.rb:24 +class RuboCop::Cop::Sorbet::MultipleTEnumValues < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Sorbet::TEnum + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/t_enum/multiple_t_enum_values.rb:30 + def enums_block?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/t_enum/multiple_t_enum_values.rb:40 + def on_block(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/t_enum/multiple_t_enum_values.rb:34 + def on_class(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/t_enum/multiple_t_enum_values.rb:27 +RuboCop::Cop::Sorbet::MultipleTEnumValues::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb:8 +module RuboCop::Cop::Sorbet::MutableConstantSorbetAwareBehaviour + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb:18 + def on_assignment(value); end + + class << self + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb:10 + def prepended(base); end + end +end + +# Checks for the obsolete pattern for initializing instance variables that was required for older Sorbet +# +# It's no longer required, as of Sorbet 0.5.10210 +# See https://sorbet.org/docs/type-assertions#put-type-assertions-behind-memoization +# +# @example +# +# # bad +# sig { returns(Foo) } +# def foo +# @foo = T.let(@foo, T.nilable(Foo)) +# @foo ||= Foo.new +# end +# +# # bad +# sig { returns(Foo) } +# def foo +# # This would have been a mistake, causing the memoized value to be discarded and recomputed on every call. +# @foo = T.let(nil, T.nilable(Foo)) +# @foo ||= Foo.new +# end +# +# # good +# sig { returns(Foo) } +# def foo +# @foo ||= T.let(Foo.new, T.nilable(Foo)) +# end +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/obsolete_strict_memoization.rb:37 +class RuboCop::Cop::Sorbet::ObsoleteStrictMemoization < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::MatchRange + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::LineLengthHelp + include ::RuboCop::Cop::Sorbet::TargetSorbetVersion + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::Sorbet::TargetSorbetVersion::ClassMethods + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/obsolete_strict_memoization.rb:51 + def legacy_memoization_pattern?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/obsolete_strict_memoization.rb:62 + def on_begin(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/obsolete_strict_memoization.rb:86 + def relevant_file?(file); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/obsolete_strict_memoization.rb:47 +RuboCop::Cop::Sorbet::ObsoleteStrictMemoization::MSG = T.let(T.unsafe(nil), String) + +# Forbids the use of redundant `extend T::Sig`. Only for use in +# applications that monkey patch `Module.include(T::Sig)` globally, +# which would make it redundant. +# +# @safety +# This cop should not be enabled in applications that have not monkey +# patched `Module`. +# +# @example +# # bad +# class Example +# extend T::Sig +# sig { void } +# def no_op; end +# end +# +# # good +# class Example +# sig { void } +# def no_op; end +# end +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb:28 +class RuboCop::Cop::Sorbet::RedundantExtendTSig < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb:36 + def extend_t_sig?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb:40 + def on_send(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb:32 +RuboCop::Cop::Sorbet::RedundantExtendTSig::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb:33 +RuboCop::Cop::Sorbet::RedundantExtendTSig::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Prevents unnecessary `T.let` in `initialize` methods. When a signature parameter is assigned to an instance variable, the type is inferred automatically. +# +# @example +# +# # bad +# sig { params(a: Integer) } +# def initialize(a) +# @a = T.let(a, Integer) +# end +# +# # good +# sig { params(a: Integer) } +# def initialize(a) +# @a = a +# end +# +# # good +# sig { params(a: Integer) } +# def initialize(a) +# @a = T.let(a, T.any(Integer, String)) +# end +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let.rb:27 +class RuboCop::Cop::Sorbet::RedundantTLet < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Sorbet::SignatureHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let.rb:39 + def on_def(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let.rb:37 + def sig_params(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let.rb:34 + def t_let(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let.rb:103 + def expected_type(sig_type, arg_kind); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let.rb:88 + def find_redundant_t_let(node, tlet_key, tlet_value, sig_params, method_args); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let.rb:60 + def find_sig_node(method_node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let.rb:80 + def ivar_assignments(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let.rb:69 + def normalize_whitespace(source); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let.rb:31 +RuboCop::Cop::Sorbet::RedundantTLet::MSG = T.let(T.unsafe(nil), String) + +# Checks for redundant `T.let` declarations where the first argument +# is a simple literal (not a collection like Array or Hash) and the +# second argument is the matching class name. Sorbet can infer the types +# of simple literals automatically, so wrapping them in `T.let` is +# redundant. +# +# @example +# # bad +# MAX_RETRIES = T.let(3, Integer) +# GREETING = T.let("hello", String) +# RATE = T.let(1.5, Float) +# PATTERN = T.let(/foo/, Regexp) +# STATUS = T.let(:active, Symbol) +# +# # good +# MAX_RETRIES = 3 +# GREETING = "hello" +# RATE = 1.5 +# PATTERN = /foo/ +# STATUS = :active +# +# # good — collections still need T.let +# NAMES = T.let(["alice", "bob"], T::Array[String]) +# OPTIONS = T.let({ verbose: true }, T::Hash[Symbol, T::Boolean]) +# +# # good — type is not the literal's own class +# value = T.let("hello", T.nilable(String)) +# +# # good — instance variables need T.let for Sorbet to track their type +# @max_retries = T.let(3, Integer) +# +# # good — local variables may need T.let so Sorbet allows reassignment +# count = T.let(0, Integer) +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let_for_literal.rb:41 +class RuboCop::Cop::Sorbet::RedundantTLetForLiteral < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let_for_literal.rb:61 + def on_casgn(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let_for_literal.rb:47 + def t_let_with_literal_and_class?(param0 = T.unsafe(nil)); end +end + +# Maps AST literal node types to the class name Sorbet would infer. +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let_for_literal.rb:52 +RuboCop::Cop::Sorbet::RedundantTLetForLiteral::LITERAL_TYPE_TO_CLASS = T.let(T.unsafe(nil), Hash) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let_for_literal.rb:44 +RuboCop::Cop::Sorbet::RedundantTLetForLiteral::MSG = T.let(T.unsafe(nil), String) + +# Checks for the use of Ruby Refinements library. Refinements add +# complexity and incur a performance penalty that can be significant +# for large code bases. Good examples are cases of unrelated +# methods that happen to have the same name as these module methods. +# +# @example +# # bad +# module Foo +# refine(Date) do +# end +# end +# +# # bad +# module Foo +# using(Date) do +# end +# end +# +# # good +# module Foo +# bar.refine(Date) +# end +# +# # good +# module Foo +# bar.using(Date) +# end +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/refinement.rb:34 +class RuboCop::Cop::Sorbet::Refinement < ::RuboCop::Cop::Base + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/refinement.rb:38 + def on_send(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/refinement.rb:35 +RuboCop::Cop::Sorbet::Refinement::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/refinement.rb:36 +RuboCop::Cop::Sorbet::Refinement::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks that `on_failure` is not used without `checked(:tests)` or `checked(:always)`. +# +# @example +# +# # bad +# sig { params(x: Integer).returns(Integer).on_failure(:raise) } +# def plus_one(x) +# x + 1 +# end +# +# # good +# sig { params(x: Integer).returns(Integer).checked(:always).on_failure(:raise) } +# def plus_one(x) +# x + 1 +# end +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/runtime_on_failure_depends_on_checked.rb:22 +class RuboCop::Cop::Sorbet::RuntimeOnFailureDependsOnChecked < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Sorbet::SignatureHelp + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/runtime_on_failure_depends_on_checked.rb:33 + def checked_tests_or_always?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/runtime_on_failure_depends_on_checked.rb:28 + def on_failure_call?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/runtime_on_failure_depends_on_checked.rb:37 + def on_signature(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/runtime_on_failure_depends_on_checked.rb:25 +RuboCop::Cop::Sorbet::RuntimeOnFailureDependsOnChecked::MSG = T.let(T.unsafe(nil), String) + +# Suggests using `grep` over `select` when using it only for type narrowing. +# +# @example +# +# # bad +# strings_or_integers.select { |e| e.is_a?(String) } +# strings_or_integers.filter { |e| e.is_a?(String) } +# strings_or_integers.select { |e| e.kind_of?(String) } +# +# # good +# strings_or_integers.grep(String) +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/select_by_is_a.rb:19 +class RuboCop::Cop::Sorbet::SelectByIsA < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/select_by_is_a.rb:58 + def on_csend(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/select_by_is_a.rb:43 + def on_send(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/select_by_is_a.rb:26 + def type_narrowing_select?(param0 = T.unsafe(nil)); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/select_by_is_a.rb:22 +RuboCop::Cop::Sorbet::SelectByIsA::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/select_by_is_a.rb:23 +RuboCop::Cop::Sorbet::SelectByIsA::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the correct order of `sig` builder methods. +# +# Options: +# +# * `Order`: The order in which to enforce the builder methods are called. +# +# @example +# # bad +# sig { void.abstract } +# +# # good +# sig { abstract.void } +# +# # bad +# sig { returns(Integer).params(x: Integer) } +# +# # good +# sig { params(x: Integer).returns(Integer) } +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/signature_build_order.rb:24 +class RuboCop::Cop::Sorbet::SignatureBuildOrder < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Sorbet::SignatureHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/signature_build_order.rb:33 + def on_signature(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/signature_build_order.rb:29 + def root_call(param0); end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/signature_build_order.rb:96 + def builder_method_indexes; end + + # Split foo.bar.baz into [foo, foo.bar, foo.bar.baz] + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/signature_build_order.rb:83 + def call_chain(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/signature_build_order.rb:70 + def expected_source(expected_calls_and_indexes); end +end + +# Mixin for writing cops for signatures, providing a `signature?` node matcher and an `on_signature` trigger. +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/signature_help.rb:7 +module RuboCop::Cop::Sorbet::SignatureHelp + extend ::RuboCop::AST::NodePattern::Macros + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/signature_help.rb:16 + def bare_sig?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/signature_help.rb:42 + def on_block(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/signature_help.rb:46 + def on_numblock(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/signature_help.rb:48 + def on_signature(_node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/signature_help.rb:25 + def sig_with_runtime?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/signature_help.rb:34 + def sig_without_runtime?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/signature_help.rb:11 + def signature?(param0 = T.unsafe(nil)); end +end + +# Ensures empty class/module definitions in RBI files are +# done on a single line rather than being split across multiple lines. +# +# @example +# +# # bad +# module SomeModule +# end +# +# # good +# module SomeModule; end +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb:17 +class RuboCop::Cop::Sorbet::SingleLineRbiClassModuleDefinitions < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb:30 + def on_class(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb:22 + def on_module(node); end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb:34 + def convert_newlines_to_semicolons(source); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb:20 +RuboCop::Cop::Sorbet::SingleLineRbiClassModuleDefinitions::MSG = T.let(T.unsafe(nil), String) + +# Makes the Sorbet `strict` sigil mandatory in all files. +# +# @safety +# This cop is unsafe because Sorbet sigils may not exist yet when it is run. +# +# @example +# +# # bad +# +# # bad +# +# # good +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/strict_sigil.rb:25 +class RuboCop::Cop::Sorbet::StrictSigil < ::RuboCop::Cop::Sorbet::HasSigil + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/strict_sigil.rb:26 + def minimum_strictness; end +end + +# Makes the Sorbet `strong` sigil mandatory in all files. +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/strong_sigil.rb:10 +class RuboCop::Cop::Sorbet::StrongSigil < ::RuboCop::Cop::Sorbet::HasSigil + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/strong_sigil.rb:11 + def minimum_strictness; end +end + +# Mixing for writing cops that deal with `T::Enum`s +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/t_enum.rb:7 +module RuboCop::Cop::Sorbet::TEnum + extend ::RuboCop::AST::NodePattern::Macros + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/t_enum.rb:9 + def initialize(*_arg0); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/t_enum.rb:23 + def after_class(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/t_enum.rb:19 + def on_class(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/t_enum.rb:15 + def t_enum?(param0 = T.unsafe(nil)); end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/t_enum.rb:29 + def in_t_enum_class?; end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb:6 +module RuboCop::Cop::Sorbet::TargetSorbetVersion + mixes_in_class_methods ::RuboCop::Cop::Sorbet::TargetSorbetVersion::ClassMethods + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb:28 + def enabled_for_sorbet_static_version?; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb:44 + def read_sorbet_static_version_from_bundler_lock_file; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb:24 + def sorbet_enabled?; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb:35 + def target_sorbet_static_version_from_bundler_lock_file; end + + class << self + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb:8 + def included(target); end + end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb:13 +module RuboCop::Cop::Sorbet::TargetSorbetVersion::ClassMethods + # Sets the version of the Sorbet static type checker required by this cop + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb:15 + def minimum_target_sorbet_static_version(version); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb:19 + def supports_target_sorbet_static_version?(version); end +end + +# Makes the Sorbet `true` sigil mandatory in all files. +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/true_sigil.rb:10 +class RuboCop::Cop::Sorbet::TrueSigil < ::RuboCop::Cop::Sorbet::HasSigil + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/true_sigil.rb:11 + def minimum_strictness; end +end + +# Ensures all constants used as `T.type_alias` are using CamelCase. +# +# @example +# +# # bad +# FOO_OR_BAR = T.type_alias { T.any(Foo, Bar) } +# +# # good +# FooOrBar = T.type_alias { T.any(Foo, Bar) } +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/type_alias_name.rb:17 +class RuboCop::Cop::Sorbet::TypeAliasName < ::RuboCop::Cop::Base + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/type_alias_name.rb:32 + def on_casgn(node); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/type_alias_name.rb:21 + def underscored_type_alias?(param0 = T.unsafe(nil)); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/type_alias_name.rb:18 +RuboCop::Cop::Sorbet::TypeAliasName::MSG = T.let(T.unsafe(nil), String) + +# Checks that gem versions in RBI annotations are properly formatted per the Bundler gem specification. +# +# @example +# # bad +# # @version > not a version number +# +# # good +# # @version = 1 +# +# # good +# # @version > 1.2.3 +# +# # good +# # @version <= 4.3-preview +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi_versioning/valid_gem_version_annotations.rb:21 +class RuboCop::Cop::Sorbet::ValidGemVersionAnnotations < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Sorbet::GemVersionAnnotationHelper + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi_versioning/valid_gem_version_annotations.rb:27 + def on_new_investigation; end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi_versioning/valid_gem_version_annotations.rb:50 + def valid_version?(version_string); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi_versioning/valid_gem_version_annotations.rb:24 +RuboCop::Cop::Sorbet::ValidGemVersionAnnotations::MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi_versioning/valid_gem_version_annotations.rb:25 +RuboCop::Cop::Sorbet::ValidGemVersionAnnotations::VALID_OPERATORS = T.let(T.unsafe(nil), Array) + +# Checks that every Ruby file contains a valid Sorbet sigil. +# Adapted from: https://gist.github.com/clarkdave/85aca4e16f33fd52aceb6a0a29936e52 +# +# Options: +# +# * `RequireSigilOnAllFiles`: make offense if the Sorbet typed is not found in the file (default: false) +# * `SuggestedStrictness`: Sorbet strictness level suggested in offense messages (default: 'false') +# * `MinimumStrictness`: If set, make offense if the strictness level in the file is below this one +# * `ExactStrictness`: If set, make offense if the strictness level in the file is different than this one +# +# If an `ExactStrictness` level is specified, it will be used in offense messages and autocorrect. +# If a `SuggestedStrictness` level is specified, it will be used in autocorrect. +# Otherwise, if a `MinimumStrictness` level is specified, it will be used in offense messages and autocorrect. +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:21 +class RuboCop::Cop::Sorbet::ValidSigil < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:24 + def on_new_investigation; end + + protected + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:169 + def autocorrect(corrector); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:110 + def check_double_commented_sigil(sigil, strictness); end + + # checks + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:59 + def check_sigil_present(sigil); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:137 + def check_strictness_level(sigil, strictness); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:98 + def check_strictness_not_empty(sigil, strictness); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:125 + def check_strictness_valid(sigil, strictness); end + + # Default is `nil` + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:203 + def exact_strictness; end + + # extraction + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:47 + def extract_sigil(processed_source); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:53 + def extract_strictness(sigil); end + + # Default is `nil` + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:197 + def minimum_strictness; end + + # Default is `false` + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:186 + def require_sigil_on_all_files?; end + + # Default is `'false'` + # + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:191 + def suggested_strictness; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:76 + def suggested_strictness_level; end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:43 +RuboCop::Cop::Sorbet::ValidSigil::INVALID_SIGIL_MSG = T.let(T.unsafe(nil), String) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:42 +RuboCop::Cop::Sorbet::ValidSigil::SIGIL_REGEX = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:41 +RuboCop::Cop::Sorbet::ValidSigil::STRICTNESS_LEVELS = T.let(T.unsafe(nil), Array) + +# Disallows the usage of `.void.checked(:tests)`. +# +# Using `.void` changes the value returned from the method, but only if +# runtime type checking is enabled for the method. Methods marked `.void` +# will return different values in tests compared with non-test +# environments. This is particularly troublesome if branching on the +# result of a `.void` method, because the returned value in test code +# will be the truthy `VOID` value, while the non-test return value may be +# falsy depending on the method's implementation. +# +# - Use `.returns(T.anything).checked(:tests)` to keep the runtime type +# checking for the rest of the parameters. +# - Use `.void.checked(:never)` if you are on an older version of Sorbet +# which does not have `T.anything` (meaning versions 0.5.10781 or +# earlier. Versions released after 2023-04-14 include `T.anything`.) +# +# @example +# +# # bad +# sig { void.checked(:tests) } +# +# # good +# sig { void } +# sig { returns(T.anything).checked(:tests) } +# sig { void.checked(:never) } +# +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/void_checked_tests.rb:31 +class RuboCop::Cop::Sorbet::VoidCheckedTests < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Sorbet::SignatureHelp + extend ::RuboCop::Cop::AutoCorrector + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/void_checked_tests.rb:37 + def checked_tests(param0); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/void_checked_tests.rb:58 + def on_signature(node); end + + private + + # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/void_checked_tests.rb:48 + def top_level_void(node); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/void_checked_tests.rb:41 +RuboCop::Cop::Sorbet::VoidCheckedTests::MESSAGE = T.let(T.unsafe(nil), String) + +module RuboCop::Cop::Style; end + +class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Sorbet::MutableConstantSorbetAwareBehaviour +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/version.rb:4 +module RuboCop::Sorbet; end + +# pkg:gem/rubocop-sorbet#lib/rubocop/sorbet.rb:11 +class RuboCop::Sorbet::Error < ::StandardError; end + +# A plugin that integrates RuboCop Sorbet with RuboCop's plugin system. +# +# pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/plugin.rb:10 +class RuboCop::Sorbet::Plugin < ::LintRoller::Plugin + # pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/plugin.rb:11 + def about; end + + # pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/plugin.rb:24 + def rules(_context); end + + # pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/plugin.rb:20 + def supported?(context); end +end + +# pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/version.rb:5 +RuboCop::Sorbet::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/rubocop-sorbet@0.12.0.rbi b/sorbet/rbi/gems/rubocop-sorbet@0.12.0.rbi deleted file mode 100644 index 9dac839..0000000 --- a/sorbet/rbi/gems/rubocop-sorbet@0.12.0.rbi +++ /dev/null @@ -1,9 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `rubocop-sorbet` gem. -# Please instead update this file by running `bin/tapioca gem rubocop-sorbet`. - - -# THIS IS AN EMPTY RBI FILE. -# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/rubocop@1.85.1.rbi b/sorbet/rbi/gems/rubocop@1.86.2.rbi similarity index 97% rename from sorbet/rbi/gems/rubocop@1.85.1.rbi rename to sorbet/rbi/gems/rubocop@1.86.2.rbi index 4e44fa3..6772a2b 100644 --- a/sorbet/rbi/gems/rubocop@1.85.1.rbi +++ b/sorbet/rbi/gems/rubocop@1.86.2.rbi @@ -320,7 +320,7 @@ class RuboCop::CLI # pkg:gem/rubocop#lib/rubocop/cli.rb:164 def act_on_options; end - # pkg:gem/rubocop#lib/rubocop/cli.rb:216 + # pkg:gem/rubocop#lib/rubocop/cli.rb:213 def apply_default_formatter; end # pkg:gem/rubocop#lib/rubocop/cli.rb:133 @@ -329,7 +329,7 @@ class RuboCop::CLI # pkg:gem/rubocop#lib/rubocop/cli.rb:199 def handle_editor_mode; end - # pkg:gem/rubocop#lib/rubocop/cli.rb:204 + # pkg:gem/rubocop#lib/rubocop/cli.rb:203 def handle_exiting_options; end # pkg:gem/rubocop#lib/rubocop/cli.rb:152 @@ -338,7 +338,7 @@ class RuboCop::CLI # pkg:gem/rubocop#lib/rubocop/cli.rb:88 def profile_if_needed; end - # pkg:gem/rubocop#lib/rubocop/cli.rb:230 + # pkg:gem/rubocop#lib/rubocop/cli.rb:227 def report_pending_cops; end # pkg:gem/rubocop#lib/rubocop/cli.rb:121 @@ -359,7 +359,7 @@ class RuboCop::CLI # pkg:gem/rubocop#lib/rubocop/cli.rb:145 def validate_options_vs_config; end - # pkg:gem/rubocop#lib/rubocop/cli.rb:234 + # pkg:gem/rubocop#lib/rubocop/cli.rb:231 def warn_if_cache_root_changed(early, desired); end end @@ -391,59 +391,68 @@ class RuboCop::CLI::Command::AutoGenerateConfig < ::RuboCop::CLI::Command::Base private - # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:107 + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:133 def add_formatter; end - # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:115 + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:141 def add_inheritance_from_auto_generated_file(config_file); end - # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:111 + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:50 + def auto_gen_tmp_dir; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:137 def execute_runner; end - # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:136 + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:162 def existing_configuration(config_file); end - # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:65 + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:91 def line_length_cop(config); end - # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:53 + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:79 def line_length_enabled?(config); end - # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:61 + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:87 def max_line_length(config); end - # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:34 + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:60 def maybe_run_line_length_cop; end - # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:73 + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:99 def only_exclude?; end - # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:69 + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:95 def options_has_only_flag?; end - # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:153 + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:179 def relative_path_to_todo_from_options_config; end - # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:100 + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:45 + def reset_auto_gen_tmp_dir; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:126 def reset_config_and_auto_gen_file; end - # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:91 + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:117 def run_all_cops(line_length_contents); end # Do an initial run with only Layout/LineLength so that cops that # depend on Layout/LineLength:Max get the correct value for that # parameter. # - # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:80 + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:106 def run_line_length_cop; end - # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:57 + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:83 def same_max_line_length?(config1, config2); end - # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:48 + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:74 def skip_line_length_cop(reason); end - # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:142 + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:38 + def use_temporary_cache; end + + # pkg:gem/rubocop#lib/rubocop/cli/command/auto_generate_config.rb:168 def write_config_file(file_name, file_string, rubocop_yml_contents); end end @@ -560,6 +569,26 @@ class RuboCop::CLI::Command::LSP < ::RuboCop::CLI::Command::Base def run; end end +# Lists the cops that will inspect the given file or directory. +# @api private +# +# pkg:gem/rubocop#lib/rubocop/cli/command/list_enabled_cops_for.rb:8 +class RuboCop::CLI::Command::ListEnabledCopsFor < ::RuboCop::CLI::Command::Base + # pkg:gem/rubocop#lib/rubocop/cli/command/list_enabled_cops_for.rb:11 + def initialize(env); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/list_enabled_cops_for.rb:18 + def run; end + + private + + # pkg:gem/rubocop#lib/rubocop/cli/command/list_enabled_cops_for.rb:32 + def cops_of_department(registry, department); end + + # pkg:gem/rubocop#lib/rubocop/cli/command/list_enabled_cops_for.rb:24 + def print_available_cops; end +end + # Start Model Context Protocol of RuboCop. # @api private # @@ -679,9 +708,6 @@ class RuboCop::CLI::Command::ShowDocsUrl < ::RuboCop::CLI::Command::Base # pkg:gem/rubocop#lib/rubocop/cli/command/show_docs_url.rb:24 def print_documentation_url; end - - # pkg:gem/rubocop#lib/rubocop/cli/command/show_docs_url.rb:42 - def registry_hash; end end # Suggest RuboCop extensions to install based on Gemfile dependencies. @@ -891,68 +917,65 @@ class RuboCop::CommentConfig private - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:98 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:99 def analyze; end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:177 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:174 def analyze_cop(analysis, directive); end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:195 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:192 def analyze_disabled(analysis, directive); end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:202 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:199 def analyze_rest(analysis, directive); end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:188 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:185 def analyze_single_line(analysis, directive); end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:147 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:145 def apply_cop_op(analyses, operation, cop, line); end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:141 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:139 def apply_push(analyses, resolved_cops, line); end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:209 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:206 def cop_line_ranges(analysis); end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:215 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:212 def each_directive; end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:135 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:133 def expand_cop_name(name); end # pkg:gem/rubocop#lib/rubocop/comment_config.rb:70 def extra_enabled_comments_with_names(extras:, names:); end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:235 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:232 def handle_enable_all(directive, names, extras); end # Collect cops that have been disabled or enabled by name in a directive comment # so that `Lint/RedundantCopEnableDirective` can register offenses correctly. # - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:249 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:246 def handle_switch(directive, names, extras); end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:168 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:165 def inject_disabled_cops_directives(analyses); end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:228 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:225 def non_comment_token_line_numbers; end # pkg:gem/rubocop#lib/rubocop/comment_config.rb:85 def opt_in_cops; end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:157 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:155 def pop_state(analyses, line); end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:224 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:221 def qualified_cop_name(cop_name); end - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:129 + # pkg:gem/rubocop#lib/rubocop/comment_config.rb:127 def resolve_push_cops(directive); end - - # pkg:gem/rubocop#lib/rubocop/comment_config.rb:125 - def snapshot_cops(analyses, cop_names); end end # pkg:gem/rubocop#lib/rubocop/comment_config.rb:9 @@ -1089,7 +1112,7 @@ class RuboCop::Config # pkg:gem/rubocop#lib/rubocop/config.rb:127 def add_excludes_from_higher_level(highest_config); end - # pkg:gem/rubocop#lib/rubocop/config.rb:239 + # pkg:gem/rubocop#lib/rubocop/config.rb:240 def allowed_camel_case_file?(file); end # Paths specified in configuration files starting with .rubocop are @@ -1098,12 +1121,12 @@ class RuboCop::Config # config/default.yml, for example, are not relative to RuboCop's config # directory since that wouldn't work. # - # pkg:gem/rubocop#lib/rubocop/config.rb:283 + # pkg:gem/rubocop#lib/rubocop/config.rb:281 def base_dir_for_path_parameters; end # @return [String, nil] # - # pkg:gem/rubocop#lib/rubocop/config.rb:313 + # pkg:gem/rubocop#lib/rubocop/config.rb:311 def bundler_lock_file_path; end # pkg:gem/rubocop#lib/rubocop/config.rb:85 @@ -1142,10 +1165,14 @@ class RuboCop::Config # pkg:gem/rubocop#lib/rubocop/config.rb:97 def fetch(*_arg0, **_arg1, &_arg2); end - # pkg:gem/rubocop#lib/rubocop/config.rb:261 + # pkg:gem/rubocop#lib/rubocop/config.rb:259 def file_to_exclude?(file); end - # pkg:gem/rubocop#lib/rubocop/config.rb:220 + # Returns true if the file matches any include pattern. If a block is given, the block is called + # to determine if the pattern is relevant (true returned by the block) or should be skipped + # (false returned). + # + # pkg:gem/rubocop#lib/rubocop/config.rb:223 def file_to_include?(file); end # pkg:gem/rubocop#lib/rubocop/config.rb:196 @@ -1181,10 +1208,10 @@ class RuboCop::Config # Returns target's locked gem versions (i.e. from Gemfile.lock or gems.locked) # @returns [Hash{String => Gem::Version}] The locked gem versions, keyed by the gems' names. # - # pkg:gem/rubocop#lib/rubocop/config.rb:338 + # pkg:gem/rubocop#lib/rubocop/config.rb:336 def gem_versions_in_target; end - # pkg:gem/rubocop#lib/rubocop/config.rb:342 + # pkg:gem/rubocop#lib/rubocop/config.rb:340 def inspect; end # True if this is a config file that is shipped with RuboCop @@ -1216,25 +1243,25 @@ class RuboCop::Config # pkg:gem/rubocop#lib/rubocop/config.rb:97 def merge(*_arg0, **_arg1, &_arg2); end - # pkg:gem/rubocop#lib/rubocop/config.rb:293 + # pkg:gem/rubocop#lib/rubocop/config.rb:291 def parser_engine; end - # pkg:gem/rubocop#lib/rubocop/config.rb:274 + # pkg:gem/rubocop#lib/rubocop/config.rb:272 def path_relative_to_config(path); end - # pkg:gem/rubocop#lib/rubocop/config.rb:270 + # pkg:gem/rubocop#lib/rubocop/config.rb:268 def patterns_to_exclude; end - # pkg:gem/rubocop#lib/rubocop/config.rb:266 + # pkg:gem/rubocop#lib/rubocop/config.rb:264 def patterns_to_include; end - # pkg:gem/rubocop#lib/rubocop/config.rb:324 + # pkg:gem/rubocop#lib/rubocop/config.rb:322 def pending_cops; end # Returns true if there's a chance that an Include pattern matches hidden # files, false if that's definitely not possible. # - # pkg:gem/rubocop#lib/rubocop/config.rb:253 + # pkg:gem/rubocop#lib/rubocop/config.rb:251 def possibly_include_hidden?; end # pkg:gem/rubocop#lib/rubocop/config.rb:97 @@ -1243,13 +1270,13 @@ class RuboCop::Config # pkg:gem/rubocop#lib/rubocop/config.rb:105 def signature; end - # pkg:gem/rubocop#lib/rubocop/config.rb:308 + # pkg:gem/rubocop#lib/rubocop/config.rb:306 def smart_loaded_path; end # pkg:gem/rubocop#lib/rubocop/config.rb:216 def string_literals_frozen_by_default?; end - # pkg:gem/rubocop#lib/rubocop/config.rb:297 + # pkg:gem/rubocop#lib/rubocop/config.rb:295 def target_rails_version; end # pkg:gem/rubocop#lib/rubocop/config.rb:99 @@ -1275,31 +1302,34 @@ class RuboCop::Config private - # pkg:gem/rubocop#lib/rubocop/config.rb:392 + # pkg:gem/rubocop#lib/rubocop/config.rb:396 def department_of(qualified_cop_name); end - # pkg:gem/rubocop#lib/rubocop/config.rb:380 + # pkg:gem/rubocop#lib/rubocop/config.rb:384 def enable_cop?(qualified_cop_name, cop_options); end # @param [Gem::Version] gem_version an object like `Gem::Version.new("7.1.2.3")` # @return [Float] The major and minor version, like `7.1` # - # pkg:gem/rubocop#lib/rubocop/config.rb:367 + # pkg:gem/rubocop#lib/rubocop/config.rb:371 def gem_version_to_major_minor_float(gem_version); end + # pkg:gem/rubocop#lib/rubocop/config.rb:346 + def match_relative_or_absolute_path?(pattern, relative_file_path, absolute_file_path); end + # @returns [Hash{String => Gem::Version}] The locked gem versions, keyed by the gems' names. # - # pkg:gem/rubocop#lib/rubocop/config.rb:373 + # pkg:gem/rubocop#lib/rubocop/config.rb:377 def read_gem_versions_from_target_lockfile; end # @return [Float, nil] The Rails version as a `major.minor` Float. # - # pkg:gem/rubocop#lib/rubocop/config.rb:354 + # pkg:gem/rubocop#lib/rubocop/config.rb:358 def read_rails_version_from_bundler_lock_file; end # @return [Float, nil] The Rails version as a `major.minor` Float. # - # pkg:gem/rubocop#lib/rubocop/config.rb:349 + # pkg:gem/rubocop#lib/rubocop/config.rb:353 def target_rails_version_from_bundler_lock_file; end class << self @@ -1581,14 +1611,14 @@ class RuboCop::ConfigLoaderResolver # derived configuration, we need to make those paths relative to where the derived configuration # file is. # - # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:64 + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:65 def fix_include_paths(base_config_path, hash, path, key, value); end # Return a recursive merge of two hashes. That is, a normal hash merge, # with the addition that any value that is a hash, and occurs in both # arguments, will also be merged. And so on. # - # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:118 + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:119 def merge(base_hash, derived_hash, **opts); end # Merges the given configuration with the default one. If @@ -1597,25 +1627,25 @@ class RuboCop::ConfigLoaderResolver # AllCops:EnabledByDefault is true, it changes the Enabled params so that # only cops explicitly disabled in user configuration are disabled. # - # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:94 + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:95 def merge_with_default(config, config_file, unset_nil:); end # An `Enabled: true` setting in user configuration for a cop overrides an # `Enabled: false` setting for its department. # - # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:138 + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:139 def override_department_setting_for_cops(base_hash, derived_hash); end # If a cop was previously explicitly enabled, but then superseded by the # department being disabled, disable it. # - # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:155 + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:156 def override_enabled_for_disabled_departments(base_hash, derived_hash); end # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:38 def resolve_inheritance(path, hash, file, debug); end - # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:74 + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:75 def resolve_inheritance_from_gems(hash); end # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:11 @@ -1626,49 +1656,49 @@ class RuboCop::ConfigLoaderResolver private - # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:234 + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:235 def base_configs(path, inherit_from, file); end - # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:202 + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:203 def determine_inherit_mode(hash, key); end - # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:171 + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:172 def disabled?(hash, department); end - # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:175 + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:176 def duplicate_setting?(base_hash, derived_hash, key, inherited_file); end - # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:196 + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:197 def duplicate_setting_warning(opts, key); end - # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:293 + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:294 def gem_config_path(gem_name, relative_config_path); end - # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:271 + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:272 def handle_disabled_by_default(config, new_default_configuration); end - # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:246 + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:247 def inherited_file(path, inherit_from, file); end - # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:230 + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:231 def merge_hashes?(base_hash, derived_hash, key); end - # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:267 + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:268 def remote_config?(file); end - # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:222 + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:223 def should_merge?(mode, key); end - # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:226 + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:227 def should_override?(mode, key); end - # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:208 + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:209 def should_union?(derived_hash, base_hash, root_mode, key); end - # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:289 + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:290 def transform(config, &block); end - # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:184 + # pkg:gem/rubocop#lib/rubocop/config_loader_resolver.rb:185 def warn_on_duplicate_setting(base_hash, derived_hash, key, **opts); end end @@ -2552,52 +2582,52 @@ module RuboCop::Cop::AutocorrectLogic # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:51 def disable_offense(offense_range); end - # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:143 + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:144 def disable_offense_at_end_of_line(range); end - # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:151 + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:152 def disable_offense_before_and_after(range_by_lines); end - # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:77 + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:78 def disable_offense_with_eol_or_surround_comment(range); end - # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:147 + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:148 def eol_comment; end - # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:85 + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:86 def eol_comment_would_be_inside_literal?(offense_range, literal_range); end - # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:102 + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:103 def heredoc_range(node); end - # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:92 + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:93 def line_with_eol_comment_too_long?(range); end - # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:137 + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:138 def max_line_length; end - # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:63 + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:64 def multiline_ranges(offense_range); end - # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:114 + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:115 def multiline_string?(node); end # Expand the given range to include all of any lines it covers. Does not # include newline at end of the last line. # - # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:127 + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:128 def range_by_lines(range); end - # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:118 + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:119 def range_of_first_line(range); end - # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:110 + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:111 def string_continuation?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:98 + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:99 def surrounding_heredoc?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:106 + # pkg:gem/rubocop#lib/rubocop/cop/autocorrect_logic.rb:107 def surrounding_percent_array?(node); end end @@ -4552,7 +4582,7 @@ module RuboCop::Cop::ConfigurableMax # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_max.rb:11 def max=(value); end - # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_max.rb:23 + # pkg:gem/rubocop#lib/rubocop/cop/mixin/configurable_max.rb:24 def max_parameter_name; end end @@ -8616,63 +8646,66 @@ class RuboCop::Cop::Layout::EmptyLineAfterGuardClause < ::RuboCop::Cop::Base extend ::RuboCop::PathUtil extend ::RuboCop::Cop::Util - # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:63 + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:64 + def guard_clause_branch?(param0 = T.unsafe(nil)); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:68 def on_if(node); end private - # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:84 + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:89 def autocorrect(corrector, node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:106 + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:111 def contains_guard_clause?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:99 + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:104 def correct_style?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:184 + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:191 def heredoc?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:177 + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:184 def heredoc_line(node, heredoc_node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:149 + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:156 def last_heredoc_argument(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:165 + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:172 def last_heredoc_argument_node(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:202 + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:209 def multiple_statements_on_line?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:121 + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:128 def next_line_allowed_directive_comment?(line); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:117 + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:124 def next_line_empty?(line); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:110 + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:117 def next_line_empty_or_allowed_directive_comment?(line); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:127 + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:134 def next_line_rescue_or_ensure?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:141 + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:148 def next_sibling_empty_or_guard_clause?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:132 + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:139 def next_sibling_parent_empty_or_else?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:194 + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:201 def offense_location(node); end # SimpleCov excludes code from the coverage report by wrapping it in `# :nocov:`: # https://github.com/simplecov-ruby/simplecov#ignoringskipping-code # - # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:211 + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:218 def simplecov_directive_comment?(comment); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:188 + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_line_after_guard_clause.rb:195 def use_heredoc_in_condition?(condition); end end @@ -9405,42 +9438,45 @@ class RuboCop::Cop::Layout::EmptyLinesAroundAttributeAccessor < ::RuboCop::Cop:: include ::RuboCop::Cop::AllowedMethods extend ::RuboCop::Cop::AutoCorrector - # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:70 + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:71 def on_send(node); end private - # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:123 + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:124 def allow_alias?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:133 + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:134 def allow_alias_syntax?; end - # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:127 + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:128 def attribute_or_allowed_method?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:83 + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:84 def autocorrect(corrector, node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:107 + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:108 def next_line_empty?(line); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:94 + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:95 def next_line_empty_or_enable_directive_comment?(line); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:101 + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:102 def next_line_enable_directive_comment?(line); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:117 + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:118 def next_line_node(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:111 + # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:112 def require_empty_line?(node); end end # pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:68 RuboCop::Cop::Layout::EmptyLinesAroundAttributeAccessor::MSG = T.let(T.unsafe(nil), String) +# pkg:gem/rubocop#lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb:69 +RuboCop::Cop::Layout::EmptyLinesAroundAttributeAccessor::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Checks if empty lines exist around the bodies of begin-end # blocks. # @@ -10021,28 +10057,28 @@ class RuboCop::Cop::Layout::EndAlignment < ::RuboCop::Cop::Base private - # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:171 + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:174 def alignment_node(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:188 + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:191 def alignment_node_for_variable_style(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:152 + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:155 def asgn_variable_align_with(outer_node, inner_node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:206 + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:209 def assignment_or_operator_method(node); end # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:122 def autocorrect(corrector, node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:141 + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:144 def check_asgn_alignment(outer_node, inner_node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:126 + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:127 def check_assignment(node, rhs); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:162 + # pkg:gem/rubocop#lib/rubocop/cop/layout/end_alignment.rb:165 def check_other_alignment(node); end end @@ -12820,7 +12856,7 @@ class RuboCop::Cop::Layout::LineLength < ::RuboCop::Cop::Base # Find the largest possible substring of a string node to retain before a break # - # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:417 + # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:419 def largest_possible_string(node); end # pkg:gem/rubocop#lib/rubocop/cop/layout/line_length.rb:347 @@ -13651,34 +13687,37 @@ class RuboCop::Cop::Layout::MultilineMethodCallIndentation < ::RuboCop::Cop::Bas private - # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:230 + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:191 + def after_multiline_block_base(first_call, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:280 def align_with_base_message(rhs); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:169 + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:219 def aligned_with_first_line_dot?(node, rhs); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:252 + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:302 def alignment_base(node, rhs, given_style); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:311 + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:361 def alignment_base_for_chained_receiver?(receiver_chain, base_receiver); end # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:83 def autocorrect(corrector, node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:234 + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:284 def base_source; end - # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:192 + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:242 def calculate_column_delta_offense(rhs, correct_column); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:154 + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:157 def check_hash_pair_indentation(node, lhs, rhs); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:145 + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:148 def check_hash_pair_indented_style(rhs, pair_ancestor); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:179 + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:229 def check_regular_indentation(node, lhs, rhs, given_style); end # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:98 @@ -13687,71 +13726,83 @@ class RuboCop::Cop::Layout::MultilineMethodCallIndentation < ::RuboCop::Cop::Bas # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:92 def correct_selector_only(corrector, node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:197 + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:247 def extra_indentation(given_style, parent); end # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:69 def find_base_receiver(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:356 + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:406 def find_continuation_node(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:299 + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:207 + def find_enclosing_chain_call(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:349 def find_hash_method_base_in_receiver_chain(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:161 + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:167 def find_hash_pair_alignment_base(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:350 + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:400 def find_multiline_block_chain_node(node); end # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:75 def find_pair_ancestor(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:324 + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:374 def first_call_alignment_node(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:380 + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:430 def first_call_has_a_dot(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:341 + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:175 + def first_dot_alignment_base(node, rhs); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:391 def get_dot_right_above(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:370 + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:420 def handle_descendant_block(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:137 + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:215 + def hash_arg_in_chain?(call, hash_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:140 def hash_pair_aligned?(pair_ancestor, given_style); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:141 + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:144 def hash_pair_indented?(node, pair_ancestor, given_style); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:207 + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:200 + def inside_multiline_chain_arg?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:257 def message(node, lhs, rhs); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:335 + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:385 def method_on_receiver_last_line?(node, base_receiver, type); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:238 + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:288 def no_base_message(lhs, rhs, node); end # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:120 def offending_range(node, lhs, rhs, given_style); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:387 + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:437 def operation_rhs(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:397 + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:447 def operator_rhs?(node, receiver); end # a # .b # .c # - # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:291 + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:341 def receiver_alignment_base(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:225 + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:275 def relative_to_receiver_message(rhs); end # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:104 @@ -13763,22 +13814,25 @@ class RuboCop::Cop::Layout::MultilineMethodCallIndentation < ::RuboCop::Cop::Bas # a.b # .c # - # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:279 + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:329 def semantic_alignment_base(node, rhs); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:316 + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:366 def semantic_alignment_node(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:221 + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:271 def should_align_with_base?; end - # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:217 + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:267 def should_indent_relative_to_receiver?; end - # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:366 + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:416 def single_line_block_receiver?(receiver); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:261 + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:136 + def skip_for_context?(node, pair_ancestor); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:311 def syntactic_alignment_base(lhs, rhs); end # pkg:gem/rubocop#lib/rubocop/cop/layout/multiline_method_call_indentation.rb:79 @@ -14708,133 +14762,139 @@ class RuboCop::Cop::Layout::SpaceAroundKeyword < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:50 def on_block(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:54 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:56 def on_break(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:58 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:60 def on_case(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:62 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:64 def on_case_match(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:162 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:164 def on_defined?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:66 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:68 def on_ensure(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:70 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:72 def on_for(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:74 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:76 def on_if(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:78 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:80 def on_if_guard(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:82 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:84 def on_in_pattern(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:86 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:54 + def on_itblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:88 def on_kwbegin(node); end # Handle one-line pattern matching syntax (`in`) with `Parser::Ruby27`. # - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:91 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:93 def on_match_pattern(node); end # Handle one-line pattern matching syntax (`in`) with `Parser::Ruby30`. # - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:98 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:100 def on_match_pattern_p(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:102 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:104 def on_next(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:106 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:53 + def on_numblock(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:108 def on_or(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:110 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:112 def on_postexe(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:114 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:116 def on_preexe(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:118 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:120 def on_resbody(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:122 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:124 def on_rescue(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:126 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:128 def on_return(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:130 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:132 def on_send(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:134 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:136 def on_super(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:142 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:144 def on_unless_guard(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:146 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:148 def on_until(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:150 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:152 def on_when(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:154 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:156 def on_while(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:158 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:160 def on_yield(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:138 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:140 def on_zsuper(node); end private - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:241 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:243 def accept_left_parenthesis?(range); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:245 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:247 def accept_left_square_bracket?(range); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:249 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:251 def accept_namespace_operator?(range); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:234 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:236 def accepted_opening_delimiter?(range, char); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:168 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:170 def check(node, locations, begin_keyword = T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:183 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:185 def check_begin(node, range, begin_keyword); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:189 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:191 def check_end(node, range, begin_keyword); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:202 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:204 def check_keyword(node, range); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:198 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:200 def do?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:257 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:259 def namespace_operator?(range, pos); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:261 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:263 def preceded_by_operator?(node, _range); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:253 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:255 def safe_navigation_call?(range, pos); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:223 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:225 def space_after_missing?(range); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:216 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_around_keyword.rb:218 def space_before_missing?(range); end end @@ -15388,24 +15448,24 @@ class RuboCop::Cop::Layout::SpaceInLambdaLiteral < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_in_lambda_literal.rb:30 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_in_lambda_literal.rb:31 def on_send(node); end private - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_in_lambda_literal.rb:50 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_in_lambda_literal.rb:51 def arrow_lambda_with_args?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_in_lambda_literal.rb:72 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_in_lambda_literal.rb:73 def lambda_arguments(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_in_lambda_literal.rb:65 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_in_lambda_literal.rb:66 def range_of_offense(node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_in_lambda_literal.rb:58 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_in_lambda_literal.rb:59 def space_after_arrow(lambda_node); end - # pkg:gem/rubocop#lib/rubocop/cop/layout/space_in_lambda_literal.rb:54 + # pkg:gem/rubocop#lib/rubocop/cop/layout/space_in_lambda_literal.rb:55 def space_after_arrow?(lambda_node); end end @@ -15415,6 +15475,9 @@ RuboCop::Cop::Layout::SpaceInLambdaLiteral::MSG_REQUIRE_NO_SPACE = T.let(T.unsaf # pkg:gem/rubocop#lib/rubocop/cop/layout/space_in_lambda_literal.rb:27 RuboCop::Cop::Layout::SpaceInLambdaLiteral::MSG_REQUIRE_SPACE = T.let(T.unsafe(nil), String) +# pkg:gem/rubocop#lib/rubocop/cop/layout/space_in_lambda_literal.rb:29 +RuboCop::Cop::Layout::SpaceInLambdaLiteral::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Checks that brackets used for array literals have or don't have # surrounding space depending on configuration. # @@ -17348,8 +17411,11 @@ RuboCop::Cop::Lint::ConstantOverwrittenInRescue::MSG = T.let(T.unsafe(nil), Stri # Checks for constant reassignments. # # Emulates Ruby's runtime warning "already initialized constant X" -# when a constant is reassigned in the same file and namespace using the -# `NAME = value` syntax. +# when a constant is reassigned in the same file and namespace. +# +# The cop tracks constants defined via `NAME = value` syntax as well as +# class/module keyword definitions. It detects reassignment when a constant +# is first defined one way and then redefined using the `NAME = value` syntax. # # The cop cannot catch all offenses, like, for example, when a constant # is reassigned in another file, or when using metaprogramming (`Module#const_set`). @@ -17378,6 +17444,14 @@ RuboCop::Cop::Lint::ConstantOverwrittenInRescue::MSG = T.let(T.unsafe(nil), Stri # X = :bar # end # +# # bad +# class FooError < StandardError; end +# FooError = Class.new(RuntimeError) +# +# # bad +# module M; end +# M = 1 +# # # good - keep only one assignment # X = :bar # @@ -17404,48 +17478,66 @@ RuboCop::Cop::Lint::ConstantOverwrittenInRescue::MSG = T.let(T.unsafe(nil), Stri # X = :bar # end # -# pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:65 +# pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:76 class RuboCop::Cop::Lint::ConstantReassignment < ::RuboCop::Cop::Base - # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:76 + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:99 def on_casgn(node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:84 + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:87 + def on_class(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:93 + def on_module(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:109 def on_send(node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:71 + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:82 def remove_constant(param0 = T.unsafe(nil)); end private - # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:135 + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:164 def ancestor_namespaces(node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:142 - def constant_names; end + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:192 + def constant_definitions; end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:156 + def constant_display_name(node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:131 + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:160 def constant_namespaces(node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:98 + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:177 + def definition_name(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:123 def fixed_constant_path?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:111 + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:136 def freeze_method?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:115 + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:140 def fully_qualified_constant_name(node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:127 + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:152 def fully_qualified_name_for(namespaces, constant); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:102 + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:188 + def identifier_namespaces(identifier); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:127 def simple_assignment?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:171 + def unconditional_definition?(node); end end -# pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:66 +# pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:77 RuboCop::Cop::Lint::ConstantReassignment::MSG = T.let(T.unsafe(nil), String) -# pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:68 +# pkg:gem/rubocop#lib/rubocop/cop/lint/constant_reassignment.rb:79 RuboCop::Cop::Lint::ConstantReassignment::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks that certain constants are fully qualified. @@ -18484,6 +18576,9 @@ class RuboCop::Cop::Lint::DuplicateMethods < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:167 def alias_method?(param0 = T.unsafe(nil)); end + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:201 + def class_or_module_new_block?(param0 = T.unsafe(nil)); end + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:172 def delegate_method?(param0 = T.unsafe(nil)); end @@ -18505,7 +18600,7 @@ class RuboCop::Cop::Lint::DuplicateMethods < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:141 def on_defs(node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:200 + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:207 def on_send(node); end # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:198 @@ -18513,55 +18608,67 @@ class RuboCop::Cop::Lint::DuplicateMethods < ::RuboCop::Cop::Base private - # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:227 - def check_const_receiver(node, name, const_name); end + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:317 + def anon_block_scope_id(anon_block); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:308 + def anonymous_class_block(node); end # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:234 + def check_const_receiver(node, name, const_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:241 def check_self_receiver(node, name); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:260 + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:270 def delegate_prefix(node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:348 + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:395 def found_attr(node, args, readable: T.unsafe(nil), writable: T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:276 + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:286 def found_instance_method(node, name); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:299 - def found_method(node, method_name); end + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:344 + def found_method(node, method_name, scope_id: T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:289 + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:333 def found_sclass_method(node, name); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:272 + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:282 def hash_value(node, key); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:241 + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:300 + def humanize_scope(scope); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:251 def inside_condition?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:326 + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:373 def location(node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:358 + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:405 def lookup_constant(node, const_name); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:245 + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:255 def message_for_dup(node, method_name, key); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:318 + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:365 def method_key(node, method_name); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:334 + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:328 + def named_receiver(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:381 def on_attr(node, attr_name, args); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:250 + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:260 def on_delegate(node, method_names); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:376 + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:423 def qualified_name(enclosing, namespace, mod_name); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:390 + # pkg:gem/rubocop#lib/rubocop/cop/lint/duplicate_methods.rb:437 def source_location(node); end end @@ -19099,28 +19206,31 @@ class RuboCop::Cop::Lint::EmptyConditionalBody < ::RuboCop::Cop::Base private - # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_conditional_body.rb:125 + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_conditional_body.rb:86 + def allow_comments?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_conditional_body.rb:130 def branch_range(node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_conditional_body.rb:94 + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_conditional_body.rb:99 def can_simplify_conditional?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_conditional_body.rb:133 + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_conditional_body.rb:138 def deletion_range(range); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_conditional_body.rb:121 + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_conditional_body.rb:126 def else_branch?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_conditional_body.rb:113 + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_conditional_body.rb:118 def empty_if_branch?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_conditional_body.rb:108 + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_conditional_body.rb:113 def flip_orphaned_else(corrector, node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_conditional_body.rb:86 + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_conditional_body.rb:91 def offense_range(node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_conditional_body.rb:98 + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_conditional_body.rb:103 def remove_empty_branch(corrector, node); end end @@ -19283,6 +19393,11 @@ class RuboCop::Cop::Lint::EmptyInPattern < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_in_pattern.rb:53 def on_case_match(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_in_pattern.rb:64 + def allow_comments?(node); end end # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_in_pattern.rb:49 @@ -19360,6 +19475,11 @@ class RuboCop::Cop::Lint::EmptyWhen < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_when.rb:50 def on_case(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_when.rb:61 + def allow_comments?(node); end end # pkg:gem/rubocop#lib/rubocop/cop/lint/empty_when.rb:48 @@ -21980,7 +22100,7 @@ class RuboCop::Cop::Lint::ParenthesesAsGroupedExpression < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb:52 def compound_range?(first_arg); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb:81 + # pkg:gem/rubocop#lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb:71 def space_range(expr, space_length); end # pkg:gem/rubocop#lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb:65 @@ -22654,6 +22774,22 @@ RuboCop::Cop::Lint::RedundantRequireStatement::RUBY_22_LOADED_FEATURES = T.let(T # do_something if attrs.respond_to?(:[]) # # # bad +# foo&.bar ? foo&.bar.baz : qux +# +# # good +# foo&.bar ? foo.bar.baz : qux +# +# # bad +# if foo&.bar +# foo&.bar.baz +# end +# +# # good +# if foo&.bar +# foo.bar.baz +# end +# +# # bad # while node&.is_a?(BeginNode) # node = node.parent # end @@ -22735,60 +22871,60 @@ RuboCop::Cop::Lint::RedundantRequireStatement::RUBY_22_LOADED_FEATURES = T.let(T # foo.present? # foo&.bar # -# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:146 +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:162 class RuboCop::Cop::Lint::RedundantSafeNavigation < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedMethods extend ::RuboCop::Cop::AutoCorrector - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:167 + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:183 def conversion_with_default?(param0 = T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:179 + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:195 def on_csend(node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:201 + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:217 def on_or(node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:162 + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:178 def respond_to_nil_method?(param0 = T.unsafe(nil)); end private - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:253 + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:269 def additional_nil_methods; end - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:217 + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:233 def assume_receiver_instance_exists?(receiver); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:234 + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:250 def check?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:245 + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:261 def condition?(parent, node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:223 + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:239 def guaranteed_instance?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:249 + # pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:265 def infer_non_nil_receiver?; end end -# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:159 +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:175 RuboCop::Cop::Lint::RedundantSafeNavigation::GUARANTEED_INSTANCE_METHODS = T.let(T.unsafe(nil), Array) -# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:150 +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:166 RuboCop::Cop::Lint::RedundantSafeNavigation::MSG = T.let(T.unsafe(nil), String) -# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:151 +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:167 RuboCop::Cop::Lint::RedundantSafeNavigation::MSG_LITERAL = T.let(T.unsafe(nil), String) -# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:152 +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:168 RuboCop::Cop::Lint::RedundantSafeNavigation::MSG_NON_NIL = T.let(T.unsafe(nil), String) -# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:155 +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:171 RuboCop::Cop::Lint::RedundantSafeNavigation::NIL_METHODS = T.let(T.unsafe(nil), Set) -# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:157 +# pkg:gem/rubocop#lib/rubocop/cop/lint/redundant_safe_navigation.rb:173 RuboCop::Cop::Lint::RedundantSafeNavigation::SNAKE_CASE = T.let(T.unsafe(nil), Regexp) # Checks for unneeded usages of splat expansion. @@ -23433,7 +23569,7 @@ class RuboCop::Cop::Lint::RequireRelativeSelfPath < ::RuboCop::Cop::Base private - # pkg:gem/rubocop#lib/rubocop/cop/lint/require_relative_self_path.rb:44 + # pkg:gem/rubocop#lib/rubocop/cop/lint/require_relative_self_path.rb:46 def remove_ext(file_path); end # pkg:gem/rubocop#lib/rubocop/cop/lint/require_relative_self_path.rb:40 @@ -23604,7 +23740,7 @@ class RuboCop::Cop::Lint::SafeNavigationChain < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:33 def bad_method?(param0 = T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:40 + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:41 def on_send(node); end private @@ -23613,27 +23749,33 @@ class RuboCop::Cop::Lint::SafeNavigationChain < ::RuboCop::Cop::Base # @param [RuboCop::AST::SendNode] send_node # @return [String] # - # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:67 + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:84 def add_safe_navigation_operator(offense_range:, send_node:); end # @param [RuboCop::Cop::Corrector] corrector # @param [Parser::Source::Range] offense_range # @param [RuboCop::AST::SendNode] send_node # - # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:86 + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:103 def autocorrect(corrector, offense_range:, send_node:); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:95 + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:112 def brackets?(send_node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:108 + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:125 def operator_inside_collection_literal?(send_node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:99 + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:116 def require_parentheses?(send_node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:57 + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:62 def require_safe_navigation?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:75 + def ternary_else_branch?(node, safe_nav); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:69 + def ternary_safe_navigation?(node, safe_nav); end end # pkg:gem/rubocop#lib/rubocop/cop/lint/safe_navigation_chain.rb:29 @@ -24661,13 +24803,27 @@ class RuboCop::Cop::Lint::Syntax < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/lint/syntax.rb:22 def add_offense_from_diagnostic(diagnostic, ruby_version); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/syntax.rb:32 + # pkg:gem/rubocop#lib/rubocop/cop/lint/syntax.rb:56 def add_offense_from_error(error); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/syntax.rb:37 + # pkg:gem/rubocop#lib/rubocop/cop/lint/syntax.rb:61 def beautify_message(message); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/syntax.rb:43 + # Expand zero-length diagnostic ranges so that editors and formatters + # can display them. This typically occurs when the parser reports + # `unexpected token $end` at EOF. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/syntax.rb:36 + def diagnostic_location(location); end + + # Override to skip multiline_ranges check which requires AST. + # Syntax errors mean the AST is nil, so we go directly to + # the EOL comment insertion path. + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/syntax.rb:52 + def disable_offense(offense_range); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/syntax.rb:67 def find_severity(_range, _severity); end end @@ -24822,18 +24978,21 @@ class RuboCop::Cop::Lint::TrailingCommaInAttributeDeclaration < ::RuboCop::Cop:: include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # pkg:gem/rubocop#lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb:36 + # pkg:gem/rubocop#lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb:37 def on_send(node); end private - # pkg:gem/rubocop#lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb:46 + # pkg:gem/rubocop#lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb:47 def trailing_comma_range(node); end end # pkg:gem/rubocop#lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb:34 RuboCop::Cop::Lint::TrailingCommaInAttributeDeclaration::MSG = T.let(T.unsafe(nil), String) +# pkg:gem/rubocop#lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb:35 +RuboCop::Cop::Lint::TrailingCommaInAttributeDeclaration::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Checks for "triple quotes" (strings delimited by any odd number # of quotes greater than 1). # @@ -25730,19 +25889,22 @@ class RuboCop::Cop::Lint::UnusedMethodArgument < ::RuboCop::Cop::Base private - # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_method_argument.rb:128 + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_method_argument.rb:138 def allowed_exception_class?(node); end # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_method_argument.rb:90 def autocorrect(corrector, node); end + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_method_argument.rb:103 + def block_argument_with_yield?(variable); end + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_method_argument.rb:94 def check_argument(variable); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_method_argument.rb:102 + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_method_argument.rb:112 def ignored_method?(body); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_method_argument.rb:107 + # pkg:gem/rubocop#lib/rubocop/cop/lint/unused_method_argument.rb:117 def message(variable); end class << self @@ -26092,84 +26254,83 @@ RuboCop::Cop::Lint::UselessAccessModifier::MSG = T.let(T.unsafe(nil), String) # # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:40 class RuboCop::Cop::Lint::UselessAssignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:51 + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:49 def after_leaving_scope(scope, _variable_table); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:174 + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:172 def autocorrect(corrector, assignment); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:113 + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:111 def chained_assignment?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:63 + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:61 def check_for_unused_assignment(variable, assignment); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:55 + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:53 def check_for_unused_assignments(variable); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:158 + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:156 def collect_variable_like_names(scope); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:84 + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:82 def ignored_assignment?(variable, assignment_node, assignment); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:89 + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:87 def message_for_useless_assignment(assignment); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:119 + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:117 def message_specification(assignment, variable); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:129 + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:127 def multiple_assignment_message(variable_name); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:95 + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:93 def offense_range(assignment); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:134 + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:132 def operator_assignment_message(scope, assignment); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:191 + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:189 def remove_exception_assignment_part(corrector, node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:215 + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:210 def remove_local_variable_assignment_part(corrector, node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:204 + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:199 def remove_trailing_character_from_operator(corrector, node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:200 + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:195 def rename_variable_with_underscore(corrector, node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:208 + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:203 def replace_named_capture_group_with_non_capturing_group(corrector, node, variable_name); end # TODO: More precise handling (rescue, ensure, nested begin, etc.) # - # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:148 + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:146 def return_value_node_of_scope(scope); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:103 + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:101 def sequential_assignment?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:141 + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:139 def similar_name_message(variable); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:219 + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:214 def variable_in_loop_condition?(assignment_node, variable); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:167 + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:165 def variable_like_method_invocation?(node); end class << self - # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:47 + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:45 def joining_forces; end end end -# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:45 +# pkg:gem/rubocop#lib/rubocop/cop/lint/useless_assignment.rb:43 RuboCop::Cop::Lint::UselessAssignment::MSG = T.let(T.unsafe(nil), String) # Checks for useless constant scoping. Private constants must be defined using @@ -26270,7 +26431,7 @@ class RuboCop::Cop::Lint::UselessDefaultValueArgument < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_default_value_argument.rb:59 def default_value_argument_and_block(param0 = T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_default_value_argument.rb:80 + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_default_value_argument.rb:82 def on_csend(node); end # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_default_value_argument.rb:69 @@ -26278,7 +26439,7 @@ class RuboCop::Cop::Lint::UselessDefaultValueArgument < ::RuboCop::Cop::Base private - # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_default_value_argument.rb:84 + # pkg:gem/rubocop#lib/rubocop/cop/lint/useless_default_value_argument.rb:86 def hash_without_braces?(node); end end @@ -26896,16 +27057,30 @@ class RuboCop::Cop::Lint::Utils::NilReceiverChecker # pkg:gem/rubocop#lib/rubocop/cop/lint/utils/nil_receiver_checker.rb:24 def _cant_be_nil?(node, receiver); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/utils/nil_receiver_checker.rb:108 + # pkg:gem/rubocop#lib/rubocop/cop/lint/utils/nil_receiver_checker.rb:136 + def csend_root_receiver(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/utils/nil_receiver_checker.rb:126 def else_branch?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/utils/nil_receiver_checker.rb:112 + # pkg:gem/rubocop#lib/rubocop/cop/lint/utils/nil_receiver_checker.rb:130 def find_top_if(node); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/utils/nil_receiver_checker.rb:81 + # pkg:gem/rubocop#lib/rubocop/cop/lint/utils/nil_receiver_checker.rb:109 + def non_nil_condition?(condition, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/utils/nil_receiver_checker.rb:79 def non_nil_method?(method_name); end - # pkg:gem/rubocop#lib/rubocop/cop/lint/utils/nil_receiver_checker.rb:86 + # Whether control reaches `node` by falling through its left siblings rather than by + # a non-sequential entry. A `resbody` is entered via an exception, the `ensure` branch + # runs even after a partway raise, and the `else` arm of an `if/elsif` chain is reached by + # branching (its `if/case` siblings are walked via parent recursion instead). + # + # pkg:gem/rubocop#lib/rubocop/cop/lint/utils/nil_receiver_checker.rb:119 + def sequentially_reached?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/lint/utils/nil_receiver_checker.rb:84 def sole_condition_of_parent_if?(node); end end @@ -28468,10 +28643,10 @@ class RuboCop::Cop::MultilineLiteralBraceCorrector # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:40 def corrector; end - # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:94 + # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:90 def last_element_range_with_trailing_comma(node); end - # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:103 + # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:99 def last_element_trailing_comma_range(node); end # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:40 @@ -28480,13 +28655,13 @@ class RuboCop::Cop::MultilineLiteralBraceCorrector # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:40 def processed_source; end - # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:90 + # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:86 def remove_trailing_content_of_comment(corrector, range); end - # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:80 + # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:76 def select_content_to_be_inserted_after_last_element(corrector, node); end - # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:73 + # pkg:gem/rubocop#lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb:69 def use_heredoc_argument_method_chain?(parent); end class << self @@ -29492,7 +29667,7 @@ end # @_foo = calculate_expensive_thing # end # -# @example EnforcedStyleForLeadingUnderscores :optional +# @example EnforcedStyleForLeadingUnderscores: optional # # bad # def foo # @something ||= calculate_expensive_thing @@ -30589,7 +30764,7 @@ class RuboCop::Cop::Offense # @return [Integer] # comparison result # - # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:237 + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:245 def <=>(other); end # @api public @@ -30597,22 +30772,22 @@ class RuboCop::Cop::Offense # @return [Boolean] # returns `true` if two offenses contain same attributes # - # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:218 + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:226 def ==(other); end # @api private # - # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:167 + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:175 def column; end # @api private # - # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:177 + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:185 def column_length; end # @api private # - # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:201 + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:209 def column_range; end # @api public @@ -30636,7 +30811,7 @@ class RuboCop::Cop::Offense # whether this offense can be automatically corrected via autocorrect. # This includes todo comments, for example when requested with `--disable-uncorrectable`. # - # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:108 + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:116 def correctable?; end # @api public @@ -30647,7 +30822,7 @@ class RuboCop::Cop::Offense # whether this offense is automatically corrected via # autocorrect or a todo. # - # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:119 + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:127 def corrected?; end # @api public @@ -30657,7 +30832,7 @@ class RuboCop::Cop::Offense # @return [Boolean] # whether this offense is automatically disabled via a todo. # - # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:129 + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:137 def corrected_with_todo?; end # @api public @@ -30678,18 +30853,18 @@ class RuboCop::Cop::Offense # whether this offense was locally disabled with a # disable or todo where it occurred. # - # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:140 + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:148 def disabled?; end - # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:224 + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:232 def eql?(other); end # @api private # - # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:186 + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:194 def first_line; end - # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:226 + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:234 def hash; end # @api public @@ -30697,22 +30872,22 @@ class RuboCop::Cop::Offense # @return [Parser::Source::Range] # the range of the code that is highlighted # - # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:148 + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:156 def highlighted_area; end # @api private # - # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:196 + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:204 def last_column; end # @api private # - # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:191 + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:199 def last_line; end # @api private # - # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:162 + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:170 def line; end # @api public @@ -30728,6 +30903,12 @@ class RuboCop::Cop::Offense # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:28 def location; end + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:101 + def marshal_dump; end + + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:105 + def marshal_load(array); end + # @api public # # @!attribute [r] message @@ -30747,7 +30928,7 @@ class RuboCop::Cop::Offense # outputting column numbers, we want them to start at 1. One # reason is that editors, such as Emacs, expect this. # - # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:210 + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:218 def real_column; end # @api public @@ -30761,7 +30942,7 @@ class RuboCop::Cop::Offense # @api private # - # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:172 + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:180 def source_line; end # @api private @@ -30772,7 +30953,7 @@ class RuboCop::Cop::Offense # @api private # This is just for debugging purpose. # - # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:155 + # pkg:gem/rubocop#lib/rubocop/cop/offense.rb:163 def to_s; end end @@ -31372,24 +31553,24 @@ class RuboCop::Cop::Registry # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:51 def initialize(cops = T.unsafe(nil), options = T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:232 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:228 def ==(other); end - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:97 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:92 def contains_cop_matching?(names); end - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:179 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:174 def cops; end - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:224 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:220 def cops_for_department(department); end # @return [Boolean] Checks if given name is department # - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:93 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:88 def department?(name); end - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:147 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:142 def department_missing?(badge, name); end # @return [Array] list of departments for current cops. @@ -31397,22 +31578,22 @@ class RuboCop::Cop::Registry # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:72 def departments; end - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:193 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:188 def disabled(config); end # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:67 def dismiss(cop); end - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:247 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:243 def each(&block); end - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:189 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:184 def enabled(config); end - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:197 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:192 def enabled?(cop, config); end - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:213 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:208 def enabled_pending_cop?(cop_cfg, config); end # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:63 @@ -31421,33 +31602,33 @@ class RuboCop::Cop::Registry # @param [String] cop_name # @return [Class, nil] # - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:253 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:249 def find_by_cop_name(cop_name); end # When a cop name is given returns a single-element array with the cop class. # When a department name is given returns an array with all the cop classes # for that department. # - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:260 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:258 def find_cops_by_directive(directive); end - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:265 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:263 def freeze; end - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:184 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:179 def length; end - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:220 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:215 def names; end - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:228 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:224 def names_for_department(department); end # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:49 def options; end - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:151 - def print_warning(name, path); end + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:146 + def print_department_missing_warning(name, path); end # Convert a user provided cop name into a properly namespaced name # @@ -31482,26 +31663,32 @@ class RuboCop::Cop::Registry # # @return [String] Qualified cop name # - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:133 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:128 def qualified_cop_name(name, path, warn: T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:166 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:161 def qualify_badge(badge); end - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:243 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:239 def select(&block); end - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:236 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:232 def sort!; end # @return [Hash{String => Array}] # - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:174 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:169 def to_h; end - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:159 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:154 def unqualified_cop_names; end + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:49 + def warnings; end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:275 + def warnings?(path); end + # @return [Registry] Cops for that specific department. # # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:78 @@ -31509,18 +31696,21 @@ class RuboCop::Cop::Registry # @return [Registry] Cops not for a specific department. # - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:84 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:83 def without_department(department); end private - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:283 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:285 def clear_enrollment_queue; end - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:279 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:309 + def emit_warning(path, message); end + + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:281 def initialize_copy(reg); end - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:312 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:314 def registered?(badge); end # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:299 @@ -31533,7 +31723,7 @@ class RuboCop::Cop::Registry # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:22 def all; end - # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:274 + # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:272 def global; end # pkg:gem/rubocop#lib/rubocop/cop/registry.rb:44 @@ -32409,7 +32599,7 @@ class RuboCop::Cop::Style::AccessModifierDeclarations < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:248 def correctable_group_offense?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:355 + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:367 def def_source(node, def_nodes); end # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:310 @@ -32418,6 +32608,9 @@ class RuboCop::Cop::Style::AccessModifierDeclarations < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:291 def find_corresponding_def_nodes(node); end + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:358 + def first_comment_or_node_start(node); end + # pkg:gem/rubocop#lib/rubocop/cop/style/access_modifier_declarations.rb:255 def group_style?; end @@ -32807,10 +33000,10 @@ class RuboCop::Cop::Style::AndOr < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:108 def correct_setter(node, corrector); end - # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:143 + # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:144 def correctable_send?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:135 + # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:136 def keep_operator_precedence(corrector, node); end # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:91 @@ -32822,7 +33015,7 @@ class RuboCop::Cop::Style::AndOr < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:66 def process_logical_operator(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:147 + # pkg:gem/rubocop#lib/rubocop/cop/style/and_or.rb:148 def whitespace_before_arg(node); end end @@ -33014,7 +33207,7 @@ class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:265 def classify_send_nodes(def_node, send_nodes, referenced_lvars, forwardable_args); end - # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:558 + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:576 def explicit_block_name?; end # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:183 @@ -33080,7 +33273,7 @@ class RuboCop::Cop::Style::ArgumentsForwarding::SendNodeClassifier # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:416 def initialize(def_node, send_node, referenced_lvars, forwardable_args, **config); end - # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:444 + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:462 def classification; end # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:400 @@ -33089,13 +33282,13 @@ class RuboCop::Cop::Style::ArgumentsForwarding::SendNodeClassifier # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:394 def extract_forwarded_kwrest_arg(param0 = T.unsafe(nil), param1); end - # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:438 + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:450 def forwarded_block_arg; end # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:397 def forwarded_block_arg?(param0 = T.unsafe(nil), param1); end - # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:432 + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:438 def forwarded_kwrest_arg; end # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:426 @@ -33109,63 +33302,63 @@ class RuboCop::Cop::Style::ArgumentsForwarding::SendNodeClassifier private - # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:529 + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:547 def additional_kwargs?; end - # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:525 + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:543 def additional_kwargs_or_forwarded_kwargs?; end - # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:539 + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:557 def allow_offense_for_no_block?; end - # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:510 + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:528 def any_arg_referenced?; end - # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:494 + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:512 def arguments; end - # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:459 + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:477 def can_forward_all?; end - # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:533 + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:551 def forward_additional_kwargs?; end - # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:490 + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:508 def forwarded_rest_and_kwrest_args; end - # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:552 + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:570 def missing_rest_arg_or_kwrest_arg?; end - # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:543 + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:561 def no_additional_args?; end - # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:518 + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:536 def no_post_splat_args?; end - # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:486 + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:504 def offensive_block_forwarding?; end - # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:506 + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:524 def referenced_block_arg?; end - # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:502 + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:520 def referenced_kwrest_arg?; end - # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:498 + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:516 def referenced_rest_arg?; end # def foo(a = 41, ...) is a syntax error in 3.0. # - # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:471 + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:489 def ruby_30_or_lower_optarg?; end - # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:475 + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:493 def ruby_32_only_anonymous_forwarding?; end - # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:482 + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:500 def ruby_32_or_higher_missing_rest_or_kwest?; end - # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:514 + # pkg:gem/rubocop#lib/rubocop/cop/style/arguments_forwarding.rb:532 def target_ruby_version; end end @@ -34084,112 +34277,109 @@ class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base private - # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:485 + # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:477 def array_or_range?(node); end # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:216 def autocorrect(corrector, node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:489 + # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:481 def begin_required?(block_node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:244 + # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:242 def braces_for_chaining_message(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:430 + # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:420 def braces_for_chaining_style?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:256 + # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:254 def braces_required_message(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:407 + # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:397 def braces_required_method?(method_name); end - # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:411 + # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:401 def braces_required_methods; end - # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:440 - def braces_style?(node); end - - # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:444 + # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:428 def correction_would_break_code?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:332 + # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:330 def end_of_chain(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:454 + # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:442 def functional_block?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:450 + # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:434 def functional_method?(method_name); end - # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:350 + # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:438 + def functional_methods; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:348 def get_blocks(node, &block); end - # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:415 + # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:405 def line_count_based_block_style?(node); end # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:226 def line_count_based_message(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:260 + # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:258 def message(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:308 + # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:306 def move_comment_before_block(corrector, comment, block_node, closing_brace); end - # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:462 + # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:450 def procedural_method?(method_name); end - # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:458 + # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:454 + def procedural_methods; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:446 def procedural_oneliners_may_have_braces?; end - # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:375 + # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:374 def proper_block_style?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:339 + # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:337 def remove_trailing_whitespace(corrector, range, comment); end - # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:271 + # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:269 def replace_braces_with_do_end(corrector, loc); end - # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:287 + # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:285 def replace_do_end_with_braces(corrector, node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:387 + # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:390 def require_do_end?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:478 + # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:470 def return_value_of_scope?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:466 + # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:458 def return_value_used?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:419 + # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:409 def semantic_block_style?(node); end # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:234 def semantic_message(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:495 + # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:487 def single_argument_operator_method?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:322 + # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:320 def source_range_before_comment(range, comment); end - # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:394 - def special_method?(method_name); end - - # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:400 - def special_method_proper_block_style?(node); end - - # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:304 + # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:302 def whitespace_after?(range, length = T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:300 + # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:298 def whitespace_before?(range); end - # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:345 + # pkg:gem/rubocop#lib/rubocop/cop/style/block_delimiters.rb:343 def with_block?(node); end class << self @@ -34206,27 +34396,27 @@ RuboCop::Cop::Style::BlockDelimiters::BRACES_REQUIRED_MESSAGE = T.let(T.unsafe(n # Corrector to correct conditional assignment in `case` statements. # -# pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:612 +# pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:608 class RuboCop::Cop::Style::CaseCorrector extend ::RuboCop::Cop::Style::ConditionalAssignmentHelper extend ::RuboCop::Cop::Style::ConditionalCorrectorHelper class << self - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:617 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:613 def correct(corrector, cop, node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:627 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:623 def move_assignment_inside_condition(corrector, node); end private - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:647 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:643 def extract_branches(case_node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:641 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:637 def extract_tail_branches(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:657 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:653 def move_branch_inside_condition(corrector, branch, condition, assignment, column); end end end @@ -34982,36 +35172,45 @@ class RuboCop::Cop::Style::CollectionCompact < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # pkg:gem/rubocop#lib/rubocop/cop/style/collection_compact.rb:86 + # pkg:gem/rubocop#lib/rubocop/cop/style/collection_compact.rb:98 def grep_v_with_nil?(param0 = T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/cop/style/collection_compact.rb:101 + # pkg:gem/rubocop#lib/rubocop/cop/style/collection_compact.rb:113 def on_csend(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/collection_compact.rb:90 + # pkg:gem/rubocop#lib/rubocop/cop/style/collection_compact.rb:102 def on_send(node); end # pkg:gem/rubocop#lib/rubocop/cop/style/collection_compact.rb:65 def reject_method?(param0 = T.unsafe(nil)); end + # pkg:gem/rubocop#lib/rubocop/cop/style/collection_compact.rb:73 + def reject_method_for_numblock_or_itblock?(param0 = T.unsafe(nil)); end + # pkg:gem/rubocop#lib/rubocop/cop/style/collection_compact.rb:58 def reject_method_with_block_pass?(param0 = T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/cop/style/collection_compact.rb:75 + # pkg:gem/rubocop#lib/rubocop/cop/style/collection_compact.rb:81 def select_method?(param0 = T.unsafe(nil)); end + # pkg:gem/rubocop#lib/rubocop/cop/style/collection_compact.rb:90 + def select_method_for_numblock_or_itblock?(param0 = T.unsafe(nil)); end + private - # pkg:gem/rubocop#lib/rubocop/cop/style/collection_compact.rb:129 + # pkg:gem/rubocop#lib/rubocop/cop/style/collection_compact.rb:149 def good_method_name(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/collection_compact.rb:106 + # pkg:gem/rubocop#lib/rubocop/cop/style/collection_compact.rb:130 + def match_block_method?(block_node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/collection_compact.rb:117 def offense_range(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/collection_compact.rb:137 + # pkg:gem/rubocop#lib/rubocop/cop/style/collection_compact.rb:157 def range(begin_pos_node, end_pos_node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/collection_compact.rb:123 + # pkg:gem/rubocop#lib/rubocop/cop/style/collection_compact.rb:143 def to_enum_method?(node); end end @@ -35890,7 +36089,7 @@ RuboCop::Cop::Style::ComparableClamp::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Ar class RuboCop::Cop::Style::ConcatArrayLiterals < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # pkg:gem/rubocop#lib/rubocop/cop/style/concat_array_literals.rb:66 + # pkg:gem/rubocop#lib/rubocop/cop/style/concat_array_literals.rb:68 def on_csend(node); end # pkg:gem/rubocop#lib/rubocop/cop/style/concat_array_literals.rb:34 @@ -35898,13 +36097,13 @@ class RuboCop::Cop::Style::ConcatArrayLiterals < ::RuboCop::Cop::Base private - # pkg:gem/rubocop#lib/rubocop/cop/style/concat_array_literals.rb:70 + # pkg:gem/rubocop#lib/rubocop/cop/style/concat_array_literals.rb:72 def offense_range(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/concat_array_literals.rb:87 + # pkg:gem/rubocop#lib/rubocop/cop/style/concat_array_literals.rb:89 def percent_literals_includes_only_basic_literals?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/concat_array_literals.rb:74 + # pkg:gem/rubocop#lib/rubocop/cop/style/concat_array_literals.rb:76 def preferred_method(node); end end @@ -36011,84 +36210,84 @@ RuboCop::Cop::Style::ConcatArrayLiterals::RESTRICT_ON_SEND = T.let(T.unsafe(nil) # bar = 2 # end # -# pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:207 +# pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:203 class RuboCop::Cop::Style::ConditionalAssignment < ::RuboCop::Cop::Base include ::RuboCop::Cop::Style::ConditionalAssignmentHelper include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:222 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:218 def assignment_type?(param0 = T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:303 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:299 def candidate_condition?(param0 = T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:230 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:226 def on_and_asgn(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:258 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:254 def on_case(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:268 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:264 def on_case_match(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:230 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:226 def on_casgn(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:230 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:226 def on_cvasgn(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:230 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:226 def on_gvasgn(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:244 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:240 def on_if(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:230 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:226 def on_ivasgn(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:230 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:226 def on_lvasgn(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:230 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:226 def on_masgn(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:230 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:226 def on_op_asgn(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:230 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:226 def on_or_asgn(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:238 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:234 def on_send(node); end private - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:309 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:305 def allowed_single_line?(branches); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:383 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:379 def allowed_statements?(branches); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:305 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:301 def allowed_ternary?(assignment); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:313 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:309 def assignment_node(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:360 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:356 def assignment_types_match?(*nodes); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:375 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:371 def autocorrect(corrector, node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:298 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:294 def candidate_node?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:280 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:276 def check_assignment_to_condition(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:366 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:362 def check_node(node, branches); end # If `Layout/LineLength` is enabled, we do not want to introduce an @@ -36099,50 +36298,50 @@ class RuboCop::Cop::Style::ConditionalAssignment < ::RuboCop::Cop::Base # of the longest line + the length of the corrected assignment is # greater than the max configured line length # - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:399 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:395 def correction_exceeds_line_limit?(node, branches); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:422 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:418 def include_ternary?; end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:353 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:349 def lhs_all_match?(branches); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:411 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:407 def longest_line(node, assignment); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:407 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:403 def longest_line_exceeds_line_limit?(node, assignment); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:337 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:333 def move_assignment_inside_condition(corrector, node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:327 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:323 def move_assignment_outside_condition(corrector, node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:418 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:414 def single_line_conditions_only?; end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:349 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:345 def ternary_condition?(node); end end -# pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:215 +# pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:211 RuboCop::Cop::Style::ConditionalAssignment::ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) -# pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:213 +# pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:209 RuboCop::Cop::Style::ConditionalAssignment::ASSIGN_TO_CONDITION_MSG = T.let(T.unsafe(nil), String) -# pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:216 +# pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:212 RuboCop::Cop::Style::ConditionalAssignment::ENABLED = T.let(T.unsafe(nil), String) -# pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:212 +# pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:208 RuboCop::Cop::Style::ConditionalAssignment::MSG = T.let(T.unsafe(nil), String) -# pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:217 +# pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:213 RuboCop::Cop::Style::ConditionalAssignment::SINGLE_LINE_CONDITIONS_ONLY = T.let(T.unsafe(nil), String) -# pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:214 +# pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:210 RuboCop::Cop::Style::ConditionalAssignment::VARIABLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) # Helper module to provide common methods to classes needed for the @@ -36180,7 +36379,7 @@ module RuboCop::Cop::Style::ConditionalAssignmentHelper private - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:106 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:102 def assignment_rhs_exist?(node); end # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:66 @@ -36191,9 +36390,6 @@ module RuboCop::Cop::Style::ConditionalAssignmentHelper # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:79 def lhs_for_send(node); end - - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:102 - def setter_method?(method_name); end end # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:13 @@ -36211,27 +36407,27 @@ RuboCop::Cop::Style::ConditionalAssignmentHelper::KEYWORD = T.let(T.unsafe(nil), # Helper module to provide common methods to ConditionalAssignment # correctors # -# pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:429 +# pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:425 module RuboCop::Cop::Style::ConditionalCorrectorHelper - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:467 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:463 def assignment(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:496 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:492 def correct_branches(corrector, branches); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:473 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:469 def correct_if_branches(corrector, cop, node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:431 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:427 def remove_whitespace_in_branches(corrector, branch, condition, column); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:483 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:479 def replace_branch_assignment(corrector, branch); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:452 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:448 def same_line?(node1, node2); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:456 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:452 def white_space_range(node, column); end end @@ -36330,7 +36526,7 @@ class RuboCop::Cop::Style::Copyright < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/style/copyright.rb:45 def autocorrect(corrector); end - # pkg:gem/rubocop#lib/rubocop/cop/style/copyright.rb:56 + # pkg:gem/rubocop#lib/rubocop/cop/style/copyright.rb:114 def autocorrect_notice; end # pkg:gem/rubocop#lib/rubocop/cop/style/copyright.rb:86 @@ -36340,15 +36536,21 @@ class RuboCop::Cop::Style::Copyright < ::RuboCop::Cop::Base def insert_notice_before(processed_source); end # pkg:gem/rubocop#lib/rubocop/cop/style/copyright.rb:52 + def normalized_autocorrect_notice; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/copyright.rb:110 def notice; end # pkg:gem/rubocop#lib/rubocop/cop/style/copyright.rb:93 def notice_found?(processed_source); end + # pkg:gem/rubocop#lib/rubocop/cop/style/copyright.rb:106 + def notice_regexp; end + # pkg:gem/rubocop#lib/rubocop/cop/style/copyright.rb:79 def shebang_token?(processed_source, token_index); end - # pkg:gem/rubocop#lib/rubocop/cop/style/copyright.rb:60 + # pkg:gem/rubocop#lib/rubocop/cop/style/copyright.rb:61 def verify_autocorrect_notice!; end end @@ -36410,8 +36612,8 @@ end # pkg:gem/rubocop#lib/rubocop/cop/style/data_inheritance.rb:38 RuboCop::Cop::Style::DataInheritance::MSG = T.let(T.unsafe(nil), String) -# Checks for consistent usage of the `DateTime` class over the -# `Time` class. This cop is disabled by default since these classes, +# Checks for consistent usage of the `Time` class over the +# `DateTime` class. This cop is disabled by default since these classes, # although highly overlapping, have particularities that make them not # replaceable in certain situations when dealing with multiple timezones # and/or DST. @@ -37450,16 +37652,20 @@ RuboCop::Cop::Style::EmptyCaseCondition::NOT_SUPPORTED_PARENT_TYPES = T.let(T.un # # The supported styles are: # -# * class_definition (default) - prefer standard class definition over `Class.new` +# * class_keyword (default) - prefer standard class definition over `Class.new` # * class_new - prefer `Class.new` over class definition # # One difference between the two styles is that the `Class.new` form does not make # the subclass name available to the base class's `inherited` callback. -# For this reason, `EnforcedStyle: class_definition` is set as the default style. +# For this reason, `EnforcedStyle: class_keyword` is set as the default style. # Class definitions without a superclass, which are not involved in inheritance, # are not detected. This ensures safe detection regardless of the applied style. # This avoids overlapping responsibilities with the `Lint/EmptyClass` cop. # +# Use `AllowedParentClasses` to permit both styles for specific parent classes. +# For example, adding `StandardError` allows both `Error = Class.new(StandardError)` +# and `class Error < StandardError; end` regardless of the enforced style. +# # @example EnforcedStyle: class_keyword (default) # # bad # FooError = Class.new(StandardError) @@ -37482,33 +37688,47 @@ RuboCop::Cop::Style::EmptyCaseCondition::NOT_SUPPORTED_PARENT_TYPES = T.let(T.un # # good # FooError = Class.new(StandardError) # -# pkg:gem/rubocop#lib/rubocop/cop/style/empty_class_definition.rb:45 +# @example AllowedParentClasses: ['StandardError'] +# # good - allowed regardless of EnforcedStyle +# FooError = Class.new(StandardError) +# +# # good - allowed regardless of EnforcedStyle +# class FooError < StandardError +# end +# +# pkg:gem/rubocop#lib/rubocop/cop/style/empty_class_definition.rb:57 class RuboCop::Cop::Style::EmptyClassDefinition < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # pkg:gem/rubocop#lib/rubocop/cop/style/empty_class_definition.rb:54 + # pkg:gem/rubocop#lib/rubocop/cop/style/empty_class_definition.rb:66 def class_new_assignment(param0 = T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/cop/style/empty_class_definition.rb:58 + # pkg:gem/rubocop#lib/rubocop/cop/style/empty_class_definition.rb:70 def on_casgn(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/empty_class_definition.rb:68 + # pkg:gem/rubocop#lib/rubocop/cop/style/empty_class_definition.rb:81 def on_class(node); end private - # pkg:gem/rubocop#lib/rubocop/cop/style/empty_class_definition.rb:88 + # pkg:gem/rubocop#lib/rubocop/cop/style/empty_class_definition.rb:94 + def allowed_parent_class?(parent_class_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/empty_class_definition.rb:98 + def allowed_parent_classes; end + + # pkg:gem/rubocop#lib/rubocop/cop/style/empty_class_definition.rb:110 def autocorrect_class_definition(corrector, node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/empty_class_definition.rb:80 + # pkg:gem/rubocop#lib/rubocop/cop/style/empty_class_definition.rb:102 def autocorrect_class_new(corrector, node, class_new_node); end end -# pkg:gem/rubocop#lib/rubocop/cop/style/empty_class_definition.rb:49 +# pkg:gem/rubocop#lib/rubocop/cop/style/empty_class_definition.rb:61 RuboCop::Cop::Style::EmptyClassDefinition::MSG_CLASS_KEYWORD = T.let(T.unsafe(nil), String) -# pkg:gem/rubocop#lib/rubocop/cop/style/empty_class_definition.rb:51 +# pkg:gem/rubocop#lib/rubocop/cop/style/empty_class_definition.rb:63 RuboCop::Cop::Style::EmptyClassDefinition::MSG_CLASS_NEW = T.let(T.unsafe(nil), String) # Checks for empty else-clauses, possibly including comments and/or an @@ -40116,25 +40336,25 @@ class RuboCop::Cop::Style::GuardClause < ::RuboCop::Cop::Base private - # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:278 + # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:281 def accepted_form?(node, ending: T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:288 + # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:291 def accepted_if?(node, ending); end - # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:315 + # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:318 def allowed_consecutive_conditionals?; end - # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:268 + # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:271 def and_or_guard_clause?(guard_clause); end - # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:299 + # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:302 def assigned_lvar_used_in_if_branch?(node); end # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:200 def autocorrect(corrector, node, condition, replacement, guard); end - # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:238 + # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:241 def autocorrect_heredoc_argument(corrector, node, heredoc_node, leave_branch, guard); end # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:149 @@ -40149,25 +40369,25 @@ class RuboCop::Cop::Style::GuardClause < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:226 def find_heredoc_argument(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:260 + # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:263 def guard_clause_source(guard_clause); end # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:222 def heredoc?(argument); end - # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:251 + # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:254 def range_of_branch_to_remove(node, guard); end # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:178 def register_offense(node, scope_exiting_keyword, conditional_keyword, guard = T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:311 + # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:314 def remove_whole_lines(corrector, range); end - # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:273 + # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:276 def too_long_for_single_line?(node, example); end - # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:282 + # pkg:gem/rubocop#lib/rubocop/cop/style/guard_clause.rb:285 def trivial?(node); end end @@ -40682,39 +40902,44 @@ RuboCop::Cop::Style::HashLikeCase::MSG = T.let(T.unsafe(nil), String) # # good # hash.fetch(key) # -# pkg:gem/rubocop#lib/rubocop/cop/style/hash_lookup_method.rb:44 +# @example AllowedReceivers: ['Rails.cache'] +# # good +# Rails.cache.fetch(name, options) { block } +# +# pkg:gem/rubocop#lib/rubocop/cop/style/hash_lookup_method.rb:48 class RuboCop::Cop::Style::HashLookupMethod < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::AllowedReceivers extend ::RuboCop::Cop::AutoCorrector - # pkg:gem/rubocop#lib/rubocop/cop/style/hash_lookup_method.rb:64 + # pkg:gem/rubocop#lib/rubocop/cop/style/hash_lookup_method.rb:71 def on_csend(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/hash_lookup_method.rb:53 + # pkg:gem/rubocop#lib/rubocop/cop/style/hash_lookup_method.rb:58 def on_send(node); end private - # pkg:gem/rubocop#lib/rubocop/cop/style/hash_lookup_method.rb:85 + # pkg:gem/rubocop#lib/rubocop/cop/style/hash_lookup_method.rb:94 def correct_brackets_to_fetch(corrector, node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/hash_lookup_method.rb:77 + # pkg:gem/rubocop#lib/rubocop/cop/style/hash_lookup_method.rb:84 def correct_fetch_to_brackets(corrector, node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/hash_lookup_method.rb:68 + # pkg:gem/rubocop#lib/rubocop/cop/style/hash_lookup_method.rb:75 def offense_for_brackets?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/hash_lookup_method.rb:73 + # pkg:gem/rubocop#lib/rubocop/cop/style/hash_lookup_method.rb:80 def offense_for_fetch?(node); end end -# pkg:gem/rubocop#lib/rubocop/cop/style/hash_lookup_method.rb:48 +# pkg:gem/rubocop#lib/rubocop/cop/style/hash_lookup_method.rb:53 RuboCop::Cop::Style::HashLookupMethod::BRACKET_MSG = T.let(T.unsafe(nil), String) -# pkg:gem/rubocop#lib/rubocop/cop/style/hash_lookup_method.rb:49 +# pkg:gem/rubocop#lib/rubocop/cop/style/hash_lookup_method.rb:54 RuboCop::Cop::Style::HashLookupMethod::FETCH_MSG = T.let(T.unsafe(nil), String) -# pkg:gem/rubocop#lib/rubocop/cop/style/hash_lookup_method.rb:51 +# pkg:gem/rubocop#lib/rubocop/cop/style/hash_lookup_method.rb:56 RuboCop::Cop::Style::HashLookupMethod::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for usages of `Hash#reject`, `Hash#select`, and `Hash#filter` methods @@ -41274,24 +41499,24 @@ RuboCop::Cop::Style::IdenticalConditionalBranches::MSG = T.let(T.unsafe(nil), St # Corrector to correct conditional assignment in `if` statements. # -# pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:565 +# pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:561 class RuboCop::Cop::Style::IfCorrector extend ::RuboCop::Cop::Style::ConditionalAssignmentHelper extend ::RuboCop::Cop::Style::ConditionalCorrectorHelper class << self - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:570 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:566 def correct(corrector, cop, node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:574 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:570 def move_assignment_inside_condition(corrector, node); end private - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:588 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:584 def extract_tail_branches(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:595 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:591 def move_branch_inside_condition(corrector, branch, condition, assignment, column); end end end @@ -41361,29 +41586,29 @@ class RuboCop::Cop::Style::IfInsideElse < ::RuboCop::Cop::Base private - # pkg:gem/rubocop#lib/rubocop/cop/style/if_inside_else.rb:146 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_inside_else.rb:155 def allow_if_modifier?; end - # pkg:gem/rubocop#lib/rubocop/cop/style/if_inside_else.rb:142 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_inside_else.rb:151 def allow_if_modifier_in_else_branch?(else_branch); end - # pkg:gem/rubocop#lib/rubocop/cop/style/if_inside_else.rb:87 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_inside_else.rb:88 def autocorrect(corrector, node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/if_inside_else.rb:111 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_inside_else.rb:139 + def comments_between_else_and_if?(node, else_branch); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/if_inside_else.rb:112 def correct_to_elsif_from_if_inside_else_form(corrector, node, condition); end - # pkg:gem/rubocop#lib/rubocop/cop/style/if_inside_else.rb:102 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_inside_else.rb:103 def correct_to_elsif_from_modifier_form(corrector, node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/if_inside_else.rb:131 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_inside_else.rb:128 def find_end_range(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/if_inside_else.rb:138 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_inside_else.rb:135 def if_condition_range(node, condition); end - - # pkg:gem/rubocop#lib/rubocop/cop/style/if_inside_else.rb:127 - def then?(node); end end # pkg:gem/rubocop#lib/rubocop/cop/style/if_inside_else.rb:65 @@ -41473,100 +41698,103 @@ class RuboCop::Cop::Style::IfUnlessModifier < ::RuboCop::Cop::Base private - # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:190 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:191 def allowed_patterns; end - # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:287 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:284 + def another_modifier_if_on_same_line?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:298 def another_statement_on_same_line?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:151 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:152 def autocorrect(corrector, node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:277 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:278 def collection_from_ancestor(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:341 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:352 def comment_on_node_line(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:125 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:126 def defined_argument_is_undefined?(if_node, defined_node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:117 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:118 def defined_nodes(condition); end - # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:113 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:114 def endless_method?(body); end - # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:328 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:339 def extract_heredoc_from(last_argument); end - # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:270 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:271 def find_containing_collection(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:234 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:235 def line_length_enabled_at_line?(line); end - # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:143 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:144 def message(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:247 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:248 def multiline_inside_collection?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:238 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:239 def named_capture_in_condition?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:242 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:243 def non_eligible_node?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:283 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:294 def non_simple_if_unless?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:135 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:136 def pattern_matching_nodes(condition); end - # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:345 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:356 def remove_comment(corrector, _node, comment); end - # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:335 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:346 def remove_heredoc(corrector, heredoc); end - # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:160 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:161 def replacement_for_modifier_form(corrector, node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:266 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:267 def shares_line_with?(inner, node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:254 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:255 def sibling_if_shares_line?(child, node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:321 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:332 def to_modifier_form_with_move_comment(node, indentation, comment); end - # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:301 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:312 def to_normal_form(node, indentation); end - # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:309 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:320 def to_normal_form_with_heredoc(node, indentation, heredoc); end - # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:184 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:185 def too_long_due_to_comment_after_modifier?(node, comment); end - # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:179 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:180 def too_long_due_to_modifier?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:217 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:218 def too_long_line_based_on_allow_cop_directives?(range, line); end - # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:225 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:226 def too_long_line_based_on_allow_uri?(line); end - # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:208 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:209 def too_long_line_based_on_config?(range, line); end - # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:195 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:196 def too_long_single_line?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:259 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_unless_modifier.rb:260 def unwrap_begin(node); end class << self @@ -41743,13 +41971,13 @@ class RuboCop::Cop::Style::IfWithSemicolon < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/style/if_with_semicolon.rb:55 def autocorrect(corrector, node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/if_with_semicolon.rb:104 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_with_semicolon.rb:106 def build_else_branch(second_condition); end - # pkg:gem/rubocop#lib/rubocop/cop/style/if_with_semicolon.rb:95 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_with_semicolon.rb:97 def build_expression(expr); end - # pkg:gem/rubocop#lib/rubocop/cop/style/if_with_semicolon.rb:86 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_with_semicolon.rb:88 def correct_elsif(node); end # pkg:gem/rubocop#lib/rubocop/cop/style/if_with_semicolon.rb:42 @@ -41758,7 +41986,7 @@ class RuboCop::Cop::Style::IfWithSemicolon < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/style/if_with_semicolon.rb:77 def replacement(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/if_with_semicolon.rb:124 + # pkg:gem/rubocop#lib/rubocop/cop/style/if_with_semicolon.rb:126 def require_argument_parentheses?(node); end # pkg:gem/rubocop#lib/rubocop/cop/style/if_with_semicolon.rb:63 @@ -42208,13 +42436,13 @@ class RuboCop::Cop::Style::IpAddresses < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/style/ip_addresses.rb:50 def allowed_addresses; end - # pkg:gem/rubocop#lib/rubocop/cop/style/ip_addresses.rb:55 + # pkg:gem/rubocop#lib/rubocop/cop/style/ip_addresses.rb:54 def potential_ip?(str); end - # pkg:gem/rubocop#lib/rubocop/cop/style/ip_addresses.rb:68 + # pkg:gem/rubocop#lib/rubocop/cop/style/ip_addresses.rb:67 def starts_with_hex_or_colon?(str); end - # pkg:gem/rubocop#lib/rubocop/cop/style/ip_addresses.rb:64 + # pkg:gem/rubocop#lib/rubocop/cop/style/ip_addresses.rb:63 def too_long?(str); end end @@ -43720,7 +43948,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::RequireParentheses # pkg:gem/rubocop#lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb:31 def eligible_for_parentheses_omission?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb:49 + # pkg:gem/rubocop#lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb:51 def ignored_macro?(node); end # pkg:gem/rubocop#lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb:39 @@ -43729,7 +43957,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::RequireParentheses # pkg:gem/rubocop#lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb:35 def included_macros_list; end - # pkg:gem/rubocop#lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb:43 + # pkg:gem/rubocop#lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb:45 def matches_included_macro_pattern?(method_name); end # pkg:gem/rubocop#lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb:14 @@ -44580,6 +44808,12 @@ RuboCop::Cop::Style::ModuleFunction::MODULE_FUNCTION_MSG = T.let(T.unsafe(nil), # array, while `method_defined?` will do direct method lookup, which is much # faster and consumes less memory. # +# NOTE: `constants.include?` is not handled by this cop because +# `Module#const_defined?` has different lookup behavior than +# `Module#constants` - `const_defined?` searches up to `Object` +# (top-level constants like `String`, `Integer`, etc.) while +# `constants` does not, which can cause behavior changes after autocorrection. +# # @example # # bad # Array.instance_methods.include?(:size) @@ -44595,61 +44829,51 @@ RuboCop::Cop::Style::ModuleFunction::MODULE_FUNCTION_MSG = T.let(T.unsafe(nil), # # # bad # Array.class_variables.include?(:foo) -# Array.constants.include?(:foo) # Array.private_instance_methods.include?(:foo) # Array.protected_instance_methods.include?(:foo) # Array.public_instance_methods.include?(:foo) -# Array.included_modules.include?(:foo) # # # good # Array.class_variable_defined?(:foo) -# Array.const_defined?(:foo) # Array.private_method_defined?(:foo) # Array.protected_method_defined?(:foo) # Array.public_method_defined?(:foo) -# Array.include?(:foo) -# -# @example AllowedMethods: [included_modules] # -# # good -# Array.included_modules.include?(:foo) -# -# pkg:gem/rubocop#lib/rubocop/cop/style/module_member_existence_check.rb:50 +# pkg:gem/rubocop#lib/rubocop/cop/style/module_member_existence_check.rb:47 class RuboCop::Cop::Style::ModuleMemberExistenceCheck < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods extend ::RuboCop::Cop::AutoCorrector - # pkg:gem/rubocop#lib/rubocop/cop/style/module_member_existence_check.rb:57 + # pkg:gem/rubocop#lib/rubocop/cop/style/module_member_existence_check.rb:53 def module_member_inclusion?(param0 = T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/cop/style/module_member_existence_check.rb:93 + # pkg:gem/rubocop#lib/rubocop/cop/style/module_member_existence_check.rb:86 def on_csend(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/module_member_existence_check.rb:80 + # pkg:gem/rubocop#lib/rubocop/cop/style/module_member_existence_check.rb:74 def on_send(node); end private - # pkg:gem/rubocop#lib/rubocop/cop/style/module_member_existence_check.rb:97 + # pkg:gem/rubocop#lib/rubocop/cop/style/module_member_existence_check.rb:90 def replacement_for(node, parent); end - # pkg:gem/rubocop#lib/rubocop/cop/style/module_member_existence_check.rb:108 + # pkg:gem/rubocop#lib/rubocop/cop/style/module_member_existence_check.rb:101 def simple_method_argument?(node); end end -# pkg:gem/rubocop#lib/rubocop/cop/style/module_member_existence_check.rb:74 +# pkg:gem/rubocop#lib/rubocop/cop/style/module_member_existence_check.rb:68 RuboCop::Cop::Style::ModuleMemberExistenceCheck::METHODS_WITHOUT_INHERIT_PARAM = T.let(T.unsafe(nil), Set) -# pkg:gem/rubocop#lib/rubocop/cop/style/module_member_existence_check.rb:75 +# pkg:gem/rubocop#lib/rubocop/cop/style/module_member_existence_check.rb:69 RuboCop::Cop::Style::ModuleMemberExistenceCheck::METHODS_WITH_INHERIT_PARAM = T.let(T.unsafe(nil), Set) -# pkg:gem/rubocop#lib/rubocop/cop/style/module_member_existence_check.rb:64 +# pkg:gem/rubocop#lib/rubocop/cop/style/module_member_existence_check.rb:60 RuboCop::Cop::Style::ModuleMemberExistenceCheck::METHOD_REPLACEMENTS = T.let(T.unsafe(nil), Hash) -# pkg:gem/rubocop#lib/rubocop/cop/style/module_member_existence_check.rb:54 +# pkg:gem/rubocop#lib/rubocop/cop/style/module_member_existence_check.rb:50 RuboCop::Cop::Style::ModuleMemberExistenceCheck::MSG = T.let(T.unsafe(nil), String) -# pkg:gem/rubocop#lib/rubocop/cop/style/module_member_existence_check.rb:78 +# pkg:gem/rubocop#lib/rubocop/cop/style/module_member_existence_check.rb:72 RuboCop::Cop::Style::ModuleMemberExistenceCheck::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for chaining of a block after another block that spans @@ -45204,6 +45428,9 @@ class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector + # pkg:gem/rubocop#lib/rubocop/cop/style/mutable_constant.rb:140 + def on_assignment(value); end + # pkg:gem/rubocop#lib/rubocop/cop/style/mutable_constant.rb:127 def on_casgn(node); end @@ -45236,9 +45463,6 @@ class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/style/mutable_constant.rb:183 def mutable_literal?(value); end - # pkg:gem/rubocop#lib/rubocop/cop/style/mutable_constant.rb:140 - def on_assignment(value); end - # pkg:gem/rubocop#lib/rubocop/cop/style/mutable_constant.rb:203 def requires_parentheses?(node); end @@ -46207,10 +46431,10 @@ class RuboCop::Cop::Style::NonNilCheck < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/style/non_nil_check.rb:123 def autocorrect_comparison(corrector, node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/non_nil_check.rb:137 + # pkg:gem/rubocop#lib/rubocop/cop/style/non_nil_check.rb:131 def autocorrect_non_nil(corrector, node, inner_node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/non_nil_check.rb:145 + # pkg:gem/rubocop#lib/rubocop/cop/style/non_nil_check.rb:139 def autocorrect_unless_nil(corrector, node, receiver); end # pkg:gem/rubocop#lib/rubocop/cop/style/non_nil_check.rb:119 @@ -46219,7 +46443,7 @@ class RuboCop::Cop::Style::NonNilCheck < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/style/non_nil_check.rb:110 def message(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/non_nil_check.rb:150 + # pkg:gem/rubocop#lib/rubocop/cop/style/non_nil_check.rb:144 def nil_comparison_style; end # pkg:gem/rubocop#lib/rubocop/cop/style/non_nil_check.rb:88 @@ -46749,30 +46973,50 @@ RuboCop::Cop::Style::ObjectThen::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # classes that logically belong with the main class. # # @example -# # bad +# # bad - Multiple top-level classes # class Foo # end # # class Bar # end # -# # bad +# # bad - Multiple top-level modules +# module Foo +# end +# +# module Bar +# end +# +# # bad - A top-level class and a top-level module # class Foo # end # # module Bar # end # -# # good +# # good - A single top-level class # class Foo # end # -# # good +# # good - A single top-level module +# module Foo +# end +# +# # good - Nested classes within a single top-level class # class Foo # class Bar # end # end # +# # good - Multiple classes within a single top-level module +# module Foo +# class Bar +# end +# +# class Baz +# end +# end +# # @example AllowedClasses: ['AllowedClass'] # # good # class Foo @@ -46781,35 +47025,35 @@ RuboCop::Cop::Style::ObjectThen::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # class AllowedClass # end # -# pkg:gem/rubocop#lib/rubocop/cop/style/one_class_per_file.rb:48 +# pkg:gem/rubocop#lib/rubocop/cop/style/one_class_per_file.rb:68 class RuboCop::Cop::Style::OneClassPerFile < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp - # pkg:gem/rubocop#lib/rubocop/cop/style/one_class_per_file.rb:57 + # pkg:gem/rubocop#lib/rubocop/cop/style/one_class_per_file.rb:77 def on_class(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/one_class_per_file.rb:61 + # pkg:gem/rubocop#lib/rubocop/cop/style/one_class_per_file.rb:81 def on_module(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/one_class_per_file.rb:53 + # pkg:gem/rubocop#lib/rubocop/cop/style/one_class_per_file.rb:73 def on_new_investigation; end private - # pkg:gem/rubocop#lib/rubocop/cop/style/one_class_per_file.rb:85 + # pkg:gem/rubocop#lib/rubocop/cop/style/one_class_per_file.rb:105 def allowed_class?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/one_class_per_file.rb:89 + # pkg:gem/rubocop#lib/rubocop/cop/style/one_class_per_file.rb:109 def allowed_classes; end - # pkg:gem/rubocop#lib/rubocop/cop/style/one_class_per_file.rb:67 + # pkg:gem/rubocop#lib/rubocop/cop/style/one_class_per_file.rb:87 def check_top_level(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/one_class_per_file.rb:77 + # pkg:gem/rubocop#lib/rubocop/cop/style/one_class_per_file.rb:97 def top_level_definition?(node); end end -# pkg:gem/rubocop#lib/rubocop/cop/style/one_class_per_file.rb:51 +# pkg:gem/rubocop#lib/rubocop/cop/style/one_class_per_file.rb:71 RuboCop::Cop::Style::OneClassPerFile::MSG = T.let(T.unsafe(nil), String) # Checks for uses of `if/then/else/end` constructs on a single line. @@ -48281,40 +48525,43 @@ class RuboCop::Cop::Style::ReduceToHash < ::RuboCop::Cop::Base private - # pkg:gem/rubocop#lib/rubocop/cop/style/reduce_to_hash.rb:111 + # pkg:gem/rubocop#lib/rubocop/cop/style/reduce_to_hash.rb:127 def accumulator_name(block_node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/reduce_to_hash.rb:106 + # pkg:gem/rubocop#lib/rubocop/cop/style/reduce_to_hash.rb:107 def accumulator_used_in_expressions?(block_node, key, value); end - # pkg:gem/rubocop#lib/rubocop/cop/style/reduce_to_hash.rb:169 + # pkg:gem/rubocop#lib/rubocop/cop/style/reduce_to_hash.rb:185 def adjusted_source(expr_node, block_node); end # pkg:gem/rubocop#lib/rubocop/cop/style/reduce_to_hash.rb:94 def check_offense(node, block_node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/reduce_to_hash.rb:152 + # pkg:gem/rubocop#lib/rubocop/cop/style/reduce_to_hash.rb:168 def do_end_replacement(block_node, body, arg = T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/cop/style/reduce_to_hash.rb:161 + # pkg:gem/rubocop#lib/rubocop/cop/style/reduce_to_hash.rb:177 def element_arg_source(block_node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/reduce_to_hash.rb:178 + # pkg:gem/rubocop#lib/rubocop/cop/style/reduce_to_hash.rb:194 def indent(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/reduce_to_hash.rb:143 + # pkg:gem/rubocop#lib/rubocop/cop/style/reduce_to_hash.rb:159 def named_block_replacement(block_node, body); end - # pkg:gem/rubocop#lib/rubocop/cop/style/reduce_to_hash.rb:116 + # pkg:gem/rubocop#lib/rubocop/cop/style/reduce_to_hash.rb:112 + def nested_match?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/reduce_to_hash.rb:132 def references_variable?(node, name); end - # pkg:gem/rubocop#lib/rubocop/cop/style/reduce_to_hash.rb:120 + # pkg:gem/rubocop#lib/rubocop/cop/style/reduce_to_hash.rb:136 def register_offense(send_node, block_node, key_expr, value_expr); end - # pkg:gem/rubocop#lib/rubocop/cop/style/reduce_to_hash.rb:131 + # pkg:gem/rubocop#lib/rubocop/cop/style/reduce_to_hash.rb:147 def replacement(block_node, key_expr, value_expr); end - # pkg:gem/rubocop#lib/rubocop/cop/style/reduce_to_hash.rb:157 + # pkg:gem/rubocop#lib/rubocop/cop/style/reduce_to_hash.rb:173 def replacement_range(send_node, block_node); end end @@ -50028,39 +50275,42 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base include ::RuboCop::Cop::MatchRange extend ::RuboCop::Cop::AutoCorrector - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_line_continuation.rb:86 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_line_continuation.rb:87 def on_new_investigation; end private - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_line_continuation.rb:218 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_line_continuation.rb:234 def argument_is_method?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_line_continuation.rb:184 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_line_continuation.rb:200 def argument_newline?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_line_continuation.rb:163 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_line_continuation.rb:179 def code_ends_with_continuation?(last_line); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_line_continuation.rb:111 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_line_continuation.rb:113 def ends_with_uncommented_backslash?(range); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_line_continuation.rb:198 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_line_continuation.rb:214 def find_node_for_line(last_line); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_line_continuation.rb:169 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_line_continuation.rb:185 def inside_string_literal?(range, token); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_line_continuation.rb:124 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_line_continuation.rb:126 def inside_string_literal_or_method_with_argument?(range); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_line_continuation.rb:151 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_line_continuation.rb:137 + def inside_string_literal_with_interpolation?(range); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_line_continuation.rb:167 def inspect_end_of_ruby_code_line_continuation; end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_line_continuation.rb:135 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_line_continuation.rb:151 def leading_dot_method_chain_with_blank_line?(range); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_line_continuation.rb:225 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_line_continuation.rb:241 def method_call_with_arguments?(node); end # A method call without parentheses such as the following cannot remove `\`: @@ -50068,22 +50318,22 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base # do_something \ # argument # - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_line_continuation.rb:177 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_line_continuation.rb:193 def method_with_argument?(line_range, current_token, next_token); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_line_continuation.rb:141 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_line_continuation.rb:157 def redundant_line_continuation?(range); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_line_continuation.rb:103 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_line_continuation.rb:104 def require_line_continuation?(range); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_line_continuation.rb:204 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_line_continuation.rb:220 def same_line?(node, line); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_line_continuation.rb:229 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_line_continuation.rb:245 def start_with_arithmetic_operator?(range); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_line_continuation.rb:120 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_line_continuation.rb:122 def string_concatenation?(source_line); end end @@ -50108,6 +50358,9 @@ RuboCop::Cop::Style::RedundantLineContinuation::LINE_CONTINUATION_PATTERN = T.le # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_line_continuation.rb:71 RuboCop::Cop::Style::RedundantLineContinuation::MSG = T.let(T.unsafe(nil), String) +# pkg:gem/rubocop#lib/rubocop/cop/style/redundant_line_continuation.rb:85 +RuboCop::Cop::Style::RedundantLineContinuation::STRING_LITERAL_BEGIN_TOKENS = T.let(T.unsafe(nil), Array) + # Identifies places where `max_by { ... }`, `min_by { ... }`, or # `minmax_by { ... }` can be replaced by `max`, `min`, or `minmax`. # @@ -50193,16 +50446,10 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:31 def allowed_pin_operator?(param0 = T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:333 - def first_send_argument?(param0 = T.unsafe(nil)); end - - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:338 - def first_super_argument?(param0 = T.unsafe(nil)); end - - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:343 - def first_yield_argument?(param0 = T.unsafe(nil)); end + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:344 + def first_call_argument?(param0 = T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:191 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:194 def interpolation?(param0 = T.unsafe(nil)); end # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:33 @@ -50216,7 +50463,7 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base private - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:217 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:220 def allow_in_multiline_conditions?; end # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:68 @@ -50231,43 +50478,46 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:82 def allowed_ternary?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:193 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:196 def argument_of_parenthesized_method_call?(begin_node, node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:347 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:274 + def body_range?(begin_node, node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:349 def call_chain_starts_with_int?(begin_node, send_node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:221 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:224 def call_node?(node); end # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:138 def check(begin_node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:225 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:228 def check_send(begin_node, node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:237 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:240 def check_unary(begin_node, node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:260 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:263 def disallowed_literal?(begin_node, node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:270 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:285 def disallowed_one_line_pattern_matching?(begin_node, node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:353 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:355 def do_end_block_in_method_chain?(begin_node, node); end # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:109 def empty_parentheses?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:153 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:155 def find_offense_message(begin_node, node); end # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:114 def first_arg_begins_with_hash_literal?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:322 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:337 def first_argument?(node); end # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:54 @@ -50276,19 +50526,19 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:123 def in_pattern_matching_in_method_argument?(begin_node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:256 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:259 def keyword_ancestor?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:290 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:305 def keyword_with_redundant_parentheses?(node); end # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:95 def like_method_argument_parentheses?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:211 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:214 def method_call_parentheses_required?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:303 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:318 def method_call_with_redundant_parentheses?(begin_node, node); end # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:130 @@ -50297,25 +50547,25 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:102 def multiline_control_flow_statements?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:246 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:249 def offense(node, msg); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:202 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:205 def oneline_rescue_parentheses_required?(begin_node, node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:318 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:333 def only_begin_arg?(args); end # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:45 def parens_allowed?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:279 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:294 def raised_to_power_negative_numeric?(begin_node, node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:311 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:326 def singular_parenthesized_parent?(begin_node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:252 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:255 def suspect_unary?(node); end # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_parentheses.rb:88 @@ -50354,7 +50604,7 @@ class RuboCop::Cop::Style::RedundantPercentQ < ::RuboCop::Cop::Base private - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_percent_q.rb:98 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_percent_q.rb:101 def acceptable_capital_q?(node); end # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_percent_q.rb:90 @@ -51012,27 +51262,24 @@ RuboCop::Cop::Style::RedundantSelfAssignment::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Style::RedundantSelfAssignmentBranch < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_self_assignment_branch.rb:31 - def bad_method?(param0 = T.unsafe(nil)); end - - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_self_assignment_branch.rb:35 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_self_assignment_branch.rb:30 def on_lvasgn(node); end private - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_self_assignment_branch.rb:59 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_self_assignment_branch.rb:54 def inconvertible_to_modifier?(if_branch, else_branch); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_self_assignment_branch.rb:64 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_self_assignment_branch.rb:59 def multiple_statements?(branch); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_self_assignment_branch.rb:74 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_self_assignment_branch.rb:69 def register_offense(if_node, offense_branch, opposite_branch, keyword); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_self_assignment_branch.rb:70 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_self_assignment_branch.rb:65 def self_assign?(variable, branch); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_self_assignment_branch.rb:53 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_self_assignment_branch.rb:48 def use_if_and_else_branch?(expression); end end @@ -51329,6 +51576,16 @@ RuboCop::Cop::Style::RedundantStringEscape::MSG = T.let(T.unsafe(nil), String) # Therefore, this cop detects and autocorrects redundant `keyword_init: nil` # and `keyword_init: true` in `Struct.new`. # +# This cop is disabled by default because `keyword_init: true` is not purely +# redundant. It changes behavior in the following ways: +# +# - `Struct#keyword_init?` returns `true` instead of `nil`. +# - A `Struct` with `keyword_init: true` accepts a `Hash` argument and +# expands it as keyword arguments, whereas without it the `Hash` is +# treated as a positional argument. +# - `keyword_init: true` raises an `ArgumentError` for positional arguments, +# enforcing keyword-only initialization. +# # @safety # This autocorrect is unsafe because when the value of `keyword_init` changes # from `true` to `nil`, the return value of `Struct#keyword_init?` changes. @@ -51342,48 +51599,48 @@ RuboCop::Cop::Style::RedundantStringEscape::MSG = T.let(T.unsafe(nil), String) # # good # Struct.new(:foo) # -# pkg:gem/rubocop#lib/rubocop/cop/style/redundant_struct_keyword_init.rb:25 +# pkg:gem/rubocop#lib/rubocop/cop/style/redundant_struct_keyword_init.rb:35 class RuboCop::Cop::Style::RedundantStructKeywordInit < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_struct_keyword_init.rb:40 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_struct_keyword_init.rb:50 def keyword_init?(param0 = T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_struct_keyword_init.rb:50 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_struct_keyword_init.rb:60 def keyword_init_false?(param0 = T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_struct_keyword_init.rb:66 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_struct_keyword_init.rb:76 def on_csend(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_struct_keyword_init.rb:54 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_struct_keyword_init.rb:64 def on_send(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_struct_keyword_init.rb:45 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_struct_keyword_init.rb:55 def redundant_keyword_init?(param0 = T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_struct_keyword_init.rb:35 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_struct_keyword_init.rb:45 def struct_new?(param0 = T.unsafe(nil)); end private - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_struct_keyword_init.rb:92 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_struct_keyword_init.rb:102 def range(redundant_keyword_init); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_struct_keyword_init.rb:82 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_struct_keyword_init.rb:92 def register_offense(keyword_init); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_struct_keyword_init.rb:70 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_struct_keyword_init.rb:80 def select_keyword_init_nodes(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_struct_keyword_init.rb:76 + # pkg:gem/rubocop#lib/rubocop/cop/style/redundant_struct_keyword_init.rb:86 def select_redundant_keyword_init_nodes(keyword_init_nodes); end end -# pkg:gem/rubocop#lib/rubocop/cop/style/redundant_struct_keyword_init.rb:29 +# pkg:gem/rubocop#lib/rubocop/cop/style/redundant_struct_keyword_init.rb:39 RuboCop::Cop::Style::RedundantStructKeywordInit::MSG = T.let(T.unsafe(nil), String) -# pkg:gem/rubocop#lib/rubocop/cop/style/redundant_struct_keyword_init.rb:30 +# pkg:gem/rubocop#lib/rubocop/cop/style/redundant_struct_keyword_init.rb:40 RuboCop::Cop::Style::RedundantStructKeywordInit::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Enforces using `//` or `%r` around regular expressions. @@ -51480,63 +51737,69 @@ class RuboCop::Cop::Style::RegexpLiteral < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # pkg:gem/rubocop#lib/rubocop/cop/style/regexp_literal.rb:101 + # pkg:gem/rubocop#lib/rubocop/cop/style/regexp_literal.rb:108 def on_regexp(node); end private - # pkg:gem/rubocop#lib/rubocop/cop/style/regexp_literal.rb:144 + # pkg:gem/rubocop#lib/rubocop/cop/style/regexp_literal.rb:173 def allow_inner_slashes?; end - # pkg:gem/rubocop#lib/rubocop/cop/style/regexp_literal.rb:132 + # pkg:gem/rubocop#lib/rubocop/cop/style/regexp_literal.rb:161 def allowed_mixed_percent_r?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/regexp_literal.rb:122 + # pkg:gem/rubocop#lib/rubocop/cop/style/regexp_literal.rb:151 def allowed_mixed_slash?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/regexp_literal.rb:161 + # pkg:gem/rubocop#lib/rubocop/cop/style/regexp_literal.rb:190 def allowed_omit_parentheses_with_percent_r_literal?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/regexp_literal.rb:126 + # pkg:gem/rubocop#lib/rubocop/cop/style/regexp_literal.rb:155 def allowed_percent_r_literal?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/regexp_literal.rb:118 + # pkg:gem/rubocop#lib/rubocop/cop/style/regexp_literal.rb:147 def allowed_slash_literal?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/regexp_literal.rb:221 + # pkg:gem/rubocop#lib/rubocop/cop/style/regexp_literal.rb:134 + def balanced_delimiters?(text, opening, closing, pattern); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/regexp_literal.rb:250 def calculate_replacement(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/regexp_literal.rb:136 + # pkg:gem/rubocop#lib/rubocop/cop/style/regexp_literal.rb:165 def contains_disallowed_slash?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/regexp_literal.rb:140 + # pkg:gem/rubocop#lib/rubocop/cop/style/regexp_literal.rb:169 def contains_slash?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/regexp_literal.rb:170 + # pkg:gem/rubocop#lib/rubocop/cop/style/regexp_literal.rb:199 def correct_delimiters(node, corrector); end - # pkg:gem/rubocop#lib/rubocop/cop/style/regexp_literal.rb:176 + # pkg:gem/rubocop#lib/rubocop/cop/style/regexp_literal.rb:205 def correct_inner_slashes(node, corrector); end - # pkg:gem/rubocop#lib/rubocop/cop/style/regexp_literal.rb:209 + # pkg:gem/rubocop#lib/rubocop/cop/style/regexp_literal.rb:238 def inner_slash_after_correction(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/regexp_literal.rb:205 + # pkg:gem/rubocop#lib/rubocop/cop/style/regexp_literal.rb:234 def inner_slash_before_correction(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/regexp_literal.rb:213 + # pkg:gem/rubocop#lib/rubocop/cop/style/regexp_literal.rb:242 def inner_slash_for(opening_delimiter); end - # pkg:gem/rubocop#lib/rubocop/cop/style/regexp_literal.rb:192 + # pkg:gem/rubocop#lib/rubocop/cop/style/regexp_literal.rb:221 def inner_slash_indices(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/regexp_literal.rb:148 + # pkg:gem/rubocop#lib/rubocop/cop/style/regexp_literal.rb:177 def node_body(node, include_begin_nodes: T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/cop/style/regexp_literal.rb:157 + # pkg:gem/rubocop#lib/rubocop/cop/style/regexp_literal.rb:127 + def percent_r_delimiters_conflict?(node); end + + # pkg:gem/rubocop#lib/rubocop/cop/style/regexp_literal.rb:186 def preferred_delimiters; end - # pkg:gem/rubocop#lib/rubocop/cop/style/regexp_literal.rb:153 + # pkg:gem/rubocop#lib/rubocop/cop/style/regexp_literal.rb:182 def slash_literal?(node); end end @@ -51546,6 +51809,9 @@ RuboCop::Cop::Style::RegexpLiteral::MSG_USE_PERCENT_R = T.let(T.unsafe(nil), Str # pkg:gem/rubocop#lib/rubocop/cop/style/regexp_literal.rb:98 RuboCop::Cop::Style::RegexpLiteral::MSG_USE_SLASHES = T.let(T.unsafe(nil), String) +# pkg:gem/rubocop#lib/rubocop/cop/style/regexp_literal.rb:101 +RuboCop::Cop::Style::RegexpLiteral::PAIR_DELIMITER_PATTERNS = T.let(T.unsafe(nil), Hash) + # Sort `require` and `require_relative` in alphabetical order. # # @safety @@ -53468,61 +53734,61 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base private - # pkg:gem/rubocop#lib/rubocop/cop/style/sole_nested_conditional.rb:197 + # pkg:gem/rubocop#lib/rubocop/cop/style/sole_nested_conditional.rb:199 def add_parentheses?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/sole_nested_conditional.rb:176 + # pkg:gem/rubocop#lib/rubocop/cop/style/sole_nested_conditional.rb:178 def add_parentheses_if_needed(condition); end - # pkg:gem/rubocop#lib/rubocop/cop/style/sole_nested_conditional.rb:238 + # pkg:gem/rubocop#lib/rubocop/cop/style/sole_nested_conditional.rb:240 def allow_modifier?; end - # pkg:gem/rubocop#lib/rubocop/cop/style/sole_nested_conditional.rb:81 + # pkg:gem/rubocop#lib/rubocop/cop/style/sole_nested_conditional.rb:84 def assigned_variables(condition); end - # pkg:gem/rubocop#lib/rubocop/cop/style/sole_nested_conditional.rb:205 + # pkg:gem/rubocop#lib/rubocop/cop/style/sole_nested_conditional.rb:207 def assignment_in_and?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/sole_nested_conditional.rb:98 + # pkg:gem/rubocop#lib/rubocop/cop/style/sole_nested_conditional.rb:101 def autocorrect(corrector, node, if_branch); end - # pkg:gem/rubocop#lib/rubocop/cop/style/sole_nested_conditional.rb:106 + # pkg:gem/rubocop#lib/rubocop/cop/style/sole_nested_conditional.rb:109 def autocorrect_outer_condition_basic(corrector, node, if_branch); end - # pkg:gem/rubocop#lib/rubocop/cop/style/sole_nested_conditional.rb:150 + # pkg:gem/rubocop#lib/rubocop/cop/style/sole_nested_conditional.rb:152 def autocorrect_outer_condition_modify_form(corrector, node, if_branch); end - # pkg:gem/rubocop#lib/rubocop/cop/style/sole_nested_conditional.rb:168 + # pkg:gem/rubocop#lib/rubocop/cop/style/sole_nested_conditional.rb:170 def chainable_condition(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/sole_nested_conditional.rb:133 + # pkg:gem/rubocop#lib/rubocop/cop/style/sole_nested_conditional.rb:135 def correct_for_basic_condition_style(corrector, node, if_branch); end - # pkg:gem/rubocop#lib/rubocop/cop/style/sole_nested_conditional.rb:159 + # pkg:gem/rubocop#lib/rubocop/cop/style/sole_nested_conditional.rb:161 def correct_for_comment(corrector, node, if_branch); end - # pkg:gem/rubocop#lib/rubocop/cop/style/sole_nested_conditional.rb:123 + # pkg:gem/rubocop#lib/rubocop/cop/style/sole_nested_conditional.rb:125 def correct_for_guard_condition_style(corrector, node, if_branch); end - # pkg:gem/rubocop#lib/rubocop/cop/style/sole_nested_conditional.rb:117 + # pkg:gem/rubocop#lib/rubocop/cop/style/sole_nested_conditional.rb:120 def correct_node(corrector, node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/sole_nested_conditional.rb:89 + # pkg:gem/rubocop#lib/rubocop/cop/style/sole_nested_conditional.rb:92 def offending_branch?(node, branch); end - # pkg:gem/rubocop#lib/rubocop/cop/style/sole_nested_conditional.rb:192 + # pkg:gem/rubocop#lib/rubocop/cop/style/sole_nested_conditional.rb:194 def parenthesize_method?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/sole_nested_conditional.rb:218 + # pkg:gem/rubocop#lib/rubocop/cop/style/sole_nested_conditional.rb:220 def parenthesized_and(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/sole_nested_conditional.rb:228 + # pkg:gem/rubocop#lib/rubocop/cop/style/sole_nested_conditional.rb:230 def parenthesized_and_clause(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/sole_nested_conditional.rb:211 + # pkg:gem/rubocop#lib/rubocop/cop/style/sole_nested_conditional.rb:213 def parenthesized_method_arguments(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/sole_nested_conditional.rb:74 + # pkg:gem/rubocop#lib/rubocop/cop/style/sole_nested_conditional.rb:77 def use_variable_assignment_in_condition?(condition, if_branch); end class << self @@ -54781,7 +55047,7 @@ class RuboCop::Cop::Style::SymbolProc < ::RuboCop::Cop::Base private # pkg:gem/rubocop#lib/rubocop/cop/style/symbol_proc.rb:276 - def allow_comments?; end + def allow_comments?(node); end # pkg:gem/rubocop#lib/rubocop/cop/style/symbol_proc.rb:272 def allow_if_method_has_argument?(send_node); end @@ -54919,36 +55185,36 @@ RuboCop::Cop::Style::TallyMethod::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Corrector to correct conditional assignment in ternary conditions. # -# pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:505 +# pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:501 class RuboCop::Cop::Style::TernaryCorrector extend ::RuboCop::Cop::Style::ConditionalAssignmentHelper extend ::RuboCop::Cop::Style::ConditionalCorrectorHelper class << self - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:510 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:506 def correct(corrector, node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:514 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:510 def move_assignment_inside_condition(corrector, node); end private - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:528 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:524 def correction(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:541 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:537 def element_assignment?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:545 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:541 def extract_branches(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:558 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:554 def move_branch_inside_condition(corrector, branch, assignment); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:553 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:549 def remove_parentheses(corrector, node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:532 + # pkg:gem/rubocop#lib/rubocop/cop/style/conditional_assignment.rb:528 def ternary(node); end end end @@ -55813,12 +56079,15 @@ class RuboCop::Cop::Style::TrailingMethodEndStatement < ::RuboCop::Cop::Base # pkg:gem/rubocop#lib/rubocop/cop/style/trailing_method_end_statement.rb:41 def on_def(node); end + # pkg:gem/rubocop#lib/rubocop/cop/style/trailing_method_end_statement.rb:48 + def on_defs(node); end + private - # pkg:gem/rubocop#lib/rubocop/cop/style/trailing_method_end_statement.rb:55 + # pkg:gem/rubocop#lib/rubocop/cop/style/trailing_method_end_statement.rb:56 def body_and_end_on_same_line?(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/trailing_method_end_statement.rb:51 + # pkg:gem/rubocop#lib/rubocop/cop/style/trailing_method_end_statement.rb:52 def trailing_end?(node); end end @@ -56343,6 +56612,11 @@ RuboCop::Cop::Style::WhileUntilDo::MSG = T.let(T.unsafe(nil), String) # # good # x += 1 while x < 10 # +# # good +# while x < 10 +# y += 1 if x.odd? +# end +# # # bad # until x > 10 # x += 1 @@ -56351,6 +56625,11 @@ RuboCop::Cop::Style::WhileUntilDo::MSG = T.let(T.unsafe(nil), String) # # good # x += 1 until x > 10 # +# # good +# until x > 10 +# y += 1 unless x.even? +# end +# # # bad # x += 100 while x < 500 # a long comment that makes code too long if it were a single line # @@ -56359,21 +56638,26 @@ RuboCop::Cop::Style::WhileUntilDo::MSG = T.let(T.unsafe(nil), String) # x += 100 # end # -# pkg:gem/rubocop#lib/rubocop/cop/style/while_until_modifier.rb:34 +# pkg:gem/rubocop#lib/rubocop/cop/style/while_until_modifier.rb:44 class RuboCop::Cop::Style::WhileUntilModifier < ::RuboCop::Cop::Base include ::RuboCop::Cop::Alignment include ::RuboCop::Cop::LineLengthHelp include ::RuboCop::Cop::StatementModifier extend ::RuboCop::Cop::AutoCorrector - # pkg:gem/rubocop#lib/rubocop/cop/style/while_until_modifier.rb:47 + # pkg:gem/rubocop#lib/rubocop/cop/style/while_until_modifier.rb:57 def on_until(node); end - # pkg:gem/rubocop#lib/rubocop/cop/style/while_until_modifier.rb:40 + # pkg:gem/rubocop#lib/rubocop/cop/style/while_until_modifier.rb:50 def on_while(node); end + + private + + # pkg:gem/rubocop#lib/rubocop/cop/style/while_until_modifier.rb:61 + def non_eligible_body?(body); end end -# pkg:gem/rubocop#lib/rubocop/cop/style/while_until_modifier.rb:38 +# pkg:gem/rubocop#lib/rubocop/cop/style/while_until_modifier.rb:48 RuboCop::Cop::Style::WhileUntilModifier::MSG = T.let(T.unsafe(nil), String) # Checks for array literals made up of word-like @@ -56937,123 +57221,169 @@ end # # pkg:gem/rubocop#lib/rubocop/cop/team.rb:13 class RuboCop::Cop::Team - # pkg:gem/rubocop#lib/rubocop/cop/team.rb:61 + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:64 def initialize(cops, config = T.unsafe(nil), options = T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/cop/team.rb:72 + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:75 def autocorrect?; end - # pkg:gem/rubocop#lib/rubocop/cop/team.rb:57 + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:60 def cops; end - # pkg:gem/rubocop#lib/rubocop/cop/team.rb:76 + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:79 def debug?; end - # pkg:gem/rubocop#lib/rubocop/cop/team.rb:57 + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:60 def errors; end - # pkg:gem/rubocop#lib/rubocop/cop/team.rb:128 + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:125 def external_dependency_checksum; end # @deprecated # - # pkg:gem/rubocop#lib/rubocop/cop/team.rb:120 + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:117 def forces; end # @deprecated. Use investigate # @return Array # - # pkg:gem/rubocop#lib/rubocop/cop/team.rb:82 + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:85 def inspect_file(processed_source); end # @return [Commissioner::InvestigationReport] # - # pkg:gem/rubocop#lib/rubocop/cop/team.rb:91 + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:94 def investigate(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/cop/team.rb:57 + # @return [Array] + # + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:101 + def investigate_fragments(fragments, original:); end + + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:60 def updated_source_file; end - # pkg:gem/rubocop#lib/rubocop/cop/team.rb:59 + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:62 def updated_source_file?; end - # pkg:gem/rubocop#lib/rubocop/cop/team.rb:57 + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:60 def warnings; end private - # pkg:gem/rubocop#lib/rubocop/cop/team.rb:139 - def autocorrect(processed_source, report, original:, offset:); end + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:136 + def autocorrect(processed_source, corrector); end - # pkg:gem/rubocop#lib/rubocop/cop/team.rb:203 - def autocorrect_report(report, offset:, original:); end - - # pkg:gem/rubocop#lib/rubocop/cop/team.rb:158 + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:154 def be_ready; end - # pkg:gem/rubocop#lib/rubocop/cop/team.rb:209 + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:256 def collate_corrections(report, offset:, original:); end - # pkg:gem/rubocop#lib/rubocop/cop/team.rb:225 + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:247 + def collated_corrector(report, offset:, original:); end + + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:276 def each_corrector(report); end - # pkg:gem/rubocop#lib/rubocop/cop/team.rb:277 + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:328 def handle_error(error, location, cop); end - # pkg:gem/rubocop#lib/rubocop/cop/team.rb:269 + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:320 def handle_warning(error, location); end + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:203 + def investigate_fragment(fragment, original, data); end + # @return [Commissioner::InvestigationReport] # - # pkg:gem/rubocop#lib/rubocop/cop/team.rb:172 + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:168 def investigate_partial(cops, processed_source, offset:, original:); end - # pkg:gem/rubocop#lib/rubocop/cop/team.rb:252 + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:173 + def investigate_with_corrector(processed_source, offset:, original:); end + + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:266 + def merge_corrector!(corrector, to_merge, offset:); end + + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:303 def process_errors(file, errors); end - # pkg:gem/rubocop#lib/rubocop/cop/team.rb:166 + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:162 def reset; end # @return [Array] # - # pkg:gem/rubocop#lib/rubocop/cop/team.rb:178 + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:222 def roundup_relevant_cops(processed_source); end - # pkg:gem/rubocop#lib/rubocop/cop/team.rb:194 + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:238 def support_target_rails_version?(cop); end - # pkg:gem/rubocop#lib/rubocop/cop/team.rb:188 + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:232 def support_target_ruby_version?(cop); end - # pkg:gem/rubocop#lib/rubocop/cop/team.rb:240 + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:291 def suppress_clobbering; end - # pkg:gem/rubocop#lib/rubocop/cop/team.rb:246 + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:297 def validate_config; end class << self # @return [Array] needed for the given cops # - # pkg:gem/rubocop#lib/rubocop/cop/team.rb:43 + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:46 def forces_for(cops); end # @return [Team] with cops assembled from the given `cop_classes` # - # pkg:gem/rubocop#lib/rubocop/cop/team.rb:28 + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:31 def mobilize(cop_classes, config, options = T.unsafe(nil)); end # @return [Array] # - # pkg:gem/rubocop#lib/rubocop/cop/team.rb:34 + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:37 def mobilize_cops(cop_classes, config, options = T.unsafe(nil)); end # @return [Team] # - # pkg:gem/rubocop#lib/rubocop/cop/team.rb:15 + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:18 def new(cop_or_classes, config, options = T.unsafe(nil)); end end end +# pkg:gem/rubocop#lib/rubocop/cop/team.rb:14 +class RuboCop::Cop::Team::InvestigationResult < ::Struct + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:14 + def corrector; end + + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:14 + def corrector=(_); end + + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:14 + def report; end + + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:14 + def report=(_); end + + class << self + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:14 + def [](*_arg0); end + + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:14 + def inspect; end + + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:14 + def keyword_init?; end + + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:14 + def members; end + + # pkg:gem/rubocop#lib/rubocop/cop/team.rb:14 + def new(*_arg0); end + end +end + # Common methods shared by TrailingBody cops # # pkg:gem/rubocop#lib/rubocop/cop/mixin/trailing_body.rb:6 @@ -58859,13 +59189,32 @@ module RuboCop::ExcludeLimit # The parameter name given is transformed into a method name (eg. `Max` # becomes `self.max=` and `MinDigits` becomes `self.min_digits=`). # - # pkg:gem/rubocop#lib/rubocop/cop/exclude_limit.rb:10 + # pkg:gem/rubocop#lib/rubocop/cop/exclude_limit.rb:35 def exclude_limit(parameter_name, method_name: T.unsafe(nil)); end private - # pkg:gem/rubocop#lib/rubocop/cop/exclude_limit.rb:22 + # pkg:gem/rubocop#lib/rubocop/cop/exclude_limit.rb:48 def transform(parameter_name); end + + class << self + # Returns the tmp directory path for a given cop, or nil if tmp_dir is not set. + # + # pkg:gem/rubocop#lib/rubocop/cop/exclude_limit.rb:27 + def cop_dir_for(cop_name); end + + # Reads the aggregated exclude limit values for a cop from tmp files. + # Returns a hash like { 'Max' => 81 } or an empty hash if no values were written. + # + # pkg:gem/rubocop#lib/rubocop/cop/exclude_limit.rb:12 + def read_limits(cop_name); end + + # pkg:gem/rubocop#lib/rubocop/cop/exclude_limit.rb:8 + def tmp_dir; end + + # pkg:gem/rubocop#lib/rubocop/cop/exclude_limit.rb:8 + def tmp_dir=(_arg0); end + end end # pkg:gem/rubocop#lib/rubocop/ext/comment.rb:4 @@ -59377,61 +59726,61 @@ class RuboCop::Formatter::DisabledConfigFormatter < ::RuboCop::Formatter::BaseFo # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:90 def command; end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:182 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:185 def cop_config_params(default_cfg, cfg); end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:200 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:203 def default_config(cop_name); end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:244 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:247 def excludes(offending_files, cop_name, parent); end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:215 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:218 def filtered_config(cfg); end # Returns true if the given arr include the given elm or if any of the # given arr is a regexp that matches the given elm. # - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:292 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:295 def include_or_match?(arr, elm); end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:265 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:268 def merge_mode_for_exclude?(cfg); end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:286 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:289 def no_exclude_limit?; end # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:119 def output_cop(cop_name, offense_count); end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:154 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:157 def output_cop_comments(output_buffer, cfg, cop_name, offense_count); end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:204 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:207 def output_cop_config(output_buffer, cfg, cop_name); end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:186 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:189 def output_cop_param_comments(output_buffer, params, default_cfg); end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:234 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:237 def output_exclude_list(output_buffer, offending_files, cop_name); end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:269 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:272 def output_exclude_path(output_buffer, exclude_path, parent); end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:223 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:226 def output_offending_files(output_buffer, cfg, cop_name); end # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:113 def output_offenses; end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:282 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:285 def safe_autocorrect?(config); end # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:133 def set_max(cfg, cop_name); end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:142 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:145 def should_set_max?(cop_name); end # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:82 @@ -59440,10 +59789,10 @@ class RuboCop::Formatter::DisabledConfigFormatter < ::RuboCop::Formatter::BaseFo # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:78 def show_timestamp?; end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:174 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:177 def supports_safe_autocorrect?(cop_class, default_cfg); end - # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:178 + # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:181 def supports_unsafe_autocorrect?(cop_class, default_cfg); end # pkg:gem/rubocop#lib/rubocop/formatter/disabled_config_formatter.rb:109 @@ -60071,10 +60420,10 @@ RuboCop::Formatter::PacmanFormatter::FALLBACK_TERMINAL_WIDTH = T.let(T.unsafe(ni RuboCop::Formatter::PacmanFormatter::GHOST = T.let(T.unsafe(nil), String) # pkg:gem/rubocop#lib/rubocop/formatter/pacman_formatter.rb:18 -RuboCop::Formatter::PacmanFormatter::PACDOT = T.let(T.unsafe(nil), Rainbow::Presenter) +RuboCop::Formatter::PacmanFormatter::PACDOT = T.let(T.unsafe(nil), Rainbow::NullPresenter) # pkg:gem/rubocop#lib/rubocop/formatter/pacman_formatter.rb:17 -RuboCop::Formatter::PacmanFormatter::PACMAN = T.let(T.unsafe(nil), Rainbow::Presenter) +RuboCop::Formatter::PacmanFormatter::PACMAN = T.let(T.unsafe(nil), Rainbow::NullPresenter) # This formatter display dots for files with no offenses and # letters for files with problems in the them. In the end it @@ -60712,15 +61061,15 @@ class RuboCop::OptionArgumentError < ::StandardError; end # # pkg:gem/rubocop#lib/rubocop/options.rb:14 class RuboCop::Options - # pkg:gem/rubocop#lib/rubocop/options.rb:22 + # pkg:gem/rubocop#lib/rubocop/options.rb:24 def initialize; end - # pkg:gem/rubocop#lib/rubocop/options.rb:27 + # pkg:gem/rubocop#lib/rubocop/options.rb:29 def parse(command_line_args); end private - # pkg:gem/rubocop#lib/rubocop/options.rb:236 + # pkg:gem/rubocop#lib/rubocop/options.rb:238 def add_additional_modes(opts); end # the autocorrect command-line arguments map to the autocorrect @options values like so: @@ -60730,77 +61079,77 @@ class RuboCop::Options # --safe-auto-correct - true true - # -A, --auto-correct-all - true - true # - # pkg:gem/rubocop#lib/rubocop/options.rb:141 + # pkg:gem/rubocop#lib/rubocop/options.rb:143 def add_autocorrection_options(opts); end - # pkg:gem/rubocop#lib/rubocop/options.rb:206 + # pkg:gem/rubocop#lib/rubocop/options.rb:208 def add_cache_options(opts); end - # pkg:gem/rubocop#lib/rubocop/options.rb:74 + # pkg:gem/rubocop#lib/rubocop/options.rb:76 def add_check_options(opts); end - # pkg:gem/rubocop#lib/rubocop/options.rb:164 + # pkg:gem/rubocop#lib/rubocop/options.rb:166 def add_config_generation_options(opts); end - # pkg:gem/rubocop#lib/rubocop/options.rb:182 + # pkg:gem/rubocop#lib/rubocop/options.rb:184 def add_cop_selection_csv_option(option, opts); end - # pkg:gem/rubocop#lib/rubocop/options.rb:248 + # pkg:gem/rubocop#lib/rubocop/options.rb:251 def add_general_options(opts); end - # pkg:gem/rubocop#lib/rubocop/options.rb:213 + # pkg:gem/rubocop#lib/rubocop/options.rb:215 def add_lsp_option(opts); end - # pkg:gem/rubocop#lib/rubocop/options.rb:219 + # pkg:gem/rubocop#lib/rubocop/options.rb:221 def add_mcp_option(opts); end - # pkg:gem/rubocop#lib/rubocop/options.rb:106 + # pkg:gem/rubocop#lib/rubocop/options.rb:108 def add_output_options(opts); end - # pkg:gem/rubocop#lib/rubocop/options.rb:261 + # pkg:gem/rubocop#lib/rubocop/options.rb:264 def add_profile_options(opts); end - # pkg:gem/rubocop#lib/rubocop/options.rb:225 + # pkg:gem/rubocop#lib/rubocop/options.rb:227 def add_server_options(opts); end - # pkg:gem/rubocop#lib/rubocop/options.rb:197 + # pkg:gem/rubocop#lib/rubocop/options.rb:199 def add_severity_option(opts); end - # pkg:gem/rubocop#lib/rubocop/options.rb:53 + # pkg:gem/rubocop#lib/rubocop/options.rb:55 def define_options; end - # pkg:gem/rubocop#lib/rubocop/options.rb:271 + # pkg:gem/rubocop#lib/rubocop/options.rb:274 def handle_deprecated_option(old_option, new_option); end # Finds the option in `args` starting with -- and converts it to a symbol, # e.g. [..., '--autocorrect', ...] to :autocorrect. # - # pkg:gem/rubocop#lib/rubocop/options.rb:305 + # pkg:gem/rubocop#lib/rubocop/options.rb:308 def long_opt_symbol(args); end # Sets a value in the @options hash, based on the given long option and its # value, in addition to calling the block if a block is given. # - # pkg:gem/rubocop#lib/rubocop/options.rb:294 + # pkg:gem/rubocop#lib/rubocop/options.rb:297 def option(opts, *args); end - # pkg:gem/rubocop#lib/rubocop/options.rb:310 + # pkg:gem/rubocop#lib/rubocop/options.rb:313 def plugin_feature(file); end - # pkg:gem/rubocop#lib/rubocop/options.rb:276 + # pkg:gem/rubocop#lib/rubocop/options.rb:279 def rainbow; end - # pkg:gem/rubocop#lib/rubocop/options.rb:316 + # pkg:gem/rubocop#lib/rubocop/options.rb:319 def require_feature(file); end # Creates a section of options in order to separate them visually when # using `--help`. # - # pkg:gem/rubocop#lib/rubocop/options.rb:286 + # pkg:gem/rubocop#lib/rubocop/options.rb:289 def section(opts, heading, &_block); end end -# pkg:gem/rubocop#lib/rubocop/options.rb:20 +# pkg:gem/rubocop#lib/rubocop/options.rb:22 RuboCop::Options::DEFAULT_MAXIMUM_EXCLUSION_ITEMS = T.let(T.unsafe(nil), Integer) # pkg:gem/rubocop#lib/rubocop/options.rb:19 @@ -60812,84 +61161,84 @@ RuboCop::Options::E_STDIN_NO_PATH = T.let(T.unsafe(nil), String) # This module contains help texts for command line options. # @api private # -# pkg:gem/rubocop#lib/rubocop/options.rb:519 +# pkg:gem/rubocop#lib/rubocop/options.rb:521 module RuboCop::OptionsHelp; end -# pkg:gem/rubocop#lib/rubocop/options.rb:521 +# pkg:gem/rubocop#lib/rubocop/options.rb:523 RuboCop::OptionsHelp::FORMATTER_OPTION_LIST = T.let(T.unsafe(nil), Array) -# pkg:gem/rubocop#lib/rubocop/options.rb:520 +# pkg:gem/rubocop#lib/rubocop/options.rb:522 RuboCop::OptionsHelp::MAX_EXCL = T.let(T.unsafe(nil), String) -# pkg:gem/rubocop#lib/rubocop/options.rb:523 +# pkg:gem/rubocop#lib/rubocop/options.rb:525 RuboCop::OptionsHelp::TEXT = T.let(T.unsafe(nil), Hash) # Validates option arguments and the options' compatibility with each other. # @api private # -# pkg:gem/rubocop#lib/rubocop/options.rb:334 +# pkg:gem/rubocop#lib/rubocop/options.rb:337 class RuboCop::OptionsValidator - # pkg:gem/rubocop#lib/rubocop/options.rb:372 + # pkg:gem/rubocop#lib/rubocop/options.rb:375 def initialize(options); end - # pkg:gem/rubocop#lib/rubocop/options.rb:493 + # pkg:gem/rubocop#lib/rubocop/options.rb:495 def boolean_or_empty_cache?; end - # pkg:gem/rubocop#lib/rubocop/options.rb:463 + # pkg:gem/rubocop#lib/rubocop/options.rb:466 def disable_parallel_when_invalid_option_combo; end - # pkg:gem/rubocop#lib/rubocop/options.rb:489 + # pkg:gem/rubocop#lib/rubocop/options.rb:491 def except_syntax?; end - # pkg:gem/rubocop#lib/rubocop/options.rb:497 + # pkg:gem/rubocop#lib/rubocop/options.rb:499 def incompatible_options; end - # pkg:gem/rubocop#lib/rubocop/options.rb:476 + # pkg:gem/rubocop#lib/rubocop/options.rb:479 def invalid_arguments_for_parallel; end - # pkg:gem/rubocop#lib/rubocop/options.rb:484 + # pkg:gem/rubocop#lib/rubocop/options.rb:486 def only_includes_redundant_disable?; end - # pkg:gem/rubocop#lib/rubocop/options.rb:404 + # pkg:gem/rubocop#lib/rubocop/options.rb:407 def validate_auto_gen_config; end - # pkg:gem/rubocop#lib/rubocop/options.rb:449 + # pkg:gem/rubocop#lib/rubocop/options.rb:452 def validate_autocorrect; end - # pkg:gem/rubocop#lib/rubocop/options.rb:509 + # pkg:gem/rubocop#lib/rubocop/options.rb:511 def validate_cache_enabled_for_cache_root; end - # pkg:gem/rubocop#lib/rubocop/options.rb:381 + # pkg:gem/rubocop#lib/rubocop/options.rb:384 def validate_compatibility; end - # pkg:gem/rubocop#lib/rubocop/options.rb:376 + # pkg:gem/rubocop#lib/rubocop/options.rb:379 def validate_cop_options; end - # pkg:gem/rubocop#lib/rubocop/options.rb:425 + # pkg:gem/rubocop#lib/rubocop/options.rb:428 def validate_display_only_correctable_and_autocorrect; end - # pkg:gem/rubocop#lib/rubocop/options.rb:417 + # pkg:gem/rubocop#lib/rubocop/options.rb:420 def validate_display_only_failed; end - # pkg:gem/rubocop#lib/rubocop/options.rb:434 + # pkg:gem/rubocop#lib/rubocop/options.rb:437 def validate_display_only_failed_and_display_only_correctable; end - # pkg:gem/rubocop#lib/rubocop/options.rb:501 + # pkg:gem/rubocop#lib/rubocop/options.rb:503 def validate_exclude_limit_option; end - # pkg:gem/rubocop#lib/rubocop/options.rb:443 + # pkg:gem/rubocop#lib/rubocop/options.rb:446 def validate_lsp_and_editor_mode; end class << self # Cop name validation must be done later than option parsing, so it's not # called from within Options. # - # pkg:gem/rubocop#lib/rubocop/options.rb:341 + # pkg:gem/rubocop#lib/rubocop/options.rb:344 def validate_cop_list(names); end private - # pkg:gem/rubocop#lib/rubocop/options.rb:358 + # pkg:gem/rubocop#lib/rubocop/options.rb:361 def format_message_from(name, cop_names); end end end @@ -60902,69 +61251,88 @@ module RuboCop::PathUtil # Returns true for an absolute Unix or Windows path. # - # pkg:gem/rubocop#lib/rubocop/path_util.rb:83 + # pkg:gem/rubocop#lib/rubocop/path_util.rb:95 def absolute?(path); end # Returns true for a glob # - # pkg:gem/rubocop#lib/rubocop/path_util.rb:88 + # pkg:gem/rubocop#lib/rubocop/path_util.rb:100 def glob?(path); end - # pkg:gem/rubocop#lib/rubocop/path_util.rb:118 + # pkg:gem/rubocop#lib/rubocop/path_util.rb:130 def hidden_dir?(path); end - # pkg:gem/rubocop#lib/rubocop/path_util.rb:101 + # pkg:gem/rubocop#lib/rubocop/path_util.rb:113 def hidden_file?(path); end - # pkg:gem/rubocop#lib/rubocop/path_util.rb:92 + # pkg:gem/rubocop#lib/rubocop/path_util.rb:104 def hidden_file_in_not_hidden_dir?(pattern, path); end - # pkg:gem/rubocop#lib/rubocop/path_util.rb:55 + # pkg:gem/rubocop#lib/rubocop/path_util.rb:67 def match_path?(pattern, path); end # Loose check to reduce memory allocations # - # pkg:gem/rubocop#lib/rubocop/path_util.rb:108 + # pkg:gem/rubocop#lib/rubocop/path_util.rb:120 def maybe_hidden_file?(path); end - # pkg:gem/rubocop#lib/rubocop/path_util.rb:13 + # Returns the current working directory, cached for the duration of a run. + # Dir.pwd is a syscall; caching it avoids repeated overhead since RuboCop + # never changes the working directory during a run. + # + # pkg:gem/rubocop#lib/rubocop/path_util.rb:16 + def pwd; end + + # pkg:gem/rubocop#lib/rubocop/path_util.rb:25 def relative_path(path, base_dir = T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/path_util.rb:31 + # pkg:gem/rubocop#lib/rubocop/path_util.rb:43 def remote_file?(uri); end - # pkg:gem/rubocop#lib/rubocop/path_util.rb:38 + # Reset the cached pwd. Only needed in tests that use Dir.chdir. + # + # pkg:gem/rubocop#lib/rubocop/path_util.rb:21 + def reset_pwd; end + + # pkg:gem/rubocop#lib/rubocop/path_util.rb:50 def smart_path(path); end class << self # Returns true for an absolute Unix or Windows path. # - # pkg:gem/rubocop#lib/rubocop/path_util.rb:83 + # pkg:gem/rubocop#lib/rubocop/path_util.rb:95 def absolute?(path); end # Returns true for a glob # - # pkg:gem/rubocop#lib/rubocop/path_util.rb:88 + # pkg:gem/rubocop#lib/rubocop/path_util.rb:100 def glob?(path); end - # pkg:gem/rubocop#lib/rubocop/path_util.rb:118 + # pkg:gem/rubocop#lib/rubocop/path_util.rb:130 def hidden_dir?(path); end - # pkg:gem/rubocop#lib/rubocop/path_util.rb:101 + # pkg:gem/rubocop#lib/rubocop/path_util.rb:113 def hidden_file?(path); end - # pkg:gem/rubocop#lib/rubocop/path_util.rb:92 + # pkg:gem/rubocop#lib/rubocop/path_util.rb:104 def hidden_file_in_not_hidden_dir?(pattern, path); end - # pkg:gem/rubocop#lib/rubocop/path_util.rb:55 + # pkg:gem/rubocop#lib/rubocop/path_util.rb:67 def match_path?(pattern, path); end # Loose check to reduce memory allocations # - # pkg:gem/rubocop#lib/rubocop/path_util.rb:108 + # pkg:gem/rubocop#lib/rubocop/path_util.rb:120 def maybe_hidden_file?(path); end - # pkg:gem/rubocop#lib/rubocop/path_util.rb:13 + # Returns the current working directory, cached for the duration of a run. + # Dir.pwd is a syscall; caching it avoids repeated overhead since RuboCop + # never changes the working directory during a run. + # + # pkg:gem/rubocop#lib/rubocop/path_util.rb:16 + def pwd; end + + # pkg:gem/rubocop#lib/rubocop/path_util.rb:25 def relative_path(path, base_dir = T.unsafe(nil)); end # pkg:gem/rubocop#lib/rubocop/path_util.rb:7 @@ -60973,18 +61341,23 @@ module RuboCop::PathUtil # pkg:gem/rubocop#lib/rubocop/path_util.rb:7 def relative_paths_cache=(_arg0); end - # pkg:gem/rubocop#lib/rubocop/path_util.rb:31 + # pkg:gem/rubocop#lib/rubocop/path_util.rb:43 def remote_file?(uri); end - # pkg:gem/rubocop#lib/rubocop/path_util.rb:38 + # Reset the cached pwd. Only needed in tests that use Dir.chdir. + # + # pkg:gem/rubocop#lib/rubocop/path_util.rb:21 + def reset_pwd; end + + # pkg:gem/rubocop#lib/rubocop/path_util.rb:50 def smart_path(path); end end end -# pkg:gem/rubocop#lib/rubocop/path_util.rb:105 +# pkg:gem/rubocop#lib/rubocop/path_util.rb:117 RuboCop::PathUtil::HIDDEN_FILE_PATTERN = T.let(T.unsafe(nil), String) -# pkg:gem/rubocop#lib/rubocop/path_util.rb:35 +# pkg:gem/rubocop#lib/rubocop/path_util.rb:47 RuboCop::PathUtil::SMART_PATH_CACHE = T.let(T.unsafe(nil), Hash) # Reports information about pending cops that are not explicitly configured. @@ -61223,27 +61596,27 @@ RuboCop::RemoteConfig::CACHE_LIFETIME = T.let(T.unsafe(nil), Integer) # # pkg:gem/rubocop#lib/rubocop/result_cache.rb:11 class RuboCop::ResultCache - # pkg:gem/rubocop#lib/rubocop/result_cache.rb:99 + # pkg:gem/rubocop#lib/rubocop/result_cache.rb:108 def initialize(file, team, options, config_store, cache_root_override = T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/result_cache.rb:112 + # pkg:gem/rubocop#lib/rubocop/result_cache.rb:121 def debug?; end - # pkg:gem/rubocop#lib/rubocop/result_cache.rb:120 + # pkg:gem/rubocop#lib/rubocop/result_cache.rb:129 def load; end - # pkg:gem/rubocop#lib/rubocop/result_cache.rb:97 + # pkg:gem/rubocop#lib/rubocop/result_cache.rb:106 def path; end - # pkg:gem/rubocop#lib/rubocop/result_cache.rb:125 + # pkg:gem/rubocop#lib/rubocop/result_cache.rb:134 def save(offenses); end - # pkg:gem/rubocop#lib/rubocop/result_cache.rb:116 + # pkg:gem/rubocop#lib/rubocop/result_cache.rb:125 def valid?; end private - # pkg:gem/rubocop#lib/rubocop/result_cache.rb:158 + # pkg:gem/rubocop#lib/rubocop/result_cache.rb:167 def any_symlink?(path); end # We combine team and options into a single "context" checksum to avoid @@ -61251,20 +61624,20 @@ class RuboCop::ResultCache # This context is for anything that's not (1) the RuboCop executable # checksum or (2) the inspected file checksum. # - # pkg:gem/rubocop#lib/rubocop/result_cache.rb:245 + # pkg:gem/rubocop#lib/rubocop/result_cache.rb:254 def context_checksum(team, options); end - # pkg:gem/rubocop#lib/rubocop/result_cache.rb:169 + # pkg:gem/rubocop#lib/rubocop/result_cache.rb:178 def file_checksum(file, config_store); end - # pkg:gem/rubocop#lib/rubocop/result_cache.rb:154 + # pkg:gem/rubocop#lib/rubocop/result_cache.rb:163 def symlink_protection_triggered?(path); end class << self - # pkg:gem/rubocop#lib/rubocop/result_cache.rb:93 + # pkg:gem/rubocop#lib/rubocop/result_cache.rb:98 def allow_symlinks_in_cache_location?(config_store); end - # pkg:gem/rubocop#lib/rubocop/result_cache.rb:87 + # pkg:gem/rubocop#lib/rubocop/result_cache.rb:88 def cache_root(config_store, cache_root_override = T.unsafe(nil)); end # Remove old files so that the cache doesn't grow too big. When the @@ -61277,49 +61650,52 @@ class RuboCop::ResultCache # pkg:gem/rubocop#lib/rubocop/result_cache.rb:28 def cleanup(config_store, verbose, cache_root_override = T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/result_cache.rb:182 + # pkg:gem/rubocop#lib/rubocop/result_cache.rb:191 def inhibit_cleanup; end - # pkg:gem/rubocop#lib/rubocop/result_cache.rb:182 + # pkg:gem/rubocop#lib/rubocop/result_cache.rb:191 def inhibit_cleanup=(_arg0); end # Return a hash of the options given at invocation, minus the ones that have # no effect on which offenses and disabled line ranges are found, and thus # don't affect caching. # - # pkg:gem/rubocop#lib/rubocop/result_cache.rb:202 + # pkg:gem/rubocop#lib/rubocop/result_cache.rb:211 def relevant_options_digest(options); end + # pkg:gem/rubocop#lib/rubocop/result_cache.rb:102 + def reset_config_cache; end + # @api private # - # pkg:gem/rubocop#lib/rubocop/result_cache.rb:44 + # pkg:gem/rubocop#lib/rubocop/result_cache.rb:45 def rubocop_required_features; end # @api private # - # pkg:gem/rubocop#lib/rubocop/result_cache.rb:44 + # pkg:gem/rubocop#lib/rubocop/result_cache.rb:45 def rubocop_required_features=(_arg0); end # The checksum of the RuboCop program running the inspection. # - # pkg:gem/rubocop#lib/rubocop/result_cache.rb:185 + # pkg:gem/rubocop#lib/rubocop/result_cache.rb:194 def source_checksum; end private - # pkg:gem/rubocop#lib/rubocop/result_cache.rb:212 + # pkg:gem/rubocop#lib/rubocop/result_cache.rb:221 def digest(path); end - # pkg:gem/rubocop#lib/rubocop/result_cache.rb:67 + # pkg:gem/rubocop#lib/rubocop/result_cache.rb:68 def remove_files(files, remove_count); end - # pkg:gem/rubocop#lib/rubocop/result_cache.rb:54 + # pkg:gem/rubocop#lib/rubocop/result_cache.rb:55 def remove_oldest_files(files, rubocop_cache_dir, verbose); end - # pkg:gem/rubocop#lib/rubocop/result_cache.rb:50 + # pkg:gem/rubocop#lib/rubocop/result_cache.rb:51 def requires_file_removal?(file_count, config_store); end - # pkg:gem/rubocop#lib/rubocop/result_cache.rb:223 + # pkg:gem/rubocop#lib/rubocop/result_cache.rb:232 def rubocop_extra_features; end end end @@ -61341,13 +61717,13 @@ class RuboCop::Runner # pkg:gem/rubocop#lib/rubocop/runner.rb:57 def aborting=(_arg0); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:87 + # pkg:gem/rubocop#lib/rubocop/runner.rb:88 def aborting?; end # pkg:gem/rubocop#lib/rubocop/runner.rb:56 def errors; end - # pkg:gem/rubocop#lib/rubocop/runner.rb:67 + # pkg:gem/rubocop#lib/rubocop/runner.rb:69 def run(paths); end # pkg:gem/rubocop#lib/rubocop/runner.rb:56 @@ -61355,131 +61731,143 @@ class RuboCop::Runner private - # pkg:gem/rubocop#lib/rubocop/runner.rb:203 + # pkg:gem/rubocop#lib/rubocop/runner.rb:240 def add_redundant_disables(file, offenses, source); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:177 + # pkg:gem/rubocop#lib/rubocop/runner.rb:214 def cached_result(file, team); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:257 + # pkg:gem/rubocop#lib/rubocop/runner.rb:295 def cached_run?; end # Check whether a run created source identical to a previous run, which # means that we definitely have an infinite loop. # - # pkg:gem/rubocop#lib/rubocop/runner.rb:337 + # pkg:gem/rubocop#lib/rubocop/runner.rb:371 def check_for_infinite_loop(processed_source, offenses_by_iteration); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:229 + # pkg:gem/rubocop#lib/rubocop/runner.rb:266 def check_for_redundant_disables?(source); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:439 + # pkg:gem/rubocop#lib/rubocop/runner.rb:466 def considered_failure?(offense); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:476 + # pkg:gem/rubocop#lib/rubocop/runner.rb:503 def default_config(cop_name); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:279 + # pkg:gem/rubocop#lib/rubocop/runner.rb:313 def do_inspection_loop(file); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:137 - def each_inspected_file(files); end - - # pkg:gem/rubocop#lib/rubocop/runner.rb:243 + # pkg:gem/rubocop#lib/rubocop/runner.rb:280 def except_redundant_cop_disable_directive?; end - # pkg:gem/rubocop#lib/rubocop/runner.rb:366 + # pkg:gem/rubocop#lib/rubocop/runner.rb:393 def extract_ruby_sources(processed_source); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:252 + # pkg:gem/rubocop#lib/rubocop/runner.rb:289 def file_finished(file, offenses); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:181 + # pkg:gem/rubocop#lib/rubocop/runner.rb:125 + def file_iterator(files, &block); end + + # pkg:gem/rubocop#lib/rubocop/runner.rb:218 def file_offense_cache(file); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:169 + # pkg:gem/rubocop#lib/rubocop/runner.rb:206 def file_offenses(file); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:247 + # pkg:gem/rubocop#lib/rubocop/runner.rb:284 def file_started(file); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:419 + # pkg:gem/rubocop#lib/rubocop/runner.rb:446 def filter_cop_classes(cop_classes, config); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:108 + # pkg:gem/rubocop#lib/rubocop/runner.rb:94 def find_target_files(paths); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:430 + # pkg:gem/rubocop#lib/rubocop/runner.rb:145 + def finished_report(file, index, offenses); end + + # pkg:gem/rubocop#lib/rubocop/runner.rb:457 def formatter_set; end - # pkg:gem/rubocop#lib/rubocop/runner.rb:491 + # pkg:gem/rubocop#lib/rubocop/runner.rb:518 def get_processed_source(file, prism_result); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:351 + # pkg:gem/rubocop#lib/rubocop/runner.rb:385 def inspect_file(processed_source, team = T.unsafe(nil)); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:119 + # pkg:gem/rubocop#lib/rubocop/runner.rb:105 def inspect_files(files); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:312 + # pkg:gem/rubocop#lib/rubocop/runner.rb:346 def iterate_until_no_changes(source, offenses_by_iteration); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:152 + # pkg:gem/rubocop#lib/rubocop/runner.rb:192 def list_files(paths); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:472 + # pkg:gem/rubocop#lib/rubocop/runner.rb:499 def mark_as_safe_by_config?(config); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:480 + # pkg:gem/rubocop#lib/rubocop/runner.rb:507 def minimum_severity_to_fail; end - # pkg:gem/rubocop#lib/rubocop/runner.rb:380 + # pkg:gem/rubocop#lib/rubocop/runner.rb:407 def mobilize_team(processed_source); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:385 + # pkg:gem/rubocop#lib/rubocop/runner.rb:412 def mobilized_cop_classes(config); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:448 + # pkg:gem/rubocop#lib/rubocop/runner.rb:475 def offense_displayed?(offense); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:460 + # pkg:gem/rubocop#lib/rubocop/runner.rb:487 def offenses_to_report(offenses); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:156 + # pkg:gem/rubocop#lib/rubocop/runner.rb:178 + def parallel_file_iterator(files, on_start, on_finish, &block); end + + # pkg:gem/rubocop#lib/rubocop/runner.rb:196 def process_file(file); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:409 + # pkg:gem/rubocop#lib/rubocop/runner.rb:159 + def process_remaining_report_queue; end + + # pkg:gem/rubocop#lib/rubocop/runner.rb:154 + def process_report_queue_entry(index); end + + # pkg:gem/rubocop#lib/rubocop/runner.rb:436 def qualify_option_cop_names; end - # pkg:gem/rubocop#lib/rubocop/runner.rb:235 + # pkg:gem/rubocop#lib/rubocop/runner.rb:272 def redundant_cop_disable_directive(file); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:269 + # pkg:gem/rubocop#lib/rubocop/runner.rb:165 + def run_in_parallel?(files); end + + # pkg:gem/rubocop#lib/rubocop/runner.rb:303 def save_in_cache(cache, offenses); end + # pkg:gem/rubocop#lib/rubocop/runner.rb:182 + def serial_file_iterator(files, on_start, on_finish, &block); end + # A Cop::Team instance is stateful and may change when inspecting. # The "standby" team for a given config is an initialized but # otherwise dormant team that can be used for config- and option- # level caching in ResultCache. # - # pkg:gem/rubocop#lib/rubocop/runner.rb:523 + # pkg:gem/rubocop#lib/rubocop/runner.rb:550 def standby_team(config); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:426 + # pkg:gem/rubocop#lib/rubocop/runner.rb:453 def style_guide_cops_only?(config); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:464 + # pkg:gem/rubocop#lib/rubocop/runner.rb:491 def supports_safe_autocorrect?(offense); end - # pkg:gem/rubocop#lib/rubocop/runner.rb:218 + # pkg:gem/rubocop#lib/rubocop/runner.rb:255 def team_for_redundant_disables(file, offenses, source); end - # Warms up the RuboCop cache by forking a suitable number of RuboCop - # instances that each inspects its allotted group of files. - # - # pkg:gem/rubocop#lib/rubocop/runner.rb:95 - def warm_cache(target_files); end - class << self # @return [Array<#call>] # @@ -61586,73 +61974,76 @@ class RuboCop::TargetFinder private - # pkg:gem/rubocop#lib/rubocop/target_finder.rb:124 + # pkg:gem/rubocop#lib/rubocop/target_finder.rb:131 def all_cops_include; end - # pkg:gem/rubocop#lib/rubocop/target_finder.rb:110 + # pkg:gem/rubocop#lib/rubocop/target_finder.rb:117 def combined_exclude_glob_patterns(base_dir); end - # pkg:gem/rubocop#lib/rubocop/target_finder.rb:177 + # pkg:gem/rubocop#lib/rubocop/target_finder.rb:184 def configured_include?(file); end - # pkg:gem/rubocop#lib/rubocop/target_finder.rb:213 + # pkg:gem/rubocop#lib/rubocop/target_finder.rb:220 def debug?; end - # pkg:gem/rubocop#lib/rubocop/target_finder.rb:217 + # pkg:gem/rubocop#lib/rubocop/target_finder.rb:224 def fail_fast?; end - # pkg:gem/rubocop#lib/rubocop/target_finder.rb:205 + # pkg:gem/rubocop#lib/rubocop/target_finder.rb:212 def force_exclusion?; end # pkg:gem/rubocop#lib/rubocop/target_finder.rb:82 - def hidden_path?(path); end + def hidden_dir?(dir); end - # pkg:gem/rubocop#lib/rubocop/target_finder.rb:209 + # pkg:gem/rubocop#lib/rubocop/target_finder.rb:87 + def hidden_file_in_dir?(file, base_dir); end + + # pkg:gem/rubocop#lib/rubocop/target_finder.rb:216 def ignore_parent_exclusion?; end - # pkg:gem/rubocop#lib/rubocop/target_finder.rb:150 + # pkg:gem/rubocop#lib/rubocop/target_finder.rb:157 def included_file?(file); end - # pkg:gem/rubocop#lib/rubocop/target_finder.rb:196 + # pkg:gem/rubocop#lib/rubocop/target_finder.rb:203 def order; end - # pkg:gem/rubocop#lib/rubocop/target_finder.rb:128 + # pkg:gem/rubocop#lib/rubocop/target_finder.rb:135 def process_explicit_path(path, mode); end - # pkg:gem/rubocop#lib/rubocop/target_finder.rb:181 + # pkg:gem/rubocop#lib/rubocop/target_finder.rb:188 def ruby_executable?(file); end - # pkg:gem/rubocop#lib/rubocop/target_finder.rb:162 + # pkg:gem/rubocop#lib/rubocop/target_finder.rb:169 def ruby_extension?(file); end - # pkg:gem/rubocop#lib/rubocop/target_finder.rb:166 + # pkg:gem/rubocop#lib/rubocop/target_finder.rb:173 def ruby_extensions; end - # pkg:gem/rubocop#lib/rubocop/target_finder.rb:154 + # pkg:gem/rubocop#lib/rubocop/target_finder.rb:161 def ruby_file?(file); end - # pkg:gem/rubocop#lib/rubocop/target_finder.rb:173 + # pkg:gem/rubocop#lib/rubocop/target_finder.rb:180 def ruby_filename?(file); end - # pkg:gem/rubocop#lib/rubocop/target_finder.rb:117 + # pkg:gem/rubocop#lib/rubocop/target_finder.rb:124 def ruby_filenames; end - # pkg:gem/rubocop#lib/rubocop/target_finder.rb:192 + # pkg:gem/rubocop#lib/rubocop/target_finder.rb:199 def ruby_interpreters(file); end - # pkg:gem/rubocop#lib/rubocop/target_finder.rb:158 + # pkg:gem/rubocop#lib/rubocop/target_finder.rb:165 def stdin?; end - # pkg:gem/rubocop#lib/rubocop/target_finder.rb:102 + # pkg:gem/rubocop#lib/rubocop/target_finder.rb:109 def symlink_excluded_or_infinite_loop?(base_dir, current_dir, exclude_pattern, flags); end # pkg:gem/rubocop#lib/rubocop/target_finder.rb:75 - def to_inspect?(file, base_dir_config); end + def to_inspect?(file, base_dir, base_dir_config); end - # pkg:gem/rubocop#lib/rubocop/target_finder.rb:86 + # pkg:gem/rubocop#lib/rubocop/target_finder.rb:93 def wanted_dir_patterns(base_dir, exclude_pattern, flags); end - # pkg:gem/rubocop#lib/rubocop/target_finder.rb:139 + # pkg:gem/rubocop#lib/rubocop/target_finder.rb:146 def without_excluded(files); end end diff --git a/sorbet/rbi/gems/zeitwerk@2.7.5.rbi b/sorbet/rbi/gems/zeitwerk@2.8.2.rbi similarity index 74% rename from sorbet/rbi/gems/zeitwerk@2.7.5.rbi rename to sorbet/rbi/gems/zeitwerk@2.8.2.rbi index 11ddc07..2ca063c 100644 --- a/sorbet/rbi/gems/zeitwerk@2.7.5.rbi +++ b/sorbet/rbi/gems/zeitwerk@2.8.2.rbi @@ -52,6 +52,12 @@ module Zeitwerk end end +# pkg:gem/zeitwerk#lib/zeitwerk/error.rb:24 +class Zeitwerk::ConflictingNamespaceDefinitionError < ::Zeitwerk::Error + # pkg:gem/zeitwerk#lib/zeitwerk/error.rb:26 + def initialize(cpath, location:, conflicting_file:); end +end + # pkg:gem/zeitwerk#lib/zeitwerk/core_ext/module.rb:3 module Zeitwerk::ConstAdded # pkg:gem/zeitwerk#lib/zeitwerk/core_ext/module.rb:5 @@ -94,6 +100,9 @@ class Zeitwerk::Cref # pkg:gem/zeitwerk#lib/zeitwerk/cref.rb:61 def get; end + # pkg:gem/zeitwerk#lib/zeitwerk/cref.rb:71 + def location; end + # pkg:gem/zeitwerk#lib/zeitwerk/cref.rb:19 def mod; end @@ -193,9 +202,9 @@ class Zeitwerk::Inflector # Very basic snake case -> camel case conversion. # # inflector = Zeitwerk::Inflector.new - # inflector.camelize("post", ...) # => "Post" - # inflector.camelize("users_controller", ...) # => "UsersController" - # inflector.camelize("api", ...) # => "Api" + # inflector.camelize('post', ...) # => 'Post' + # inflector.camelize('users_controller', ...) # => 'UsersController' + # inflector.camelize('api', ...) # => 'Api' # # Takes into account hard-coded mappings configured with `inflect`. # @@ -206,13 +215,13 @@ class Zeitwerk::Inflector # # inflector = Zeitwerk::Inflector.new # inflector.inflect( - # "html_parser" => "HTMLParser", - # "mysql_adapter" => "MySQLAdapter" + # 'html_parser' => 'HTMLParser', + # 'mysql_adapter' => 'MySQLAdapter' # ) # - # inflector.camelize("html_parser", abspath) # => "HTMLParser" - # inflector.camelize("mysql_adapter", abspath) # => "MySQLAdapter" - # inflector.camelize("users_controller", abspath) # => "UsersController" + # inflector.camelize('html_parser', abspath) # => 'HTMLParser' + # inflector.camelize('mysql_adapter', abspath) # => 'MySQLAdapter' + # inflector.camelize('users_controller', abspath) # => 'UsersController' # # pkg:gem/zeitwerk#lib/zeitwerk/inflector.rb:32 def inflect(inflections); end @@ -244,40 +253,45 @@ class Zeitwerk::Loader extend ::Zeitwerk::Internal extend ::Zeitwerk::RealModName - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:105 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:107 def initialize; end - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:65 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:66 def __autoloaded_dirs; end - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:31 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:32 def __autoloads; end - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:55 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:56 def __inceptions; end - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:368 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:382 def __log; end - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:84 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:85 def __namespace_dirs; end - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:363 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:377 def __shadowed_file?(file); end - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:95 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:96 def __shadowed_files; end - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:75 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:76 def __to_unload; end + # This is an internal method. + # + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:166 + def __unload; end + # Returns a hash that maps the absolute paths of the managed files and # directories to their respective expected constant paths. # - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:246 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:258 def all_expected_cpaths; end - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:276 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:290 def cpath_expected_at(path); end # Unloads all loaded code, and calls setup again so that the loader is able @@ -286,12 +300,12 @@ class Zeitwerk::Loader # This method is not thread-safe, please see how this can be achieved by # client code in the README of the project. # - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:232 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:241 def reload; end # Sets autoloads in the root namespaces. # - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:127 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:130 def setup; end # Removes loaded constants and configured autoloads. @@ -305,7 +319,7 @@ class Zeitwerk::Loader # means `unload` + `setup`. This one is available to be used together with # `unregister`, which is undocumented too. # - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:153 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:156 def unload; end # Says if the given constant path would be unloaded on reload. This @@ -314,7 +328,7 @@ class Zeitwerk::Loader # This is an undocumented method that I wrote to help transition from the # classic autoloader in Rails. Its usage was removed from Rails in 7.0. # - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:332 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:346 def unloadable_cpath?(cpath); end # Returns an array with the constant paths that would be unloaded on reload. @@ -323,53 +337,53 @@ class Zeitwerk::Loader # This is an undocumented method that I wrote to help transition from the # classic autoloader in Rails. Its usage was removed from Rails in 7.0. # - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:343 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:357 def unloadable_cpaths; end # This is a dangerous method. # # @experimental # - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:351 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:365 def unregister; end private - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:524 - def autoload_file(cref, file); end - - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:576 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:616 def autoload_path_set_by_me_for?(cref); end - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:495 - def autoload_subdir(cref, subdir); end - # We keep track of autoloaded directories to remove them from the registry # at the end of eager loading. # # Files are removed as they are autoloaded, but directories need to wait due # to concurrency (see why in Zeitwerk::Loader::Callbacks#on_dir_autoloaded). # - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:64 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:65 def autoloaded_dirs; end # Maps absolute paths for which an autoload has been set ---and not # executed--- to their corresponding Zeitwerk::Cref object. # - # "/Users/fxn/blog/app/models/user.rb" => #, - # "/Users/fxn/blog/app/models/hotel/pricing.rb" => #, + # '/Users/fxn/blog/app/models/user.rb' => #, + # '/Users/fxn/blog/app/models/hotel/pricing.rb' => #, # ... # - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:30 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:31 def autoloads; end - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:558 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:598 def define_autoload(cref, abspath); end - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:477 - def define_autoloads_for_dir(dir, parent); end + # Scans `dir` and sets autoloads in `mod` for the constants its contents are + # expected to define. + # + # The `external` flag indicates whether `mod` has been externally defined, + # as is the case with root namespaces or reopened third-party namespaces. + # + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:497 + def define_autoloads_for_dir(dir, mod, external:); end - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:102 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:103 def dirs_autoload_monitor; end # When the path passed to Module#autoload is in the stack of features being @@ -392,13 +406,13 @@ class Zeitwerk::Loader # The object Zeitwerk::Registry.inceptions, on the other hand, acts as a # global registry for them. # - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:54 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:55 def inceptions; end - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:368 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:382 def log; end - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:98 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:99 def mutex; end # Maps namespace crefs to the directories that conform the namespace. @@ -406,28 +420,28 @@ class Zeitwerk::Loader # When these crefs get defined we know their children are spread over those # directories. We'll visit them to set up the corresponding autoloads. # - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:83 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:84 def namespace_dirs; end # `dir` is the directory that would have autovivified a namespace. `file` is # the file where we've found the namespace is explicitly defined. # - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:545 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:585 def promote_namespace_from_implicit_to_explicit(dir:, file:, cref:); end - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:609 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:649 def raise_if_conflicting_root_dir(root_dir); end - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:585 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:625 def register_explicit_namespace(cref); end - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:595 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:635 def register_inception(cref, abspath); end - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:619 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:659 def run_on_unload_callbacks(cref, value, abspath); end - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:363 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:377 def shadowed_file?(file); end # A shadowed file is a file managed by this loader that is ignored when @@ -437,7 +451,7 @@ class Zeitwerk::Loader # loader has only scanned the top-level, `shadowed_files` does not have the # shadowed files that may exist deep in the project tree. # - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:94 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:95 def shadowed_files; end # If reloading is enabled, this collection maps autoload paths to their @@ -446,52 +460,58 @@ class Zeitwerk::Loader # On unload, the autoload paths are passed to callbacks, files deleted from # $LOADED_FEATURES, and the crefs are deleted. # - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:74 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:75 def to_unload; end - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:626 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:666 def unload_autoload(cref); end - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:632 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:672 def unload_cref(cref); end - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:590 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:630 def unregister_explicit_namespaces; end - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:601 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:641 def unregister_inceptions; end + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:521 + def visit_file(cref, file); end + + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:545 + def visit_subdir(cref, subdir, external:); end + class << self # Returns an array with the absolute paths of the root directories of all # registered loaders. This is a read-only collection. # - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:467 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:481 def all_dirs; end - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:383 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:397 def default_logger; end - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:383 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:397 def default_logger=(_arg0); end # Broadcasts `eager_load` to all loaders. Those that have not been setup # are skipped. # - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:439 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:453 def eager_load_all; end # Broadcasts `eager_load_namespace` to all loaders. Those that have not # been setup are skipped. # - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:453 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:467 def eager_load_namespace(mod); end # This is a shortcut for # - # require "zeitwerk" + # require 'zeitwerk' # # loader = Zeitwerk::Loader.new - # loader.tag = File.basename(__FILE__, ".rb") + # loader.tag = File.basename(__FILE__, '.rb') # loader.inflector = Zeitwerk::GemInflector.new(__FILE__) # loader.push_dir(__dir__) # @@ -501,15 +521,15 @@ class Zeitwerk::Loader # This method returns a subclass of Zeitwerk::Loader, but the exact type # is private, client code can only rely on the interface. # - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:401 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:415 def for_gem(warn_on_extra_files: T.unsafe(nil)); end # This is a shortcut for # - # require "zeitwerk" + # require 'zeitwerk' # # loader = Zeitwerk::Loader.new - # loader.tag = namespace.name + "-" + File.basename(__FILE__, ".rb") + # loader.tag = namespace.name + '-' + File.basename(__FILE__, '.rb') # loader.inflector = Zeitwerk::GemInflector.new(__FILE__) # loader.push_dir(__dir__, namespace: namespace) # @@ -519,7 +539,7 @@ class Zeitwerk::Loader # This method returns a subclass of Zeitwerk::Loader, but the exact type # is private, client code can only rely on the interface. # - # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:422 + # pkg:gem/zeitwerk#lib/zeitwerk/loader.rb:436 def for_gem_extension(namespace); end end end @@ -557,24 +577,30 @@ module Zeitwerk::Loader::Config include ::Zeitwerk::RealModName extend ::Zeitwerk::Internal - # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:85 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:103 def initialize; end - # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:302 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:369 + def __collapse?(dir); end + + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:374 + def __collapse_parent?(dir); end + + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:352 def __ignored_path?(abspath); end - # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:289 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:339 def __ignores?(abspath); end - # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:314 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:364 def __root_dir?(dir); end - # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:30 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:33 def __roots; end # Configure directories or glob patterns to be collapsed. # - # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:213 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:245 def collapse(*glob_patterns); end # If `namespaces` is falsey (default), returns an array with the absolute @@ -586,49 +612,58 @@ module Zeitwerk::Loader::Config # # These are read-only collections, please add to them with `push_dir`. # - # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:154 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:186 def dirs(namespaces: T.unsafe(nil), ignored: T.unsafe(nil)); end # Let eager load ignore the given files or directories. The constants defined # in those files are still autoloadable. # - # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:195 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:227 def do_not_eager_load(*paths); end # You need to call this method before setup in order to be able to reload. # There is no way to undo this, either you want to reload or you don't. # - # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:174 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:206 def enable_reloading; end # Configure files, directories, or glob patterns to be totally ignored. # - # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:202 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:234 def ignore(*glob_patterns); end - # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:11 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:14 def inflector; end - # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:11 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:14 def inflector=(_arg0); end # Logs to `$stdout`, handy shortcut for debugging. # - # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:281 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:331 def log!; end - # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:14 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:17 def logger; end - # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:14 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:17 def logger=(_arg0); end + # Basename of files that define namespaces. For example, if `nsfile` is + # 'ns.rb', then `foo/ns.rb` defines the `Foo` namespace. + # + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:39 + def nsfile; end + + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:165 + def nsfile=(nsfile); end + # Configure a block to be invoked once a certain constant path is loaded. # Supports multiple callbacks, and if there are many, they are executed in # the order in which they were defined. # - # loader.on_load("SomeApiClient") do |klass, _abspath| - # klass.endpoint = "https://api.dev" + # loader.on_load('SomeApiClient') do |klass, _abspath| + # klass.endpoint = 'https://api.dev' # end # # Can also be configured for any constant loaded: @@ -637,20 +672,20 @@ module Zeitwerk::Loader::Config # # ... # end # - # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:247 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:284 def on_load(cpath = T.unsafe(nil), &block); end # Configure a block to be called after setup and on each reload. # If setup was already done, the block runs immediately. # - # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:225 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:261 def on_setup(&block); end # Configure a block to be invoked right before a certain constant is removed. # Supports multiple callbacks, and if there are many, they are executed in the # order in which they were defined. # - # loader.on_unload("Country") do |klass, _abspath| + # loader.on_unload('Country') do |klass, _abspath| # klass.clear_cache # end # @@ -660,7 +695,7 @@ module Zeitwerk::Loader::Config # # ... # end # - # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:270 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:314 def on_unload(cpath = T.unsafe(nil), &block); end # Pushes `path` to the list of root directories. @@ -669,10 +704,10 @@ module Zeitwerk::Loader::Config # the same process already manages that directory or one of its ascendants or # descendants. # - # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:109 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:129 def push_dir(path, namespace: T.unsafe(nil)); end - # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:187 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:219 def reloading_enabled?; end # Returns the loader's tag. @@ -680,93 +715,106 @@ module Zeitwerk::Loader::Config # Implemented as a method instead of via attr_reader for symmetry with the # writer below. # - # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:133 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:153 def tag; end # Sets a tag for the loader, useful for logging. # - # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:140 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:160 def tag=(tag); end private - # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:307 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:357 def actual_roots; end - # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:332 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:369 def collapse?(dir); end # The actual collection of absolute directory names at the time the collapse - # glob patterns were expanded. Computed on setup, and recomputed on reload. + # glob patterns were expanded. Computed on setup and recomputed on reload. # - # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:56 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:65 def collapse_dirs; end # Absolute paths of directories or glob patterns to be collapsed. # - # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:49 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:58 def collapse_glob_patterns; end + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:374 + def collapse_parent?(dir); end + + # Absolute paths of directories that are parents of collapsed directories. + # This is a cache to optimize some tree walks. Computed on setup and + # recomputed on reload. + # + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:73 + def collapse_parents; end + # Absolute paths of files or directories not to be eager loaded. # - # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:62 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:79 def eager_load_exclusions; end - # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:319 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:379 def excluded_from_eager_load?(abspath); end - # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:342 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:397 def expand_glob_patterns(glob_patterns); end - # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:337 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:392 def expand_paths(paths); end # Absolute paths of files, directories, or glob patterns to be ignored. # - # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:35 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:44 def ignored_glob_patterns; end - # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:302 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:352 def ignored_path?(abspath); end # The actual collection of absolute file and directory names at the time the # ignored glob patterns were expanded. Computed on setup, and recomputed on # reload. # - # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:43 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:52 def ignored_paths; end - # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:289 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:339 def ignores?(abspath); end # User-oriented callbacks to be fired when a constant is loaded. # - # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:75 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:92 def on_load_callbacks; end # User-oriented callbacks to be fired on setup and on reload. # - # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:68 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:85 def on_setup_callbacks; end # User-oriented callbacks to be fired before constants are removed. # - # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:82 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:99 def on_unload_callbacks; end - # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:354 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:409 def recompute_collapse_dirs; end - # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:349 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:414 + def recompute_collapse_parents; end + + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:404 def recompute_ignored_paths; end - # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:314 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:364 def root_dir?(dir); end # Absolute paths of the root directories, mapped to their respective root namespaces: # - # "/Users/fxn/blog/app/channels" => Object, - # "/Users/fxn/blog/app/adapters" => ActiveJob::QueueAdapters, + # '/Users/fxn/blog/app/channels' => Object, + # '/Users/fxn/blog/app/adapters' => ActiveJob::QueueAdapters, # ... # # Stored in a hash to preserve order, easily handle duplicates, and have a @@ -775,25 +823,45 @@ module Zeitwerk::Loader::Config # This is a private collection maintained by the loader. The public # interface for it is `push_dir` and `dirs`. # - # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:29 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:32 def roots; end end +# pkg:gem/zeitwerk#lib/zeitwerk/loader/config.rb:10 +Zeitwerk::Loader::Config::UNDEFINED = T.let(T.unsafe(nil), Object) + +# @private +# +# pkg:gem/zeitwerk#lib/zeitwerk/loader/constant_path_validator.rb:2 +class Zeitwerk::Loader::ConstantPathValidator + # Technically, this validation works with symbols, but API boundary restricts + # input to strings, so we assume strings, and we test strings. + # + # pkg:gem/zeitwerk#lib/zeitwerk/loader/constant_path_validator.rb:10 + def validate!(possible_cpath); end +end + +# :nodoc +# +# pkg:gem/zeitwerk#lib/zeitwerk/loader/constant_path_validator.rb:3 +module Zeitwerk::Loader::ConstantPathValidator::CNAME_VALIDATOR; end + # pkg:gem/zeitwerk#lib/zeitwerk/loader/eager_load.rb:1 module Zeitwerk::Loader::EagerLoad # Eager loads all files in the root directories, recursively. Files do not - # need to be in `$LOAD_PATH`, absolute file names are used. Ignored and - # shadowed files are not eager loaded. You can opt-out specifically in - # specific files and directories with `do_not_eager_load`, and that can be - # overridden passing `force: true`. + # need to be in `$LOAD_PATH`, absolute file names are used. + # + # Ignored files are not eager loaded. You can opt-out specifically in specific + # files and directories with `do_not_eager_load`, and that can be overridden + # passing `force: true`. # - # pkg:gem/zeitwerk#lib/zeitwerk/loader/eager_load.rb:9 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/eager_load.rb:10 def eager_load(force: T.unsafe(nil)); end - # pkg:gem/zeitwerk#lib/zeitwerk/loader/eager_load.rb:32 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/eager_load.rb:33 def eager_load_dir(path); end - # pkg:gem/zeitwerk#lib/zeitwerk/loader/eager_load.rb:73 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/eager_load.rb:74 def eager_load_namespace(mod); end # Loads the given Ruby file. @@ -803,7 +871,7 @@ module Zeitwerk::Loader::EagerLoad # The method is implemented as `constantize` for files, in a sense, to be able # to descend orderly and make sure the file is loadable. # - # pkg:gem/zeitwerk#lib/zeitwerk/loader/eager_load.rb:115 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/eager_load.rb:116 def load_file(path); end private @@ -811,7 +879,7 @@ module Zeitwerk::Loader::EagerLoad # The caller is responsible for making sure `namespace` is the namespace that # corresponds to `dir`. # - # pkg:gem/zeitwerk#lib/zeitwerk/loader/eager_load.rb:158 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/eager_load.rb:162 def actual_eager_load_dir(dir, namespace, force: T.unsafe(nil)); end # In order to invoke this method, the caller has to ensure `child` is a @@ -833,41 +901,64 @@ class Zeitwerk::Loader::FileSystem # pkg:gem/zeitwerk#lib/zeitwerk/loader/file_system.rb:11 def initialize(loader); end - # pkg:gem/zeitwerk#lib/zeitwerk/loader/file_system.rb:62 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/file_system.rb:120 def dir?(path); end - # pkg:gem/zeitwerk#lib/zeitwerk/loader/file_system.rb:67 + # Returns the absolute path to an nsfile in `dir`, if there is exactly one. If + # there is none, it returns `nil`. + # + # This method accounts for collapsed directories, which conceptually allow for + # multiple nsfiles. If two are found, Zeitwerk::ConflictingNamespaceDefinitionError is raised. + # + # pkg:gem/zeitwerk#lib/zeitwerk/loader/file_system.rb:71 + def has_exactly_one_nsfile?(cref, dir); end + + # pkg:gem/zeitwerk#lib/zeitwerk/loader/file_system.rb:125 def hidden?(basename); end - # pkg:gem/zeitwerk#lib/zeitwerk/loader/file_system.rb:16 - def ls(dir); end + # This method lists directories, filtering out the following: + # + # - Hidden entries. + # - Ignored entries. + # - Files whose extension is not `.rb`. + # - Nested root directories, since they represent separate trees. + # - Subdirectories that (recursively) contain no Ruby files. + # + # If `collapse` is true, collapsed directories are not yielded, instead, the + # method recurses so that the caller gets a conceptually flat listing. + # + # For every entry that is not excluded, `ls` yields its basename, absolute + # path, and file type, which can only be :file or :directory. + # + # pkg:gem/zeitwerk#lib/zeitwerk/loader/file_system.rb:30 + def ls(dir, collapse: T.unsafe(nil), &block); end - # pkg:gem/zeitwerk#lib/zeitwerk/loader/file_system.rb:57 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/file_system.rb:115 def rb_extension?(path); end # Encodes the documented conventions. # - # pkg:gem/zeitwerk#lib/zeitwerk/loader/file_system.rb:48 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/file_system.rb:106 def supported_ftype?(abspath); end - # pkg:gem/zeitwerk#lib/zeitwerk/loader/file_system.rb:37 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/file_system.rb:56 def walk_up(abspath); end private # Available in Ruby 4.1. # - # pkg:gem/zeitwerk#lib/zeitwerk/loader/file_system.rb:149 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/file_system.rb:198 def each_ruby_file_or_directory(dir); end # Looks for a Ruby file using breadth-first search. This type of search is # important to list as less directories as possible and return fast in the # common case in which there are Ruby files in the passed directory. # - # pkg:gem/zeitwerk#lib/zeitwerk/loader/file_system.rb:78 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/file_system.rb:136 def has_at_least_one_ruby_file?(dir); end - # pkg:gem/zeitwerk#lib/zeitwerk/loader/file_system.rb:93 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/file_system.rb:151 def relevant_dir_entries(dir); end end @@ -875,13 +966,10 @@ end module Zeitwerk::Loader::Helpers private - # pkg:gem/zeitwerk#lib/zeitwerk/loader/helpers.rb:8 + # pkg:gem/zeitwerk#lib/zeitwerk/loader/helpers.rb:5 def cname_for(basename, abspath); end end -# pkg:gem/zeitwerk#lib/zeitwerk/loader/helpers.rb:4 -module Zeitwerk::Loader::Helpers::CNAME_VALIDATOR; end - # pkg:gem/zeitwerk#lib/zeitwerk/error.rb:14 class Zeitwerk::NameError < ::NameError; end @@ -1062,7 +1150,7 @@ class Zeitwerk::Registry::Loaders def clear; end # pkg:gem/zeitwerk#lib/zeitwerk/registry/loaders.rb:9 - def each(&_arg0); end + def each(&block); end # pkg:gem/zeitwerk#lib/zeitwerk/registry/loaders.rb:14 def register(loader); end From bff1f71d9c6ba21a1b20ebff9bd19897e7e47791 Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger Date: Fri, 29 May 2026 16:33:09 -0700 Subject: [PATCH 4/7] Use released rubocop-sorbet instead of a git SHA pin The pin was added so the (then-unreleased) Sorbet/RedundantTLet and Sorbet/RedundantTLetForLiteral cops could clean up redundant T.let calls. That cleanup is done and the RBS migration removed the remaining T.let usage, so those cops are no longer needed. Drop the github pin and let rubocop-sorbet resolve to the released version via rubocop-gusto. --- Gemfile | 4 ---- Gemfile.lock | 13 +++---------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/Gemfile b/Gemfile index 02f3c1f..7f4f5e9 100644 --- a/Gemfile +++ b/Gemfile @@ -3,7 +3,3 @@ source 'https://rubygems.org' gemspec - -# Pinned to main for the not-yet-released `Sorbet/RedundantTLet` and -# `Sorbet/RedundantTLetForLiteral` cops (see Shopify/rubocop-sorbet#372 and #367). -gem 'rubocop-sorbet', github: 'Shopify/rubocop-sorbet', ref: '7b7d3cb5a41cee8207b3cd00c21f5ef43f7140fd' diff --git a/Gemfile.lock b/Gemfile.lock index 3a10120..cb78149 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,12 +1,3 @@ -GIT - remote: https://github.com/Shopify/rubocop-sorbet.git - revision: 7b7d3cb5a41cee8207b3cd00c21f5ef43f7140fd - ref: 7b7d3cb5a41cee8207b3cd00c21f5ef43f7140fd - specs: - rubocop-sorbet (0.12.0) - lint_roller - rubocop (>= 1.75.2) - PATH remote: . specs: @@ -197,6 +188,9 @@ GEM rubocop-rspec (3.9.0) lint_roller (~> 1.1) rubocop (~> 1.81) + rubocop-sorbet (0.12.0) + lint_roller + rubocop (>= 1.75.2) ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) rubydex (0.2.5-arm64-darwin) @@ -257,7 +251,6 @@ DEPENDENCIES rake rubocop rubocop-gusto - rubocop-sorbet! sorbet tapioca From 4ba6a849b2b0d996ce87c6801767da225f3aea7d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 29 May 2026 23:33:41 +0000 Subject: [PATCH 5/7] Regenerate gem RBIs [dependabot skip] --- ...7d3cb5a41cee8207b3cd00c21f5ef43f7140fd.rbi | 2558 ----------------- sorbet/rbi/gems/rubocop-sorbet@0.12.0.rbi | 9 + 2 files changed, 9 insertions(+), 2558 deletions(-) delete mode 100644 sorbet/rbi/gems/rubocop-sorbet@0.12.0-7b7d3cb5a41cee8207b3cd00c21f5ef43f7140fd.rbi create mode 100644 sorbet/rbi/gems/rubocop-sorbet@0.12.0.rbi diff --git a/sorbet/rbi/gems/rubocop-sorbet@0.12.0-7b7d3cb5a41cee8207b3cd00c21f5ef43f7140fd.rbi b/sorbet/rbi/gems/rubocop-sorbet@0.12.0-7b7d3cb5a41cee8207b3cd00c21f5ef43f7140fd.rbi deleted file mode 100644 index cd1e317..0000000 --- a/sorbet/rbi/gems/rubocop-sorbet@0.12.0-7b7d3cb5a41cee8207b3cd00c21f5ef43f7140fd.rbi +++ /dev/null @@ -1,2558 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `rubocop-sorbet` gem. -# Please instead update this file by running `bin/tapioca gem rubocop-sorbet`. - - -# pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/version.rb:3 -module RuboCop; end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb:4 -module RuboCop::Cop; end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb:5 -module RuboCop::Cop::Sorbet; end - -# Disallows using `.override(allow_incompatible: true)`. -# Using `allow_incompatible` suggests a violation of the Liskov -# Substitution Principle, meaning that a subclass is not a valid -# subtype of its superclass. This Cop prevents these design smells -# from occurring. -# -# @example -# -# # bad -# sig.override(allow_incompatible: true) -# -# # good -# sig.override -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:21 -class RuboCop::Cop::Sorbet::AllowIncompatibleOverride < ::RuboCop::Cop::Base - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:55 - def on_block(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:72 - def on_numblock(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:49 - def on_send(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:41 - def override?(param0 = T.unsafe(nil)); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:36 - def sig?(param0); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:27 - def sig_dot_override?(param0 = T.unsafe(nil)); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:22 -RuboCop::Cop::Sorbet::AllowIncompatibleOverride::MSG = T.let(T.unsafe(nil), String) - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:24 -RuboCop::Cop::Sorbet::AllowIncompatibleOverride::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Disallows binding the return value of `T.any`, `T.all`, `T.enum` -# to a constant directly. To bind the value, one must use `T.type_alias`. -# -# @example -# -# # bad -# FooOrBar = T.any(Foo, Bar) -# -# # good -# FooOrBar = T.type_alias { T.any(Foo, Bar) } -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/binding_constant_without_type_alias.rb:18 -class RuboCop::Cop::Sorbet::BindingConstantWithoutTypeAlias < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/binding_constant_without_type_alias.rb:65 - def on_casgn(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/binding_constant_without_type_alias.rb:48 - def requires_type_alias?(param0 = T.unsafe(nil)); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/binding_constant_without_type_alias.rb:38 - def type_alias_with_block?(param0 = T.unsafe(nil)); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/binding_constant_without_type_alias.rb:29 - def type_alias_without_block(param0 = T.unsafe(nil)); end - - private - - # Given nested send nodes, returns the leaf with explicit receiver. - # - # i.e. in Ruby - # - # a.b.c.d.e.f - # ^^^ - # - # i.e. in AST - # - # (send (send (send (send (send (send nil :a) :b) :c) :d) :e) :f) - # ^^^^^^^^^^^^^^^^^^^^^^^ - # - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/binding_constant_without_type_alias.rb:98 - def send_leaf(node); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/binding_constant_without_type_alias.rb:21 -RuboCop::Cop::Sorbet::BindingConstantWithoutTypeAlias::MSG = T.let(T.unsafe(nil), String) - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/binding_constant_without_type_alias.rb:23 -RuboCop::Cop::Sorbet::BindingConstantWithoutTypeAlias::WITHOUT_BLOCK_MSG = T.let(T.unsafe(nil), String) - -# Disallow defining methods in blocks, to prevent running into issues -# caused by https://github.com/sorbet/sorbet/issues/3609. -# -# As a workaround, use `define_method` instead. -# -# The one exception is for `Class.new` blocks, as long as the result is -# assigned to a constant (i.e. as long as it is not an anonymous class). -# Another exception is for ActiveSupport::Concern `class_methods` blocks. -# -# @example -# # bad -# yielding_method do -# def bad(args) -# # ... -# end -# end -# -# # bad -# Class.new do -# def bad(args) -# # ... -# end -# end -# -# # good -# yielding_method do -# define_method(:good) do |args| -# # ... -# end -# end -# -# # good -# MyClass = Class.new do -# def good(args) -# # ... -# end -# end -# -# # good -# module SomeConcern -# extend ActiveSupport::Concern -# -# class_methods do -# def good(args) -# # ... -# end -# end -# end -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:55 -class RuboCop::Cop::Sorbet::BlockMethodDefinition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:62 - def activesupport_concern_class_methods_block?(param0 = T.unsafe(nil)); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:71 - def module_extends_activesupport_concern?(param0 = T.unsafe(nil)); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:80 - def on_block(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:94 - def on_numblock(node); end - - private - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:186 - def adjust_for_closing_parenthesis(end_pos); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:106 - def autocorrect_method_in_block(corrector, node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:198 - def closing_parenthesis_follows(source); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:175 - def find_end_position_with_arguments(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:182 - def find_end_position_without_arguments(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:167 - def find_method_signature_end_position(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:143 - def handle_method_without_body(node, indent); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:161 - def handle_multiline_method_without_body(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:155 - def handle_single_line_method(node, indent); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:98 - def in_activesupport_concern_class_methods_block?(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:151 - def single_line_method?(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:132 - def transform_args_to_block_args(node); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/block_method_definition.rb:59 -RuboCop::Cop::Sorbet::BlockMethodDefinition::MSG = T.let(T.unsafe(nil), String) - -# Checks for the a mistaken variant of the "obsolete memoization pattern" that used to be required -# on every call, causing the memoized value to be discarded and recomputed on every call. -# -# This cop will correct it to read from the ivar instead of `nil`, which will memoize it correctly. -# -# The result of this correction will be the "obsolete memoization pattern", which can further be corrected by -# the `Sorbet/ObsoleteStrictMemoization` cop. -# -# See `Sorbet/ObsoleteStrictMemoization` for more details. -# -# @safety -# If the computation being memoized had side effects, calling it only once (instead of once on every call -# to the affected method) can be observed, and might be a breaking change. -# -# @example -# # bad -# sig { returns(Foo) } -# def foo -# # This `nil` is likely a mistake, causing the memoized value to be discarded and recomputed on every call. -# @foo = T.let(nil, T.nilable(Foo)) -# @foo ||= some_computation -# end -# -# # good -# sig { returns(Foo) } -# def foo -# # This will now memoize the value as was likely intended, so `some_computation` is only ever called once. -# # ⚠️If `some_computation` has side effects, this might be a breaking change! -# @foo = T.let(@foo, T.nilable(Foo)) -# @foo ||= some_computation -# end -# -# @see Sorbet/ObsoleteStrictMemoization -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/buggy_obsolete_strict_memoization.rb:42 -class RuboCop::Cop::Sorbet::BuggyObsoleteStrictMemoization < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::MatchRange - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::LineLengthHelp - include ::RuboCop::Cop::Sorbet::TargetSorbetVersion - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::Sorbet::TargetSorbetVersion::ClassMethods - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/buggy_obsolete_strict_memoization.rb:55 - def buggy_legacy_memoization_pattern?(param0 = T.unsafe(nil)); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/buggy_obsolete_strict_memoization.rb:66 - def on_begin(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/buggy_obsolete_strict_memoization.rb:77 - def relevant_file?(file); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/buggy_obsolete_strict_memoization.rb:51 -RuboCop::Cop::Sorbet::BuggyObsoleteStrictMemoization::MSG = T.let(T.unsafe(nil), String) - -# Ensures that callback conditionals are bound to the right type -# so that they are type checked properly. -# -# @safety -# Auto-correction is unsafe because other libraries define similar style callbacks as Rails, but don't always need -# binding to the attached class. Auto-correcting those usages can lead to false positives and auto-correction -# introduces new typing errors. -# -# @example -# -# # bad -# class Post < ApplicationRecord -# before_create :do_it, if: -> { should_do_it? } -# -# def should_do_it? -# true -# end -# end -# -# # good -# class Post < ApplicationRecord -# before_create :do_it, if: -> { -# T.bind(self, Post) -# should_do_it? -# } -# -# def should_do_it? -# true -# end -# end -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/callback_conditionals_binding.rb:36 -class RuboCop::Cop::Sorbet::CallbackConditionalsBinding < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/callback_conditionals_binding.rb:82 - def argumentless_unbound_callable_callback_conditional?(param0 = T.unsafe(nil)); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/callback_conditionals_binding.rb:92 - def on_send(node); end - - private - - # Find the immediately enclosing class or module name. - # Returns `nil`` if the immediate parent (skipping begin if present) is not a class or module. - # - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/callback_conditionals_binding.rb:129 - def immediately_enclosing_module_name(node); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/callback_conditionals_binding.rb:40 -RuboCop::Cop::Sorbet::CallbackConditionalsBinding::MSG = T.let(T.unsafe(nil), String) - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/callback_conditionals_binding.rb:42 -RuboCop::Cop::Sorbet::CallbackConditionalsBinding::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Ensure type parameters used in generic methods are always capitalized. -# -# @example -# -# # bad -# sig { type_parameters(:x).params(a: T.type_parameter(:x)).void } -# def foo(a); end -# -# # good -# sig { type_parameters(:X).params(a: T.type_parameter(:X)).void } -# def foo(a: 1); end -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/capitalized_type_parameters.rb:17 -class RuboCop::Cop::Sorbet::CapitalizedTypeParameters < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Sorbet::SignatureHelp - extend ::RuboCop::Cop::AutoCorrector - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/capitalized_type_parameters.rb:51 - def on_csend(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/capitalized_type_parameters.rb:47 - def on_send(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/capitalized_type_parameters.rb:35 - def on_signature(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/capitalized_type_parameters.rb:31 - def t_type_parameter?(param0 = T.unsafe(nil)); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/capitalized_type_parameters.rb:26 - def type_parameters?(param0 = T.unsafe(nil)); end - - private - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/capitalized_type_parameters.rb:57 - def check_type_parameters_case(node); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/capitalized_type_parameters.rb:21 -RuboCop::Cop::Sorbet::CapitalizedTypeParameters::MSG = T.let(T.unsafe(nil), String) - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/capitalized_type_parameters.rb:23 -RuboCop::Cop::Sorbet::CapitalizedTypeParameters::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Disallows the usage of `checked(true)`. This usage could cause -# confusion; it could lead some people to believe that a method would be checked -# even if runtime checks have not been enabled on the class or globally. -# Additionally, in the event where checks are enabled, `checked(true)` would -# be redundant; only `checked(false)` or `soft` would change the behaviour. -# -# @example -# -# # bad -# sig { void.checked(true) } -# -# # good -# sig { void } -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb:19 -class RuboCop::Cop::Sorbet::CheckedTrueInSignature < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::Sorbet::SignatureHelp - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb:24 - def offending_node(param0); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb:35 - def on_signature(node); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb:28 -RuboCop::Cop::Sorbet::CheckedTrueInSignature::MESSAGE = T.let(T.unsafe(nil), String) - -# Disallows the calls that are used to get constants fom Strings -# such as +constantize+, +const_get+, and +constants+. -# -# The goal of this cop is to make the code easier to statically analyze, -# more IDE-friendly, and more predictable. It leads to code that clearly -# expresses which values the constant can have. -# -# @example -# -# # bad -# class_name.constantize -# -# # bad -# constants.detect { |c| c.name == "User" } -# -# # bad -# const_get(class_name) -# -# # good -# case class_name -# when "User" -# User -# else -# raise ArgumentError -# end -# -# # good -# { "User" => User }.fetch(class_name) -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/constants_from_strings.rb:36 -class RuboCop::Cop::Sorbet::ConstantsFromStrings < ::RuboCop::Cop::Base - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/constants_from_strings.rb:50 - def on_csend(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/constants_from_strings.rb:47 - def on_send(node); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/constants_from_strings.rb:37 -RuboCop::Cop::Sorbet::ConstantsFromStrings::MSG = T.let(T.unsafe(nil), String) - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/constants_from_strings.rb:40 -RuboCop::Cop::Sorbet::ConstantsFromStrings::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for blank lines after signatures. -# -# @example -# # bad -# sig { void } -# -# def foo; end -# -# # good -# sig { void } -# def foo; end -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb:17 -class RuboCop::Cop::Sorbet::EmptyLineAfterSig < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::Sorbet::SignatureHelp - extend ::RuboCop::Cop::AutoCorrector - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb:33 - def on_signature(sig); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb:25 - def sig_or_signable_method_definition?(param0 = T.unsafe(nil)); end - - private - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb:62 - def contains_only_rubocop_directives?(range); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb:66 - def lines_between(node1, node2, buffer: T.unsafe(nil)); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb:58 - def next_sibling(node); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb:22 -RuboCop::Cop::Sorbet::EmptyLineAfterSig::MSG = T.let(T.unsafe(nil), String) - -# Checks that the Sorbet sigil comes as the first magic comment in the file, after the encoding comment if any. -# -# The expected order for magic comments is: (en)?coding, typed, warn_indent then frozen_string_literal. -# -# The ordering is for consistency only, except for the encoding comment which must be first, if present. -# -# For example, the following bad ordering: -# -# ```ruby -# class Foo; end -# ``` -# -# Will be corrected as: -# -# ```ruby -# class Foo; end -# ``` -# -# Only `(en)?coding`, `typed`, `warn_indent` and `frozen_string_literal` magic comments are considered, -# other comments or magic comments are left in the same place. -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:32 -class RuboCop::Cop::Sorbet::EnforceSigilOrder < ::RuboCop::Cop::Sorbet::ValidSigil - include ::RuboCop::Cop::RangeHelp - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:35 - def on_new_investigation; end - - protected - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:93 - def autocorrect(corrector); end - - # checks - # - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:70 - def check_magic_comments_order(tokens); end - - # Get all the tokens in `processed_source` that match `MAGIC_REGEX` - # - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:62 - def extract_magic_comments(processed_source); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:46 -RuboCop::Cop::Sorbet::EnforceSigilOrder::CODING_REGEX = T.let(T.unsafe(nil), Regexp) - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:48 -RuboCop::Cop::Sorbet::EnforceSigilOrder::FROZEN_REGEX = T.let(T.unsafe(nil), Regexp) - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:47 -RuboCop::Cop::Sorbet::EnforceSigilOrder::INDENT_REGEX = T.let(T.unsafe(nil), Regexp) - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:57 -RuboCop::Cop::Sorbet::EnforceSigilOrder::MAGIC_REGEX = T.let(T.unsafe(nil), Regexp) - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb:50 -RuboCop::Cop::Sorbet::EnforceSigilOrder::PREFERRED_ORDER = T.let(T.unsafe(nil), Hash) - -# Checks that every method definition and attribute accessor has a Sorbet signature. -# -# It also suggest an autocorrect with placeholders so the following code: -# -# ``` -# def foo(a, b, c); end -# ``` -# -# Will be corrected as: -# -# ``` -# sig { params(a: T.untyped, b: T.untyped, c: T.untyped).returns(T.untyped) -# def foo(a, b, c); end -# ``` -# -# You can configure the placeholders used by changing the following options: -# -# * `ParameterTypePlaceholder`: placeholders used for parameter types (default: 'T.untyped') -# * `ReturnTypePlaceholder`: placeholders used for return types (default: 'T.untyped') -# * `Style`: signature style to enforce - 'sig' for sig blocks, 'rbs' for RBS comments, 'both' to allow either (default: 'sig') -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:26 -class RuboCop::Cop::Sorbet::EnforceSignatures < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Sorbet::SignatureHelp - extend ::RuboCop::Cop::AutoCorrector - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:33 - def accessor?(param0 = T.unsafe(nil)); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:37 - def on_def(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:41 - def on_defs(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:53 - def on_new_investigation; end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:45 - def on_send(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:49 - def on_signature(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:59 - def scope(node); end - - private - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:154 - def add_accessor_parameter_if_needed(suggest, symbol, method); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:176 - def allow_rbs?; end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:113 - def autocorrect_with_signature_type(corrector, node, type); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:68 - def check_node(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:119 - def create_signature_suggestion(node, type); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:168 - def param_type_placeholder; end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:146 - def populate_accessor_suggestion(suggest, node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:136 - def populate_method_definition_suggestion(suggest, node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:128 - def populate_signature_suggestion(suggest, node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:109 - def rbs_checker; end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:172 - def return_type_placeholder; end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:160 - def set_void_return_for_writer(suggest, method); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:105 - def sig_checker; end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:180 - def signature_style; end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:164 - def writer_or_accessor?(method); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:209 -class RuboCop::Cop::Sorbet::EnforceSignatures::RBSSignatureChecker < ::RuboCop::Cop::Sorbet::EnforceSignatures::SignatureChecker - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:212 - def signature_node(node); end - - private - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:225 - def find_non_send_ancestor(node); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:210 -RuboCop::Cop::Sorbet::EnforceSignatures::RBSSignatureChecker::RBS_COMMENT_REGEX = T.let(T.unsafe(nil), Regexp) - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:285 -class RuboCop::Cop::Sorbet::EnforceSignatures::RBSSuggestion - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:288 - def initialize(indent); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:286 - def has_block; end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:286 - def has_block=(_arg0); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:286 - def params; end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:286 - def params=(_arg0); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:286 - def returns; end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:286 - def returns=(_arg0); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:295 - def to_autocorrect; end - - private - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:301 - def generate_signature; end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:231 -class RuboCop::Cop::Sorbet::EnforceSignatures::SigSignatureChecker < ::RuboCop::Cop::Sorbet::EnforceSignatures::SignatureChecker - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:232 - def initialize(processed_source); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:245 - def clear_signature(scope); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:241 - def on_signature(node, scope); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:237 - def signature_node(scope); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:250 -class RuboCop::Cop::Sorbet::EnforceSignatures::SigSuggestion - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:253 - def initialize(indent, param_placeholder, return_placeholder); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:251 - def params; end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:251 - def params=(_arg0); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:251 - def returns; end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:251 - def returns=(_arg0); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:261 - def to_autocorrect; end - - private - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:267 - def generate_params; end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:274 - def generate_return; end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:195 -class RuboCop::Cop::Sorbet::EnforceSignatures::SignatureChecker - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:196 - def initialize(processed_source); end - - protected - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:204 - def preceding_comments(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:202 - def processed_source; end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb:30 -RuboCop::Cop::Sorbet::EnforceSignatures::VALID_STYLES = T.let(T.unsafe(nil), Array) - -# Checks that there is only one Sorbet sigil in a given file -# -# For example, the following class with two sigils -# -# ```ruby -# class Foo; end -# ``` -# -# Will be corrected as: -# -# ```ruby -# class Foo; end -# ``` -# -# Other comments or magic comments are left in place. -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb:26 -class RuboCop::Cop::Sorbet::EnforceSingleSigil < ::RuboCop::Cop::Sorbet::ValidSigil - include ::RuboCop::Cop::RangeHelp - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb:29 - def on_new_investigation; end - - protected - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb:50 - def autocorrect(corrector); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb:44 - def extract_all_sigils(processed_source); end -end - -# Makes the Sorbet `false` sigil mandatory in all files. -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/false_sigil.rb:10 -class RuboCop::Cop::Sorbet::FalseSigil < ::RuboCop::Cop::Sorbet::HasSigil - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/false_sigil.rb:11 - def minimum_strictness; end -end - -# Disallow including the `Comparable` module in `T::Enum`. -# -# @example -# -# # bad -# class Priority < T::Enum -# include Comparable -# -# enums do -# High = new(3) -# Medium = new(2) -# Low = new(1) -# end -# -# def <=>(other) -# serialize <=> other.serialize -# end -# end -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/t_enum/forbid_comparable_t_enum.rb:24 -class RuboCop::Cop::Sorbet::ForbidComparableTEnum < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Sorbet::TEnum - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/t_enum/forbid_comparable_t_enum.rb:32 - def mix_in_comparable?(param0 = T.unsafe(nil)); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/t_enum/forbid_comparable_t_enum.rb:36 - def on_send(node); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/t_enum/forbid_comparable_t_enum.rb:27 -RuboCop::Cop::Sorbet::ForbidComparableTEnum::MSG = T.let(T.unsafe(nil), String) - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/t_enum/forbid_comparable_t_enum.rb:29 -RuboCop::Cop::Sorbet::ForbidComparableTEnum::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Ensures RBI shims do not include a call to extend T::Sig -# or to extend T::Helpers -# -# @example -# -# # bad -# module SomeModule -# extend T::Sig -# extend T::Helpers -# -# sig { returns(String) } -# def foo; end -# end -# -# # good -# module SomeModule -# sig { returns(String) } -# def foo; end -# end -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb:25 -class RuboCop::Cop::Sorbet::ForbidExtendTSigHelpersInShims < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb:33 - def extend_t_sig_or_helpers?(param0 = T.unsafe(nil)); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb:37 - def on_send(node); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb:29 -RuboCop::Cop::Sorbet::ForbidExtendTSigHelpersInShims::MSG = T.let(T.unsafe(nil), String) - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb:30 -RuboCop::Cop::Sorbet::ForbidExtendTSigHelpersInShims::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Correct `send` expressions in include statements by constant literals. -# -# Sorbet, the static checker, is not (yet) able to support constructs on the -# following form: -# -# ```ruby -# class MyClass -# include send_expr -# end -# ``` -# -# Multiple occurences of this can be found in Shopify's code base like: -# -# ```ruby -# include Rails.application.routes.url_helpers -# ``` -# or -# ```ruby -# include Polaris::Engine.helpers -# ``` -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_include_const_literal.rb:29 -class RuboCop::Cop::Sorbet::ForbidIncludeConstLiteral < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_include_const_literal.rb:36 - def dynamic_inclusion?(param0 = T.unsafe(nil)); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_include_const_literal.rb:40 - def on_send(node); end - - private - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_include_const_literal.rb:52 - def neither_const_nor_self?(node); end - - # Returns true if the node is within a module declaration that is not anonymous. - # - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_include_const_literal.rb:57 - def within_onymous_module?(node); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_include_const_literal.rb:32 -RuboCop::Cop::Sorbet::ForbidIncludeConstLiteral::MSG = T.let(T.unsafe(nil), String) - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_include_const_literal.rb:33 -RuboCop::Cop::Sorbet::ForbidIncludeConstLiteral::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Check that code does not call `mixes_in_class_methods` from Sorbet `T::Helpers`. -# -# Good: -# -# ``` -# module M -# extend ActiveSupport::Concern -# -# class_methods do -# ... -# end -# end -# ``` -# -# Bad: -# -# ``` -# module M -# extend T::Helpers -# -# module ClassMethods -# ... -# end -# -# mixes_in_class_methods(ClassMethods) -# end -# ``` -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_mixes_in_class_methods.rb:33 -class RuboCop::Cop::Sorbet::ForbidMixesInClassMethods < ::RuboCop::Cop::Base - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_mixes_in_class_methods.rb:38 - def mixes_in_class_methods?(param0 = T.unsafe(nil)); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_mixes_in_class_methods.rb:45 - def on_csend(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_mixes_in_class_methods.rb:42 - def on_send(node); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_mixes_in_class_methods.rb:34 -RuboCop::Cop::Sorbet::ForbidMixesInClassMethods::MSG = T.let(T.unsafe(nil), String) - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_mixes_in_class_methods.rb:35 -RuboCop::Cop::Sorbet::ForbidMixesInClassMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Makes sure that RBI files are always located under the defined allowed paths. -# -# Options: -# -# * `AllowedPaths`: A list of the paths where RBI files are allowed (default: ["rbi/**", "sorbet/rbi/**"]) -# -# @example -# # bad -# # lib/some_file.rbi -# # other_file.rbi -# -# # good -# # rbi/external_interface.rbi -# # sorbet/rbi/some_file.rbi -# # sorbet/rbi/any/path/for/file.rbi -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_allowed_paths.rb:23 -class RuboCop::Cop::Sorbet::ForbidRBIOutsideOfAllowedPaths < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_allowed_paths.rb:26 - def on_new_investigation; end - - private - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_allowed_paths.rb:48 - def allowed_paths; end -end - -# Check that definitions do not use a `sig` block. -# -# Good: -# -# ``` -# #: -> void -# def foo; end -# ``` -# -# Bad: -# -# ``` -# sig { void } -# def foo; end -# ``` -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/forbid_sig.rb:23 -class RuboCop::Cop::Sorbet::ForbidSig < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Sorbet::SignatureHelp - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/forbid_sig.rb:28 - def on_signature(node); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/forbid_sig.rb:26 -RuboCop::Cop::Sorbet::ForbidSig::MSG = T.let(T.unsafe(nil), String) - -# Check that definitions do not use a `sig` block. -# -# Good: -# -# ``` -# #: -> void -# def foo; end -# ``` -# -# Bad: -# -# ``` -# T::Sig.sig { void } -# def foo; end -# ``` -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/forbid_sig_with_runtime.rb:23 -class RuboCop::Cop::Sorbet::ForbidSigWithRuntime < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Sorbet::SignatureHelp - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/forbid_sig_with_runtime.rb:28 - def on_signature(node); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/forbid_sig_with_runtime.rb:26 -RuboCop::Cop::Sorbet::ForbidSigWithRuntime::MSG = T.let(T.unsafe(nil), String) - -# Check that `sig` is used instead of `T::Sig::WithoutRuntime.sig`. -# -# Good: -# -# ``` -# sig { void } -# def foo; end -# ``` -# -# Bad: -# -# ``` -# T::Sig::WithoutRuntime.sig { void } -# def foo; end -# ``` -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/forbid_sig_without_runtime.rb:23 -class RuboCop::Cop::Sorbet::ForbidSigWithoutRuntime < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Sorbet::SignatureHelp - extend ::RuboCop::Cop::AutoCorrector - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/forbid_sig_without_runtime.rb:29 - def on_signature(node); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/forbid_sig_without_runtime.rb:27 -RuboCop::Cop::Sorbet::ForbidSigWithoutRuntime::MSG = T.let(T.unsafe(nil), String) - -# Correct superclass `send` expressions by constant literals. -# -# Sorbet, the static checker, is not (yet) able to support constructs on the -# following form: -# -# ```ruby -# class Foo < send_expr; end -# ``` -# -# Multiple occurences of this can be found in Shopify's code base like: -# -# ```ruby -# class ShopScope < Component::TrustedIdScope[ShopIdentity::ShopId] -# ``` -# or -# ```ruby -# class ApiClientEligibility < Struct.new(:api_client, :match_results, :shop) -# ``` -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb:28 -class RuboCop::Cop::Sorbet::ForbidSuperclassConstLiteral < ::RuboCop::Cop::Base - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb:32 - def dynamic_superclass?(param0 = T.unsafe(nil)); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb:36 - def on_class(node); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb:29 -RuboCop::Cop::Sorbet::ForbidSuperclassConstLiteral::MSG = T.let(T.unsafe(nil), String) - -# Disallows using `T.absurd` anywhere. -# -# @example -# -# # bad -# T.absurd(foo) -# -# # good -# x #: absurd -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_absurd.rb:17 -class RuboCop::Cop::Sorbet::ForbidTAbsurd < ::RuboCop::Cop::Base - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_absurd.rb:27 - def on_csend(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_absurd.rb:24 - def on_send(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_absurd.rb:22 - def t_absurd?(param0 = T.unsafe(nil)); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_absurd.rb:18 -RuboCop::Cop::Sorbet::ForbidTAbsurd::MSG = T.let(T.unsafe(nil), String) - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_absurd.rb:19 -RuboCop::Cop::Sorbet::ForbidTAbsurd::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Detect and autocorrect `T.any(..., NilClass, ...)` to `T.nilable(...)` -# -# @example -# -# # bad -# T.any(String, NilClass) -# T.any(NilClass, String) -# T.any(NilClass, Symbol, String) -# -# # good -# T.nilable(String) -# T.nilable(String) -# T.nilable(T.any(Symbol, String)) -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_any_with_nil.rb:19 -class RuboCop::Cop::Sorbet::ForbidTAnyWithNil < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_any_with_nil.rb:31 - def nil_const_node?(param0 = T.unsafe(nil)); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_any_with_nil.rb:48 - def on_csend(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_any_with_nil.rb:35 - def on_send(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_any_with_nil.rb:26 - def t_any_call?(param0 = T.unsafe(nil)); end - - private - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_any_with_nil.rb:52 - def build_replacement(non_nil_args); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_any_with_nil.rb:22 -RuboCop::Cop::Sorbet::ForbidTAnyWithNil::MSG = T.let(T.unsafe(nil), String) - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_any_with_nil.rb:23 -RuboCop::Cop::Sorbet::ForbidTAnyWithNil::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Disallows using `T.bind` anywhere. -# -# @example -# -# # bad -# T.bind(self, Integer) -# -# # good -# #: self as Integer -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_bind.rb:17 -class RuboCop::Cop::Sorbet::ForbidTBind < ::RuboCop::Cop::Base - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_bind.rb:27 - def on_csend(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_bind.rb:24 - def on_send(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_bind.rb:22 - def t_bind?(param0 = T.unsafe(nil)); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_bind.rb:18 -RuboCop::Cop::Sorbet::ForbidTBind::MSG = T.let(T.unsafe(nil), String) - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_bind.rb:19 -RuboCop::Cop::Sorbet::ForbidTBind::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Disallows using `T.cast` anywhere. -# -# @example -# -# # bad -# T.cast(foo, Integer) -# -# # good -# foo #: as Integer -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_cast.rb:17 -class RuboCop::Cop::Sorbet::ForbidTCast < ::RuboCop::Cop::Base - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_cast.rb:27 - def on_csend(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_cast.rb:24 - def on_send(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_cast.rb:22 - def t_cast?(param0 = T.unsafe(nil)); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_cast.rb:18 -RuboCop::Cop::Sorbet::ForbidTCast::MSG = T.let(T.unsafe(nil), String) - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_cast.rb:19 -RuboCop::Cop::Sorbet::ForbidTCast::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Disallow using `T::Enum`. -# -# @example -# -# # bad -# class MyEnum < T::Enum -# enums do -# A = new -# B = new -# end -# end -# -# # good -# class MyEnum -# A = "a" -# B = "b" -# C = "c" -# end -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_enum.rb:26 -class RuboCop::Cop::Sorbet::ForbidTEnum < ::RuboCop::Cop::Base - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_enum.rb:34 - def on_class(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_enum.rb:30 - def t_enum?(param0 = T.unsafe(nil)); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_enum.rb:27 -RuboCop::Cop::Sorbet::ForbidTEnum::MSG = T.let(T.unsafe(nil), String) - -# Forbids `extend T::Helpers` and `include T::Helpers` in classes and modules. -# -# This is useful when using RBS or RBS-inline syntax for type signatures, -# where `T::Helpers` is not needed and including it is redundant. -# -# @example -# -# # bad -# class Example -# extend T::Helpers -# end -# -# # bad -# module Example -# include T::Helpers -# end -# -# # good -# class Example -# end -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_helpers.rb:26 -class RuboCop::Cop::Sorbet::ForbidTHelpers < ::RuboCop::Cop::Base - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_helpers.rb:40 - def on_csend(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_helpers.rb:35 - def on_send(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_helpers.rb:31 - def t_helpers?(param0 = T.unsafe(nil)); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_helpers.rb:27 -RuboCop::Cop::Sorbet::ForbidTHelpers::MSG = T.let(T.unsafe(nil), String) - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_helpers.rb:28 -RuboCop::Cop::Sorbet::ForbidTHelpers::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Disallows using `T.let` anywhere. -# -# @example -# -# # bad -# T.let(foo, Integer) -# -# # good -# foo #: Integer -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_let.rb:17 -class RuboCop::Cop::Sorbet::ForbidTLet < ::RuboCop::Cop::Base - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_let.rb:27 - def on_csend(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_let.rb:24 - def on_send(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_let.rb:22 - def t_let?(param0 = T.unsafe(nil)); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_let.rb:18 -RuboCop::Cop::Sorbet::ForbidTLet::MSG = T.let(T.unsafe(nil), String) - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_let.rb:19 -RuboCop::Cop::Sorbet::ForbidTLet::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Disallows using `T.must` anywhere. -# -# @example -# -# # bad -# T.must(foo) -# -# # good -# foo #: as !nil -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_must.rb:17 -class RuboCop::Cop::Sorbet::ForbidTMust < ::RuboCop::Cop::Base - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_must.rb:27 - def on_csend(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_must.rb:24 - def on_send(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_must.rb:22 - def t_must?(param0 = T.unsafe(nil)); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_must.rb:18 -RuboCop::Cop::Sorbet::ForbidTMust::MSG = T.let(T.unsafe(nil), String) - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_must.rb:19 -RuboCop::Cop::Sorbet::ForbidTMust::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Forbids `extend T::Sig` and `include T::Sig` in classes and modules. -# -# This is useful when using RBS or RBS-inline syntax for type signatures, -# where `T::Sig` is not needed and including it is redundant. -# -# @example -# -# # bad -# class Example -# extend T::Sig -# end -# -# # bad -# module Example -# include T::Sig -# end -# -# # good -# class Example -# end -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_sig.rb:26 -class RuboCop::Cop::Sorbet::ForbidTSig < ::RuboCop::Cop::Base - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_sig.rb:40 - def on_csend(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_sig.rb:35 - def on_send(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_sig.rb:31 - def t_sig?(param0 = T.unsafe(nil)); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_sig.rb:27 -RuboCop::Cop::Sorbet::ForbidTSig::MSG = T.let(T.unsafe(nil), String) - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_sig.rb:28 -RuboCop::Cop::Sorbet::ForbidTSig::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Disallow using `T::Struct` and `T::Props`. -# -# @example -# -# # bad -# class MyStruct < T::Struct -# const :foo, String -# prop :bar, Integer, default: 0 -# -# def some_method; end -# end -# -# # good -# class MyStruct -# extend T::Sig -# -# sig { returns(String) } -# attr_reader :foo -# -# sig { returns(Integer) } -# attr_accessor :bar -# -# sig { params(foo: String, bar: Integer) } -# def initialize(foo:, bar: 0) -# @foo = foo -# @bar = bar -# end -# -# def some_method; end -# end -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:38 -class RuboCop::Cop::Sorbet::ForbidTStruct < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::CommentsHelp - extend ::RuboCop::Cop::AutoCorrector - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:169 - def on_class(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:210 - def on_send(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:167 - def t_props?(param0 = T.unsafe(nil)); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:162 - def t_struct?(param0 = T.unsafe(nil)); end - - private - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:218 - def initialize_method(indent, props); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:258 - def previous_line_blank?(node); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:47 -RuboCop::Cop::Sorbet::ForbidTStruct::MSG_PROPS = T.let(T.unsafe(nil), String) - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:46 -RuboCop::Cop::Sorbet::ForbidTStruct::MSG_STRUCT = T.let(T.unsafe(nil), String) - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:104 -class RuboCop::Cop::Sorbet::ForbidTStruct::Property - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:107 - def initialize(node, kind, name, type, default:, factory:); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:123 - def attr_accessor; end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:119 - def attr_sig; end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:105 - def default; end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:105 - def factory; end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:144 - def initialize_assign; end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:131 - def initialize_param; end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:127 - def initialize_sig_param; end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:105 - def kind; end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:105 - def name; end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:151 - def nilable?; end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:105 - def node; end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:155 - def type; end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:44 -RuboCop::Cop::Sorbet::ForbidTStruct::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# This class walks down the class body of a T::Struct and collects all the properties that will need to be -# translated into `attr_reader` and `attr_accessor` methods. -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:51 -class RuboCop::Cop::Sorbet::ForbidTStruct::TStructWalker - include ::RuboCop::AST::Traversal - extend ::RuboCop::AST::NodePattern::Macros - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:57 - def initialize; end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:63 - def extend_t_sig?(param0 = T.unsafe(nil)); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:55 - def has_extend_t_sig; end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:72 - def on_send(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:55 - def props; end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_struct.rb:68 - def t_struct_prop?(param0 = T.unsafe(nil)); end -end - -# Disallows using `T.type_alias` anywhere. -# -# @example -# -# # bad -# STRING_OR_INTEGER = T.type_alias { T.any(Integer, String) } -# -# # good -# #: type string_or_integer = Integer | String -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_type_alias.rb:17 -class RuboCop::Cop::Sorbet::ForbidTTypeAlias < ::RuboCop::Cop::Base - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_type_alias.rb:23 - def on_block(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_type_alias.rb:26 - def on_numblock(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_type_alias.rb:21 - def t_type_alias?(param0 = T.unsafe(nil)); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_type_alias.rb:18 -RuboCop::Cop::Sorbet::ForbidTTypeAlias::MSG = T.let(T.unsafe(nil), String) - -# Disallows using `T.unsafe` anywhere. -# -# @example -# -# # bad -# T.unsafe(foo) -# -# # good -# foo -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_unsafe.rb:17 -class RuboCop::Cop::Sorbet::ForbidTUnsafe < ::RuboCop::Cop::Base - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_unsafe.rb:27 - def on_csend(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_unsafe.rb:24 - def on_send(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_unsafe.rb:22 - def t_unsafe?(param0 = T.unsafe(nil)); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_unsafe.rb:18 -RuboCop::Cop::Sorbet::ForbidTUnsafe::MSG = T.let(T.unsafe(nil), String) - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_unsafe.rb:19 -RuboCop::Cop::Sorbet::ForbidTUnsafe::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Disallows using `T.untyped` anywhere. -# -# @example -# -# # bad -# sig { params(my_argument: T.untyped).void } -# def foo(my_argument); end -# -# # good -# sig { params(my_argument: String).void } -# def foo(my_argument); end -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_untyped.rb:20 -class RuboCop::Cop::Sorbet::ForbidTUntyped < ::RuboCop::Cop::Base - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_untyped.rb:27 - def on_send(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_untyped.rb:25 - def t_untyped?(param0 = T.unsafe(nil)); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_untyped.rb:21 -RuboCop::Cop::Sorbet::ForbidTUntyped::MSG = T.let(T.unsafe(nil), String) - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_t_untyped.rb:22 -RuboCop::Cop::Sorbet::ForbidTUntyped::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Disallows defining type aliases that contain shapes -# -# @example -# -# # bad -# Foo = T.type_alias { { foo: Integer } } -# -# # good -# class Foo -# extend T::Sig -# -# sig { params(foo: Integer).void } -# def initialize(foo) -# @foo = foo -# end -# end -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_type_aliased_shapes.rb:24 -class RuboCop::Cop::Sorbet::ForbidTypeAliasedShapes < ::RuboCop::Cop::Base - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_type_aliased_shapes.rb:36 - def on_block(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_type_aliased_shapes.rb:40 - def on_numblock(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_type_aliased_shapes.rb:28 - def shape_type_alias?(param0 = T.unsafe(nil)); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_type_aliased_shapes.rb:25 -RuboCop::Cop::Sorbet::ForbidTypeAliasedShapes::MSG = T.let(T.unsafe(nil), String) - -# Disallows use of `T.untyped` or `T.nilable(T.untyped)` -# as a prop type for `T::Struct` or `T::ImmutableStruct`. -# -# @example -# -# # bad -# class SomeClass < T::Struct -# const :foo, T.untyped -# prop :bar, T.nilable(T.untyped) -# end -# -# # good -# class SomeClass < T::Struct -# const :foo, Integer -# prop :bar, T.nilable(String) -# end -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb:25 -class RuboCop::Cop::Sorbet::ForbidUntypedStructProps < ::RuboCop::Cop::Base - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb:54 - def on_class(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb:44 - def subclass_of_t_struct?(param0 = T.unsafe(nil)); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb:39 - def t_nilable_untyped(param0 = T.unsafe(nil)); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb:29 - def t_struct(param0 = T.unsafe(nil)); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb:34 - def t_untyped(param0 = T.unsafe(nil)); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb:50 - def untyped_props(param0); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb:26 -RuboCop::Cop::Sorbet::ForbidUntypedStructProps::MSG = T.let(T.unsafe(nil), String) - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi_versioning/gem_version_annotation_helper.rb:6 -module RuboCop::Cop::Sorbet::GemVersionAnnotationHelper - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi_versioning/gem_version_annotation_helper.rb:9 - def gem_version_annotations; end - - private - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi_versioning/gem_version_annotation_helper.rb:17 - def gem_version_annotation?(comment); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi_versioning/gem_version_annotation_helper.rb:21 - def gem_versions(comment); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi_versioning/gem_version_annotation_helper.rb:7 -RuboCop::Cop::Sorbet::GemVersionAnnotationHelper::VERSION_PREFIX = T.let(T.unsafe(nil), String) - -# Makes the Sorbet typed sigil mandatory in all files. -# -# Options: -# -# * `SuggestedStrictness`: Sorbet strictness level suggested in offense messages (default: 'false') -# * `MinimumStrictness`: If set, make offense if the strictness level in the file is below this one -# -# If a `SuggestedStrictness` level is specified, it will be used in autocorrect. -# If a `MinimumStrictness` level is specified, it will be used in offense messages and autocorrect. -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/has_sigil.rb:18 -class RuboCop::Cop::Sorbet::HasSigil < ::RuboCop::Cop::Sorbet::ValidSigil - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/has_sigil.rb:19 - def require_sigil_on_all_files?; end -end - -# Makes the Sorbet `ignore` sigil mandatory in all files. -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/ignore_sigil.rb:10 -class RuboCop::Cop::Sorbet::IgnoreSigil < ::RuboCop::Cop::Sorbet::HasSigil - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/ignore_sigil.rb:11 - def minimum_strictness; end -end - -# Disallows declaring implicit conversion methods. -# Since Sorbet is a nominal (not structural) type system, -# implicit conversion is currently unsupported. -# -# @example -# -# # bad -# def to_str; end -# -# # good -# def to_str(x); end -# -# # bad -# def self.to_str; end -# -# # good -# def self.to_str(x); end -# -# # bad -# alias to_str to_s -# -# @see https://docs.ruby-lang.org/en/master/implicit_conversion_rdoc.html -# @note Since the arity of aliased methods is not checked, false positives may result. -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/implicit_conversion_method.rb:31 -class RuboCop::Cop::Sorbet::ImplicitConversionMethod < ::RuboCop::Cop::Base - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/implicit_conversion_method.rb:37 - def on_alias(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/implicit_conversion_method.rb:42 - def on_def(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/implicit_conversion_method.rb:48 - def on_defs(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/implicit_conversion_method.rb:50 - def on_send(node); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/implicit_conversion_method.rb:32 -RuboCop::Cop::Sorbet::ImplicitConversionMethod::IMPLICIT_CONVERSION_METHODS = T.let(T.unsafe(nil), Array) - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/implicit_conversion_method.rb:33 -RuboCop::Cop::Sorbet::ImplicitConversionMethod::MSG = T.let(T.unsafe(nil), String) - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/implicit_conversion_method.rb:35 -RuboCop::Cop::Sorbet::ImplicitConversionMethod::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for the ordering of keyword arguments required by -# sorbet-runtime. The ordering requires that all keyword arguments -# are at the end of the parameters list, and all keyword arguments -# with a default value must be after those without default values. -# -# @example -# -# # bad -# sig { params(a: Integer, b: String).void } -# def foo(a: 1, b:); end -# -# # good -# sig { params(b: String, a: Integer).void } -# def foo(b:, a: 1); end -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb:20 -class RuboCop::Cop::Sorbet::KeywordArgumentOrdering < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Sorbet::SignatureHelp - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb:23 - def on_signature(node); end - - private - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb:34 - def check_order_for_kwoptargs(parameters); end -end - -# Disallow creating a `T::Enum` with less than two values. -# -# @example -# -# # bad -# class ErrorMessages < T::Enum -# enums do -# ServerError = new("There was a server error.") -# end -# end -# -# # good -# class ErrorMessages < T::Enum -# enums do -# ServerError = new("There was a server error.") -# NotFound = new("The resource was not found.") -# end -# end -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/t_enum/multiple_t_enum_values.rb:24 -class RuboCop::Cop::Sorbet::MultipleTEnumValues < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Sorbet::TEnum - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/t_enum/multiple_t_enum_values.rb:30 - def enums_block?(param0 = T.unsafe(nil)); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/t_enum/multiple_t_enum_values.rb:40 - def on_block(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/t_enum/multiple_t_enum_values.rb:34 - def on_class(node); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/t_enum/multiple_t_enum_values.rb:27 -RuboCop::Cop::Sorbet::MultipleTEnumValues::MSG = T.let(T.unsafe(nil), String) - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb:8 -module RuboCop::Cop::Sorbet::MutableConstantSorbetAwareBehaviour - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb:18 - def on_assignment(value); end - - class << self - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb:10 - def prepended(base); end - end -end - -# Checks for the obsolete pattern for initializing instance variables that was required for older Sorbet -# -# It's no longer required, as of Sorbet 0.5.10210 -# See https://sorbet.org/docs/type-assertions#put-type-assertions-behind-memoization -# -# @example -# -# # bad -# sig { returns(Foo) } -# def foo -# @foo = T.let(@foo, T.nilable(Foo)) -# @foo ||= Foo.new -# end -# -# # bad -# sig { returns(Foo) } -# def foo -# # This would have been a mistake, causing the memoized value to be discarded and recomputed on every call. -# @foo = T.let(nil, T.nilable(Foo)) -# @foo ||= Foo.new -# end -# -# # good -# sig { returns(Foo) } -# def foo -# @foo ||= T.let(Foo.new, T.nilable(Foo)) -# end -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/obsolete_strict_memoization.rb:37 -class RuboCop::Cop::Sorbet::ObsoleteStrictMemoization < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::MatchRange - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::LineLengthHelp - include ::RuboCop::Cop::Sorbet::TargetSorbetVersion - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::Sorbet::TargetSorbetVersion::ClassMethods - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/obsolete_strict_memoization.rb:51 - def legacy_memoization_pattern?(param0 = T.unsafe(nil)); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/obsolete_strict_memoization.rb:62 - def on_begin(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/obsolete_strict_memoization.rb:86 - def relevant_file?(file); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/obsolete_strict_memoization.rb:47 -RuboCop::Cop::Sorbet::ObsoleteStrictMemoization::MSG = T.let(T.unsafe(nil), String) - -# Forbids the use of redundant `extend T::Sig`. Only for use in -# applications that monkey patch `Module.include(T::Sig)` globally, -# which would make it redundant. -# -# @safety -# This cop should not be enabled in applications that have not monkey -# patched `Module`. -# -# @example -# # bad -# class Example -# extend T::Sig -# sig { void } -# def no_op; end -# end -# -# # good -# class Example -# sig { void } -# def no_op; end -# end -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb:28 -class RuboCop::Cop::Sorbet::RedundantExtendTSig < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb:36 - def extend_t_sig?(param0 = T.unsafe(nil)); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb:40 - def on_send(node); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb:32 -RuboCop::Cop::Sorbet::RedundantExtendTSig::MSG = T.let(T.unsafe(nil), String) - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb:33 -RuboCop::Cop::Sorbet::RedundantExtendTSig::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Prevents unnecessary `T.let` in `initialize` methods. When a signature parameter is assigned to an instance variable, the type is inferred automatically. -# -# @example -# -# # bad -# sig { params(a: Integer) } -# def initialize(a) -# @a = T.let(a, Integer) -# end -# -# # good -# sig { params(a: Integer) } -# def initialize(a) -# @a = a -# end -# -# # good -# sig { params(a: Integer) } -# def initialize(a) -# @a = T.let(a, T.any(Integer, String)) -# end -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let.rb:27 -class RuboCop::Cop::Sorbet::RedundantTLet < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Sorbet::SignatureHelp - extend ::RuboCop::Cop::AutoCorrector - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let.rb:39 - def on_def(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let.rb:37 - def sig_params(param0 = T.unsafe(nil)); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let.rb:34 - def t_let(param0 = T.unsafe(nil)); end - - private - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let.rb:103 - def expected_type(sig_type, arg_kind); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let.rb:88 - def find_redundant_t_let(node, tlet_key, tlet_value, sig_params, method_args); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let.rb:60 - def find_sig_node(method_node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let.rb:80 - def ivar_assignments(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let.rb:69 - def normalize_whitespace(source); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let.rb:31 -RuboCop::Cop::Sorbet::RedundantTLet::MSG = T.let(T.unsafe(nil), String) - -# Checks for redundant `T.let` declarations where the first argument -# is a simple literal (not a collection like Array or Hash) and the -# second argument is the matching class name. Sorbet can infer the types -# of simple literals automatically, so wrapping them in `T.let` is -# redundant. -# -# @example -# # bad -# MAX_RETRIES = T.let(3, Integer) -# GREETING = T.let("hello", String) -# RATE = T.let(1.5, Float) -# PATTERN = T.let(/foo/, Regexp) -# STATUS = T.let(:active, Symbol) -# -# # good -# MAX_RETRIES = 3 -# GREETING = "hello" -# RATE = 1.5 -# PATTERN = /foo/ -# STATUS = :active -# -# # good — collections still need T.let -# NAMES = T.let(["alice", "bob"], T::Array[String]) -# OPTIONS = T.let({ verbose: true }, T::Hash[Symbol, T::Boolean]) -# -# # good — type is not the literal's own class -# value = T.let("hello", T.nilable(String)) -# -# # good — instance variables need T.let for Sorbet to track their type -# @max_retries = T.let(3, Integer) -# -# # good — local variables may need T.let so Sorbet allows reassignment -# count = T.let(0, Integer) -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let_for_literal.rb:41 -class RuboCop::Cop::Sorbet::RedundantTLetForLiteral < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let_for_literal.rb:61 - def on_casgn(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let_for_literal.rb:47 - def t_let_with_literal_and_class?(param0 = T.unsafe(nil)); end -end - -# Maps AST literal node types to the class name Sorbet would infer. -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let_for_literal.rb:52 -RuboCop::Cop::Sorbet::RedundantTLetForLiteral::LITERAL_TYPE_TO_CLASS = T.let(T.unsafe(nil), Hash) - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/redundant_t_let_for_literal.rb:44 -RuboCop::Cop::Sorbet::RedundantTLetForLiteral::MSG = T.let(T.unsafe(nil), String) - -# Checks for the use of Ruby Refinements library. Refinements add -# complexity and incur a performance penalty that can be significant -# for large code bases. Good examples are cases of unrelated -# methods that happen to have the same name as these module methods. -# -# @example -# # bad -# module Foo -# refine(Date) do -# end -# end -# -# # bad -# module Foo -# using(Date) do -# end -# end -# -# # good -# module Foo -# bar.refine(Date) -# end -# -# # good -# module Foo -# bar.using(Date) -# end -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/refinement.rb:34 -class RuboCop::Cop::Sorbet::Refinement < ::RuboCop::Cop::Base - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/refinement.rb:38 - def on_send(node); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/refinement.rb:35 -RuboCop::Cop::Sorbet::Refinement::MSG = T.let(T.unsafe(nil), String) - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/refinement.rb:36 -RuboCop::Cop::Sorbet::Refinement::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks that `on_failure` is not used without `checked(:tests)` or `checked(:always)`. -# -# @example -# -# # bad -# sig { params(x: Integer).returns(Integer).on_failure(:raise) } -# def plus_one(x) -# x + 1 -# end -# -# # good -# sig { params(x: Integer).returns(Integer).checked(:always).on_failure(:raise) } -# def plus_one(x) -# x + 1 -# end -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/runtime_on_failure_depends_on_checked.rb:22 -class RuboCop::Cop::Sorbet::RuntimeOnFailureDependsOnChecked < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Sorbet::SignatureHelp - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/runtime_on_failure_depends_on_checked.rb:33 - def checked_tests_or_always?(param0 = T.unsafe(nil)); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/runtime_on_failure_depends_on_checked.rb:28 - def on_failure_call?(param0 = T.unsafe(nil)); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/runtime_on_failure_depends_on_checked.rb:37 - def on_signature(node); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/runtime_on_failure_depends_on_checked.rb:25 -RuboCop::Cop::Sorbet::RuntimeOnFailureDependsOnChecked::MSG = T.let(T.unsafe(nil), String) - -# Suggests using `grep` over `select` when using it only for type narrowing. -# -# @example -# -# # bad -# strings_or_integers.select { |e| e.is_a?(String) } -# strings_or_integers.filter { |e| e.is_a?(String) } -# strings_or_integers.select { |e| e.kind_of?(String) } -# -# # good -# strings_or_integers.grep(String) -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/select_by_is_a.rb:19 -class RuboCop::Cop::Sorbet::SelectByIsA < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/select_by_is_a.rb:58 - def on_csend(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/select_by_is_a.rb:43 - def on_send(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/select_by_is_a.rb:26 - def type_narrowing_select?(param0 = T.unsafe(nil)); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/select_by_is_a.rb:22 -RuboCop::Cop::Sorbet::SelectByIsA::MSG = T.let(T.unsafe(nil), String) - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/select_by_is_a.rb:23 -RuboCop::Cop::Sorbet::SelectByIsA::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for the correct order of `sig` builder methods. -# -# Options: -# -# * `Order`: The order in which to enforce the builder methods are called. -# -# @example -# # bad -# sig { void.abstract } -# -# # good -# sig { abstract.void } -# -# # bad -# sig { returns(Integer).params(x: Integer) } -# -# # good -# sig { params(x: Integer).returns(Integer) } -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/signature_build_order.rb:24 -class RuboCop::Cop::Sorbet::SignatureBuildOrder < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Sorbet::SignatureHelp - extend ::RuboCop::Cop::AutoCorrector - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/signature_build_order.rb:33 - def on_signature(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/signature_build_order.rb:29 - def root_call(param0); end - - private - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/signature_build_order.rb:96 - def builder_method_indexes; end - - # Split foo.bar.baz into [foo, foo.bar, foo.bar.baz] - # - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/signature_build_order.rb:83 - def call_chain(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/signature_build_order.rb:70 - def expected_source(expected_calls_and_indexes); end -end - -# Mixin for writing cops for signatures, providing a `signature?` node matcher and an `on_signature` trigger. -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/signature_help.rb:7 -module RuboCop::Cop::Sorbet::SignatureHelp - extend ::RuboCop::AST::NodePattern::Macros - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/signature_help.rb:16 - def bare_sig?(param0 = T.unsafe(nil)); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/signature_help.rb:42 - def on_block(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/signature_help.rb:46 - def on_numblock(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/signature_help.rb:48 - def on_signature(_node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/signature_help.rb:25 - def sig_with_runtime?(param0 = T.unsafe(nil)); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/signature_help.rb:34 - def sig_without_runtime?(param0 = T.unsafe(nil)); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/signature_help.rb:11 - def signature?(param0 = T.unsafe(nil)); end -end - -# Ensures empty class/module definitions in RBI files are -# done on a single line rather than being split across multiple lines. -# -# @example -# -# # bad -# module SomeModule -# end -# -# # good -# module SomeModule; end -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb:17 -class RuboCop::Cop::Sorbet::SingleLineRbiClassModuleDefinitions < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb:30 - def on_class(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb:22 - def on_module(node); end - - private - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb:34 - def convert_newlines_to_semicolons(source); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb:20 -RuboCop::Cop::Sorbet::SingleLineRbiClassModuleDefinitions::MSG = T.let(T.unsafe(nil), String) - -# Makes the Sorbet `strict` sigil mandatory in all files. -# -# @safety -# This cop is unsafe because Sorbet sigils may not exist yet when it is run. -# -# @example -# -# # bad -# -# # bad -# -# # good -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/strict_sigil.rb:25 -class RuboCop::Cop::Sorbet::StrictSigil < ::RuboCop::Cop::Sorbet::HasSigil - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/strict_sigil.rb:26 - def minimum_strictness; end -end - -# Makes the Sorbet `strong` sigil mandatory in all files. -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/strong_sigil.rb:10 -class RuboCop::Cop::Sorbet::StrongSigil < ::RuboCop::Cop::Sorbet::HasSigil - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/strong_sigil.rb:11 - def minimum_strictness; end -end - -# Mixing for writing cops that deal with `T::Enum`s -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/t_enum.rb:7 -module RuboCop::Cop::Sorbet::TEnum - extend ::RuboCop::AST::NodePattern::Macros - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/t_enum.rb:9 - def initialize(*_arg0); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/t_enum.rb:23 - def after_class(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/t_enum.rb:19 - def on_class(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/t_enum.rb:15 - def t_enum?(param0 = T.unsafe(nil)); end - - private - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/t_enum.rb:29 - def in_t_enum_class?; end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb:6 -module RuboCop::Cop::Sorbet::TargetSorbetVersion - mixes_in_class_methods ::RuboCop::Cop::Sorbet::TargetSorbetVersion::ClassMethods - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb:28 - def enabled_for_sorbet_static_version?; end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb:44 - def read_sorbet_static_version_from_bundler_lock_file; end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb:24 - def sorbet_enabled?; end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb:35 - def target_sorbet_static_version_from_bundler_lock_file; end - - class << self - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb:8 - def included(target); end - end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb:13 -module RuboCop::Cop::Sorbet::TargetSorbetVersion::ClassMethods - # Sets the version of the Sorbet static type checker required by this cop - # - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb:15 - def minimum_target_sorbet_static_version(version); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb:19 - def supports_target_sorbet_static_version?(version); end -end - -# Makes the Sorbet `true` sigil mandatory in all files. -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/true_sigil.rb:10 -class RuboCop::Cop::Sorbet::TrueSigil < ::RuboCop::Cop::Sorbet::HasSigil - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/true_sigil.rb:11 - def minimum_strictness; end -end - -# Ensures all constants used as `T.type_alias` are using CamelCase. -# -# @example -# -# # bad -# FOO_OR_BAR = T.type_alias { T.any(Foo, Bar) } -# -# # good -# FooOrBar = T.type_alias { T.any(Foo, Bar) } -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/type_alias_name.rb:17 -class RuboCop::Cop::Sorbet::TypeAliasName < ::RuboCop::Cop::Base - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/type_alias_name.rb:32 - def on_casgn(node); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/type_alias_name.rb:21 - def underscored_type_alias?(param0 = T.unsafe(nil)); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/type_alias_name.rb:18 -RuboCop::Cop::Sorbet::TypeAliasName::MSG = T.let(T.unsafe(nil), String) - -# Checks that gem versions in RBI annotations are properly formatted per the Bundler gem specification. -# -# @example -# # bad -# # @version > not a version number -# -# # good -# # @version = 1 -# -# # good -# # @version > 1.2.3 -# -# # good -# # @version <= 4.3-preview -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi_versioning/valid_gem_version_annotations.rb:21 -class RuboCop::Cop::Sorbet::ValidGemVersionAnnotations < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Sorbet::GemVersionAnnotationHelper - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi_versioning/valid_gem_version_annotations.rb:27 - def on_new_investigation; end - - private - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi_versioning/valid_gem_version_annotations.rb:50 - def valid_version?(version_string); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi_versioning/valid_gem_version_annotations.rb:24 -RuboCop::Cop::Sorbet::ValidGemVersionAnnotations::MSG = T.let(T.unsafe(nil), String) - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/rbi_versioning/valid_gem_version_annotations.rb:25 -RuboCop::Cop::Sorbet::ValidGemVersionAnnotations::VALID_OPERATORS = T.let(T.unsafe(nil), Array) - -# Checks that every Ruby file contains a valid Sorbet sigil. -# Adapted from: https://gist.github.com/clarkdave/85aca4e16f33fd52aceb6a0a29936e52 -# -# Options: -# -# * `RequireSigilOnAllFiles`: make offense if the Sorbet typed is not found in the file (default: false) -# * `SuggestedStrictness`: Sorbet strictness level suggested in offense messages (default: 'false') -# * `MinimumStrictness`: If set, make offense if the strictness level in the file is below this one -# * `ExactStrictness`: If set, make offense if the strictness level in the file is different than this one -# -# If an `ExactStrictness` level is specified, it will be used in offense messages and autocorrect. -# If a `SuggestedStrictness` level is specified, it will be used in autocorrect. -# Otherwise, if a `MinimumStrictness` level is specified, it will be used in offense messages and autocorrect. -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:21 -class RuboCop::Cop::Sorbet::ValidSigil < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:24 - def on_new_investigation; end - - protected - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:169 - def autocorrect(corrector); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:110 - def check_double_commented_sigil(sigil, strictness); end - - # checks - # - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:59 - def check_sigil_present(sigil); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:137 - def check_strictness_level(sigil, strictness); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:98 - def check_strictness_not_empty(sigil, strictness); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:125 - def check_strictness_valid(sigil, strictness); end - - # Default is `nil` - # - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:203 - def exact_strictness; end - - # extraction - # - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:47 - def extract_sigil(processed_source); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:53 - def extract_strictness(sigil); end - - # Default is `nil` - # - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:197 - def minimum_strictness; end - - # Default is `false` - # - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:186 - def require_sigil_on_all_files?; end - - # Default is `'false'` - # - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:191 - def suggested_strictness; end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:76 - def suggested_strictness_level; end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:43 -RuboCop::Cop::Sorbet::ValidSigil::INVALID_SIGIL_MSG = T.let(T.unsafe(nil), String) - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:42 -RuboCop::Cop::Sorbet::ValidSigil::SIGIL_REGEX = T.let(T.unsafe(nil), Regexp) - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/sigils/valid_sigil.rb:41 -RuboCop::Cop::Sorbet::ValidSigil::STRICTNESS_LEVELS = T.let(T.unsafe(nil), Array) - -# Disallows the usage of `.void.checked(:tests)`. -# -# Using `.void` changes the value returned from the method, but only if -# runtime type checking is enabled for the method. Methods marked `.void` -# will return different values in tests compared with non-test -# environments. This is particularly troublesome if branching on the -# result of a `.void` method, because the returned value in test code -# will be the truthy `VOID` value, while the non-test return value may be -# falsy depending on the method's implementation. -# -# - Use `.returns(T.anything).checked(:tests)` to keep the runtime type -# checking for the rest of the parameters. -# - Use `.void.checked(:never)` if you are on an older version of Sorbet -# which does not have `T.anything` (meaning versions 0.5.10781 or -# earlier. Versions released after 2023-04-14 include `T.anything`.) -# -# @example -# -# # bad -# sig { void.checked(:tests) } -# -# # good -# sig { void } -# sig { returns(T.anything).checked(:tests) } -# sig { void.checked(:never) } -# -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/void_checked_tests.rb:31 -class RuboCop::Cop::Sorbet::VoidCheckedTests < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::Sorbet::SignatureHelp - extend ::RuboCop::Cop::AutoCorrector - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/void_checked_tests.rb:37 - def checked_tests(param0); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/void_checked_tests.rb:58 - def on_signature(node); end - - private - - # pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/void_checked_tests.rb:48 - def top_level_void(node); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/cop/sorbet/signatures/void_checked_tests.rb:41 -RuboCop::Cop::Sorbet::VoidCheckedTests::MESSAGE = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::Style; end - -class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Sorbet::MutableConstantSorbetAwareBehaviour -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/version.rb:4 -module RuboCop::Sorbet; end - -# pkg:gem/rubocop-sorbet#lib/rubocop/sorbet.rb:11 -class RuboCop::Sorbet::Error < ::StandardError; end - -# A plugin that integrates RuboCop Sorbet with RuboCop's plugin system. -# -# pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/plugin.rb:10 -class RuboCop::Sorbet::Plugin < ::LintRoller::Plugin - # pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/plugin.rb:11 - def about; end - - # pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/plugin.rb:24 - def rules(_context); end - - # pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/plugin.rb:20 - def supported?(context); end -end - -# pkg:gem/rubocop-sorbet#lib/rubocop/sorbet/version.rb:5 -RuboCop::Sorbet::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/rubocop-sorbet@0.12.0.rbi b/sorbet/rbi/gems/rubocop-sorbet@0.12.0.rbi new file mode 100644 index 0000000..9dac839 --- /dev/null +++ b/sorbet/rbi/gems/rubocop-sorbet@0.12.0.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rubocop-sorbet` gem. +# Please instead update this file by running `bin/tapioca gem rubocop-sorbet`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem From 80c8052fae67c16006e617a9309c60c0da84c50f Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger Date: Fri, 29 May 2026 16:45:04 -0700 Subject: [PATCH 6/7] Exclude Sorbet-payload gems from tapioca gem RBIs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Several gems (json, date, logger, ...) already have RBIs in Sorbet's payload (sorbet/rbi/stdlib and sorbet/rbi/gems in the sorbet/sorbet repo). Generating them with tapioca only duplicates and conflicts with Sorbet's built-ins, so add them to tapioca's gem.exclude and drop the now-redundant RBI files. rake is intentionally not excluded — thor's RBI references ::Rake::DSL / ::Rake::FileUtilsExt, which the payload rake RBI does not define. Also normalize the config for yamllint (document start, sequence indentation) and drop the empty dsl scaffold. --- sorbet/rbi/gems/base64@0.3.0.rbi | 545 --- sorbet/rbi/gems/benchmark@0.5.0.rbi | 621 --- sorbet/rbi/gems/bigdecimal@4.1.2.rbi | 478 --- sorbet/rbi/gems/date@3.5.1.rbi | 391 -- sorbet/rbi/gems/drb@2.2.3.rbi | 1589 -------- sorbet/rbi/gems/erb@6.0.2.rbi | 1537 -------- sorbet/rbi/gems/json@2.19.7.rbi | 2240 ----------- sorbet/rbi/gems/logger@1.7.0.rbi | 896 ----- sorbet/rbi/gems/pp@0.6.3.rbi | 387 -- sorbet/rbi/gems/psych@5.3.1.rbi | 2385 ------------ sorbet/rbi/gems/racc@1.8.1.rbi | 165 - sorbet/rbi/gems/rdoc@7.2.0.rbi | 9 - sorbet/rbi/gems/reline@0.6.3.rbi | 9 - sorbet/rbi/gems/rexml@3.4.4.rbi | 4905 ------------------------ sorbet/rbi/gems/securerandom@0.4.1.rbi | 75 - sorbet/rbi/gems/stringio@3.2.0.rbi | 9 - sorbet/rbi/gems/tsort@0.2.0.rbi | 389 -- sorbet/rbi/gems/uri@1.1.1.rbi | 2400 ------------ sorbet/tapioca/config.yml | 35 +- 19 files changed, 23 insertions(+), 19042 deletions(-) delete mode 100644 sorbet/rbi/gems/base64@0.3.0.rbi delete mode 100644 sorbet/rbi/gems/benchmark@0.5.0.rbi delete mode 100644 sorbet/rbi/gems/bigdecimal@4.1.2.rbi delete mode 100644 sorbet/rbi/gems/date@3.5.1.rbi delete mode 100644 sorbet/rbi/gems/drb@2.2.3.rbi delete mode 100644 sorbet/rbi/gems/erb@6.0.2.rbi delete mode 100644 sorbet/rbi/gems/json@2.19.7.rbi delete mode 100644 sorbet/rbi/gems/logger@1.7.0.rbi delete mode 100644 sorbet/rbi/gems/pp@0.6.3.rbi delete mode 100644 sorbet/rbi/gems/psych@5.3.1.rbi delete mode 100644 sorbet/rbi/gems/racc@1.8.1.rbi delete mode 100644 sorbet/rbi/gems/rdoc@7.2.0.rbi delete mode 100644 sorbet/rbi/gems/reline@0.6.3.rbi delete mode 100644 sorbet/rbi/gems/rexml@3.4.4.rbi delete mode 100644 sorbet/rbi/gems/securerandom@0.4.1.rbi delete mode 100644 sorbet/rbi/gems/stringio@3.2.0.rbi delete mode 100644 sorbet/rbi/gems/tsort@0.2.0.rbi delete mode 100644 sorbet/rbi/gems/uri@1.1.1.rbi diff --git a/sorbet/rbi/gems/base64@0.3.0.rbi b/sorbet/rbi/gems/base64@0.3.0.rbi deleted file mode 100644 index 9995f72..0000000 --- a/sorbet/rbi/gems/base64@0.3.0.rbi +++ /dev/null @@ -1,545 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `base64` gem. -# Please instead update this file by running `bin/tapioca gem base64`. - - -# \Module \Base64 provides methods for: -# -# - \Encoding a binary string (containing non-ASCII characters) -# as a string of printable ASCII characters. -# - Decoding such an encoded string. -# -# \Base64 is commonly used in contexts where binary data -# is not allowed or supported: -# -# - Images in HTML or CSS files, or in URLs. -# - Email attachments. -# -# A \Base64-encoded string is about one-third larger that its source. -# See the {Wikipedia article}[https://en.wikipedia.org/wiki/Base64] -# for more information. -# -# This module provides three pairs of encode/decode methods. -# Your choices among these methods should depend on: -# -# - Which character set is to be used for encoding and decoding. -# - Whether "padding" is to be used. -# - Whether encoded strings are to contain newlines. -# -# Note: Examples on this page assume that the including program has executed: -# -# require 'base64' -# -# == \Encoding Character Sets -# -# A \Base64-encoded string consists only of characters from a 64-character set: -# -# - ('A'..'Z'). -# - ('a'..'z'). -# - ('0'..'9'). -# - =, the 'padding' character. -# - Either: -# - %w[+ /]: -# {RFC-2045-compliant}[https://datatracker.ietf.org/doc/html/rfc2045]; -# _not_ safe for URLs. -# - %w[- _]: -# {RFC-4648-compliant}[https://datatracker.ietf.org/doc/html/rfc4648]; -# safe for URLs. -# -# If you are working with \Base64-encoded strings that will come from -# or be put into URLs, you should choose this encoder-decoder pair -# of RFC-4648-compliant methods: -# -# - Base64.urlsafe_encode64 and Base64.urlsafe_decode64. -# -# Otherwise, you may choose any of the pairs in this module, -# including the pair above, or the RFC-2045-compliant pairs: -# -# - Base64.encode64 and Base64.decode64. -# - Base64.strict_encode64 and Base64.strict_decode64. -# -# == Padding -# -# \Base64-encoding changes a triplet of input bytes -# into a quartet of output characters. -# -# Padding in Encode Methods -# -# Padding -- extending an encoded string with zero, one, or two trailing -# = characters -- is performed by methods Base64.encode64, -# Base64.strict_encode64, and, by default, Base64.urlsafe_encode64: -# -# Base64.encode64('s') # => "cw==\n" -# Base64.strict_encode64('s') # => "cw==" -# Base64.urlsafe_encode64('s') # => "cw==" -# Base64.urlsafe_encode64('s', padding: false) # => "cw" -# -# When padding is performed, the encoded string is always of length 4n, -# where +n+ is a non-negative integer: -# -# - Input bytes of length 3n generate unpadded output characters -# of length 4n: -# -# # n = 1: 3 bytes => 4 characters. -# Base64.strict_encode64('123') # => "MDEy" -# # n = 2: 6 bytes => 8 characters. -# Base64.strict_encode64('123456') # => "MDEyMzQ1" -# -# - Input bytes of length 3n+1 generate padded output characters -# of length 4(n+1), with two padding characters at the end: -# -# # n = 1: 4 bytes => 8 characters. -# Base64.strict_encode64('1234') # => "MDEyMw==" -# # n = 2: 7 bytes => 12 characters. -# Base64.strict_encode64('1234567') # => "MDEyMzQ1Ng==" -# -# - Input bytes of length 3n+2 generate padded output characters -# of length 4(n+1), with one padding character at the end: -# -# # n = 1: 5 bytes => 8 characters. -# Base64.strict_encode64('12345') # => "MDEyMzQ=" -# # n = 2: 8 bytes => 12 characters. -# Base64.strict_encode64('12345678') # => "MDEyMzQ1Njc=" -# -# When padding is suppressed, for a positive integer n: -# -# - Input bytes of length 3n generate unpadded output characters -# of length 4n: -# -# # n = 1: 3 bytes => 4 characters. -# Base64.urlsafe_encode64('123', padding: false) # => "MDEy" -# # n = 2: 6 bytes => 8 characters. -# Base64.urlsafe_encode64('123456', padding: false) # => "MDEyMzQ1" -# -# - Input bytes of length 3n+1 generate unpadded output characters -# of length 4n+2, with two padding characters at the end: -# -# # n = 1: 4 bytes => 6 characters. -# Base64.urlsafe_encode64('1234', padding: false) # => "MDEyMw" -# # n = 2: 7 bytes => 10 characters. -# Base64.urlsafe_encode64('1234567', padding: false) # => "MDEyMzQ1Ng" -# -# - Input bytes of length 3n+2 generate unpadded output characters -# of length 4n+3, with one padding character at the end: -# -# # n = 1: 5 bytes => 7 characters. -# Base64.urlsafe_encode64('12345', padding: false) # => "MDEyMzQ" -# # m = 2: 8 bytes => 11 characters. -# Base64.urlsafe_encode64('12345678', padding: false) # => "MDEyMzQ1Njc" -# -# Padding in Decode Methods -# -# All of the \Base64 decode methods support (but do not require) padding. -# -# \Method Base64.decode64 does not check the size of the padding: -# -# Base64.decode64("MDEyMzQ1Njc") # => "01234567" -# Base64.decode64("MDEyMzQ1Njc=") # => "01234567" -# Base64.decode64("MDEyMzQ1Njc==") # => "01234567" -# -# \Method Base64.strict_decode64 strictly enforces padding size: -# -# Base64.strict_decode64("MDEyMzQ1Njc") # Raises ArgumentError -# Base64.strict_decode64("MDEyMzQ1Njc=") # => "01234567" -# Base64.strict_decode64("MDEyMzQ1Njc==") # Raises ArgumentError -# -# \Method Base64.urlsafe_decode64 allows padding in the encoded string, -# which if present, must be correct: -# see {Padding}[Base64.html#module-Base64-label-Padding], above: -# -# Base64.urlsafe_decode64("MDEyMzQ1Njc") # => "01234567" -# Base64.urlsafe_decode64("MDEyMzQ1Njc=") # => "01234567" -# Base64.urlsafe_decode64("MDEyMzQ1Njc==") # Raises ArgumentError. -# -# == Newlines -# -# An encoded string returned by Base64.encode64 or Base64.urlsafe_encode64 -# has an embedded newline character -# after each 60-character sequence, and, if non-empty, at the end: -# -# # No newline if empty. -# encoded = Base64.encode64("\x00" * 0) -# encoded.index("\n") # => nil -# -# # Newline at end of short output. -# encoded = Base64.encode64("\x00" * 1) -# encoded.size # => 4 -# encoded.index("\n") # => 4 -# -# # Newline at end of longer output. -# encoded = Base64.encode64("\x00" * 45) -# encoded.size # => 60 -# encoded.index("\n") # => 60 -# -# # Newlines embedded and at end of still longer output. -# encoded = Base64.encode64("\x00" * 46) -# encoded.size # => 65 -# encoded.rindex("\n") # => 65 -# encoded.split("\n").map {|s| s.size } # => [60, 4] -# -# The string to be encoded may itself contain newlines, -# which are encoded as \Base64: -# -# # Base64.encode64("\n\n\n") # => "CgoK\n" -# s = "This is line 1\nThis is line 2\n" -# Base64.encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n" -# -# pkg:gem/base64#lib/base64.rb:184 -module Base64 - private - - # :call-seq: - # Base64.decode(encoded_string) -> decoded_string - # - # Returns a string containing the decoding of an RFC-2045-compliant - # \Base64-encoded string +encoded_string+: - # - # s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n" - # Base64.decode64(s) # => "This is line 1\nThis is line 2\n" - # - # Non-\Base64 characters in +encoded_string+ are ignored; - # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: - # these include newline characters and characters - and /: - # - # Base64.decode64("\x00\n-_") # => "" - # - # Padding in +encoded_string+ (even if incorrect) is ignored: - # - # Base64.decode64("MDEyMzQ1Njc") # => "01234567" - # Base64.decode64("MDEyMzQ1Njc=") # => "01234567" - # Base64.decode64("MDEyMzQ1Njc==") # => "01234567" - # - # pkg:gem/base64#lib/base64.rb:247 - def decode64(str); end - - # :call-seq: - # Base64.encode64(string) -> encoded_string - # - # Returns a string containing the RFC-2045-compliant \Base64-encoding of +string+. - # - # Per RFC 2045, the returned string may contain the URL-unsafe characters - # + or /; - # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: - # - # Base64.encode64("\xFB\xEF\xBE") # => "++++\n" - # Base64.encode64("\xFF\xFF\xFF") # => "////\n" - # - # The returned string may include padding; - # see {Padding}[Base64.html#module-Base64-label-Padding] above. - # - # Base64.encode64('*') # => "Kg==\n" - # - # The returned string ends with a newline character, and if sufficiently long - # will have one or more embedded newline characters; - # see {Newlines}[Base64.html#module-Base64-label-Newlines] above: - # - # Base64.encode64('*') # => "Kg==\n" - # Base64.encode64('*' * 46) - # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq\nKg==\n" - # - # The string to be encoded may itself contain newlines, - # which will be encoded as ordinary \Base64: - # - # Base64.encode64("\n\n\n") # => "CgoK\n" - # s = "This is line 1\nThis is line 2\n" - # Base64.encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n" - # - # pkg:gem/base64#lib/base64.rb:222 - def encode64(bin); end - - # :call-seq: - # Base64.strict_decode64(encoded_string) -> decoded_string - # - # Returns a string containing the decoding of an RFC-2045-compliant - # \Base64-encoded string +encoded_string+: - # - # s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK" - # Base64.strict_decode64(s) # => "This is line 1\nThis is line 2\n" - # - # Non-\Base64 characters in +encoded_string+ are not allowed; - # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: - # these include newline characters and characters - and /: - # - # Base64.strict_decode64("\n") # Raises ArgumentError - # Base64.strict_decode64('-') # Raises ArgumentError - # Base64.strict_decode64('_') # Raises ArgumentError - # - # Padding in +encoded_string+, if present, must be correct: - # - # Base64.strict_decode64("MDEyMzQ1Njc") # Raises ArgumentError - # Base64.strict_decode64("MDEyMzQ1Njc=") # => "01234567" - # Base64.strict_decode64("MDEyMzQ1Njc==") # Raises ArgumentError - # - # pkg:gem/base64#lib/base64.rb:309 - def strict_decode64(str); end - - # :call-seq: - # Base64.strict_encode64(string) -> encoded_string - # - # Returns a string containing the RFC-2045-compliant \Base64-encoding of +string+. - # - # Per RFC 2045, the returned string may contain the URL-unsafe characters - # + or /; - # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: - # - # Base64.strict_encode64("\xFB\xEF\xBE") # => "++++\n" - # Base64.strict_encode64("\xFF\xFF\xFF") # => "////\n" - # - # The returned string may include padding; - # see {Padding}[Base64.html#module-Base64-label-Padding] above. - # - # Base64.strict_encode64('*') # => "Kg==\n" - # - # The returned string will have no newline characters, regardless of its length; - # see {Newlines}[Base64.html#module-Base64-label-Newlines] above: - # - # Base64.strict_encode64('*') # => "Kg==" - # Base64.strict_encode64('*' * 46) - # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg==" - # - # The string to be encoded may itself contain newlines, - # which will be encoded as ordinary \Base64: - # - # Base64.strict_encode64("\n\n\n") # => "CgoK" - # s = "This is line 1\nThis is line 2\n" - # Base64.strict_encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK" - # - # pkg:gem/base64#lib/base64.rb:282 - def strict_encode64(bin); end - - # :call-seq: - # Base64.urlsafe_decode64(encoded_string) -> decoded_string - # - # Returns the decoding of an RFC-4648-compliant \Base64-encoded string +encoded_string+: - # - # +encoded_string+ may not contain non-Base64 characters; - # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: - # - # Base64.urlsafe_decode64('+') # Raises ArgumentError. - # Base64.urlsafe_decode64('/') # Raises ArgumentError. - # Base64.urlsafe_decode64("\n") # Raises ArgumentError. - # - # Padding in +encoded_string+, if present, must be correct: - # see {Padding}[Base64.html#module-Base64-label-Padding], above: - # - # Base64.urlsafe_decode64("MDEyMzQ1Njc") # => "01234567" - # Base64.urlsafe_decode64("MDEyMzQ1Njc=") # => "01234567" - # Base64.urlsafe_decode64("MDEyMzQ1Njc==") # Raises ArgumentError. - # - # pkg:gem/base64#lib/base64.rb:369 - def urlsafe_decode64(str); end - - # :call-seq: - # Base64.urlsafe_encode64(string) -> encoded_string - # - # Returns the RFC-4648-compliant \Base64-encoding of +string+. - # - # Per RFC 4648, the returned string will not contain the URL-unsafe characters - # + or /, - # but instead may contain the URL-safe characters - # - and _; - # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: - # - # Base64.urlsafe_encode64("\xFB\xEF\xBE") # => "----" - # Base64.urlsafe_encode64("\xFF\xFF\xFF") # => "____" - # - # By default, the returned string may have padding; - # see {Padding}[Base64.html#module-Base64-label-Padding], above: - # - # Base64.urlsafe_encode64('*') # => "Kg==" - # - # Optionally, you can suppress padding: - # - # Base64.urlsafe_encode64('*', padding: false) # => "Kg" - # - # The returned string will have no newline characters, regardless of its length; - # see {Newlines}[Base64.html#module-Base64-label-Newlines] above: - # - # Base64.urlsafe_encode64('*') # => "Kg==" - # Base64.urlsafe_encode64('*' * 46) - # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg==" - # - # pkg:gem/base64#lib/base64.rb:343 - def urlsafe_encode64(bin, padding: T.unsafe(nil)); end - - class << self - # :call-seq: - # Base64.decode(encoded_string) -> decoded_string - # - # Returns a string containing the decoding of an RFC-2045-compliant - # \Base64-encoded string +encoded_string+: - # - # s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n" - # Base64.decode64(s) # => "This is line 1\nThis is line 2\n" - # - # Non-\Base64 characters in +encoded_string+ are ignored; - # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: - # these include newline characters and characters - and /: - # - # Base64.decode64("\x00\n-_") # => "" - # - # Padding in +encoded_string+ (even if incorrect) is ignored: - # - # Base64.decode64("MDEyMzQ1Njc") # => "01234567" - # Base64.decode64("MDEyMzQ1Njc=") # => "01234567" - # Base64.decode64("MDEyMzQ1Njc==") # => "01234567" - # - # pkg:gem/base64#lib/base64.rb:247 - def decode64(str); end - - # :call-seq: - # Base64.encode64(string) -> encoded_string - # - # Returns a string containing the RFC-2045-compliant \Base64-encoding of +string+. - # - # Per RFC 2045, the returned string may contain the URL-unsafe characters - # + or /; - # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: - # - # Base64.encode64("\xFB\xEF\xBE") # => "++++\n" - # Base64.encode64("\xFF\xFF\xFF") # => "////\n" - # - # The returned string may include padding; - # see {Padding}[Base64.html#module-Base64-label-Padding] above. - # - # Base64.encode64('*') # => "Kg==\n" - # - # The returned string ends with a newline character, and if sufficiently long - # will have one or more embedded newline characters; - # see {Newlines}[Base64.html#module-Base64-label-Newlines] above: - # - # Base64.encode64('*') # => "Kg==\n" - # Base64.encode64('*' * 46) - # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq\nKg==\n" - # - # The string to be encoded may itself contain newlines, - # which will be encoded as ordinary \Base64: - # - # Base64.encode64("\n\n\n") # => "CgoK\n" - # s = "This is line 1\nThis is line 2\n" - # Base64.encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n" - # - # pkg:gem/base64#lib/base64.rb:222 - def encode64(bin); end - - # :call-seq: - # Base64.strict_decode64(encoded_string) -> decoded_string - # - # Returns a string containing the decoding of an RFC-2045-compliant - # \Base64-encoded string +encoded_string+: - # - # s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK" - # Base64.strict_decode64(s) # => "This is line 1\nThis is line 2\n" - # - # Non-\Base64 characters in +encoded_string+ are not allowed; - # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: - # these include newline characters and characters - and /: - # - # Base64.strict_decode64("\n") # Raises ArgumentError - # Base64.strict_decode64('-') # Raises ArgumentError - # Base64.strict_decode64('_') # Raises ArgumentError - # - # Padding in +encoded_string+, if present, must be correct: - # - # Base64.strict_decode64("MDEyMzQ1Njc") # Raises ArgumentError - # Base64.strict_decode64("MDEyMzQ1Njc=") # => "01234567" - # Base64.strict_decode64("MDEyMzQ1Njc==") # Raises ArgumentError - # - # pkg:gem/base64#lib/base64.rb:309 - def strict_decode64(str); end - - # :call-seq: - # Base64.strict_encode64(string) -> encoded_string - # - # Returns a string containing the RFC-2045-compliant \Base64-encoding of +string+. - # - # Per RFC 2045, the returned string may contain the URL-unsafe characters - # + or /; - # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: - # - # Base64.strict_encode64("\xFB\xEF\xBE") # => "++++\n" - # Base64.strict_encode64("\xFF\xFF\xFF") # => "////\n" - # - # The returned string may include padding; - # see {Padding}[Base64.html#module-Base64-label-Padding] above. - # - # Base64.strict_encode64('*') # => "Kg==\n" - # - # The returned string will have no newline characters, regardless of its length; - # see {Newlines}[Base64.html#module-Base64-label-Newlines] above: - # - # Base64.strict_encode64('*') # => "Kg==" - # Base64.strict_encode64('*' * 46) - # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg==" - # - # The string to be encoded may itself contain newlines, - # which will be encoded as ordinary \Base64: - # - # Base64.strict_encode64("\n\n\n") # => "CgoK" - # s = "This is line 1\nThis is line 2\n" - # Base64.strict_encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK" - # - # pkg:gem/base64#lib/base64.rb:282 - def strict_encode64(bin); end - - # :call-seq: - # Base64.urlsafe_decode64(encoded_string) -> decoded_string - # - # Returns the decoding of an RFC-4648-compliant \Base64-encoded string +encoded_string+: - # - # +encoded_string+ may not contain non-Base64 characters; - # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: - # - # Base64.urlsafe_decode64('+') # Raises ArgumentError. - # Base64.urlsafe_decode64('/') # Raises ArgumentError. - # Base64.urlsafe_decode64("\n") # Raises ArgumentError. - # - # Padding in +encoded_string+, if present, must be correct: - # see {Padding}[Base64.html#module-Base64-label-Padding], above: - # - # Base64.urlsafe_decode64("MDEyMzQ1Njc") # => "01234567" - # Base64.urlsafe_decode64("MDEyMzQ1Njc=") # => "01234567" - # Base64.urlsafe_decode64("MDEyMzQ1Njc==") # Raises ArgumentError. - # - # pkg:gem/base64#lib/base64.rb:369 - def urlsafe_decode64(str); end - - # :call-seq: - # Base64.urlsafe_encode64(string) -> encoded_string - # - # Returns the RFC-4648-compliant \Base64-encoding of +string+. - # - # Per RFC 4648, the returned string will not contain the URL-unsafe characters - # + or /, - # but instead may contain the URL-safe characters - # - and _; - # see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above: - # - # Base64.urlsafe_encode64("\xFB\xEF\xBE") # => "----" - # Base64.urlsafe_encode64("\xFF\xFF\xFF") # => "____" - # - # By default, the returned string may have padding; - # see {Padding}[Base64.html#module-Base64-label-Padding], above: - # - # Base64.urlsafe_encode64('*') # => "Kg==" - # - # Optionally, you can suppress padding: - # - # Base64.urlsafe_encode64('*', padding: false) # => "Kg" - # - # The returned string will have no newline characters, regardless of its length; - # see {Newlines}[Base64.html#module-Base64-label-Newlines] above: - # - # Base64.urlsafe_encode64('*') # => "Kg==" - # Base64.urlsafe_encode64('*' * 46) - # # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg==" - # - # pkg:gem/base64#lib/base64.rb:343 - def urlsafe_encode64(bin, padding: T.unsafe(nil)); end - end -end - -# pkg:gem/base64#lib/base64.rb:186 -Base64::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/benchmark@0.5.0.rbi b/sorbet/rbi/gems/benchmark@0.5.0.rbi deleted file mode 100644 index 1c75f8e..0000000 --- a/sorbet/rbi/gems/benchmark@0.5.0.rbi +++ /dev/null @@ -1,621 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `benchmark` gem. -# Please instead update this file by running `bin/tapioca gem benchmark`. - - -# The Benchmark module provides methods to measure and report the time -# used to execute Ruby code. -# -# * Measure the time to construct the string given by the expression -# "a"*1_000_000_000: -# -# require 'benchmark' -# -# puts Benchmark.measure { "a"*1_000_000_000 } -# -# On my machine (OSX 10.8.3 on i5 1.7 GHz) this generates: -# -# 0.350000 0.400000 0.750000 ( 0.835234) -# -# This report shows the user CPU time, system CPU time, the total time -# (sum of user CPU time, system CPU time, children's user CPU time, -# and children's system CPU time), and the elapsed real time. The unit -# of time is seconds. -# -# * Do some experiments sequentially using the #bm method: -# -# require 'benchmark' -# -# n = 5000000 -# Benchmark.bm do |x| -# x.report { for i in 1..n; a = "1"; end } -# x.report { n.times do ; a = "1"; end } -# x.report { 1.upto(n) do ; a = "1"; end } -# end -# -# The result: -# -# user system total real -# 1.010000 0.000000 1.010000 ( 1.014479) -# 1.000000 0.000000 1.000000 ( 0.998261) -# 0.980000 0.000000 0.980000 ( 0.981335) -# -# * Continuing the previous example, put a label in each report: -# -# require 'benchmark' -# -# n = 5000000 -# Benchmark.bm(7) do |x| -# x.report("for:") { for i in 1..n; a = "1"; end } -# x.report("times:") { n.times do ; a = "1"; end } -# x.report("upto:") { 1.upto(n) do ; a = "1"; end } -# end -# -# The result: -# -# user system total real -# for: 1.010000 0.000000 1.010000 ( 1.015688) -# times: 1.000000 0.000000 1.000000 ( 1.003611) -# upto: 1.030000 0.000000 1.030000 ( 1.028098) -# -# * The times for some benchmarks depend on the order in which items -# are run. These differences are due to the cost of memory -# allocation and garbage collection. To avoid these discrepancies, -# the #bmbm method is provided. For example, to compare ways to -# sort an array of floats: -# -# require 'benchmark' -# -# array = (1..1000000).map { rand } -# -# Benchmark.bmbm do |x| -# x.report("sort!") { array.dup.sort! } -# x.report("sort") { array.dup.sort } -# end -# -# The result: -# -# Rehearsal ----------------------------------------- -# sort! 1.490000 0.010000 1.500000 ( 1.490520) -# sort 1.460000 0.000000 1.460000 ( 1.463025) -# -------------------------------- total: 2.960000sec -# -# user system total real -# sort! 1.460000 0.000000 1.460000 ( 1.460465) -# sort 1.450000 0.010000 1.460000 ( 1.448327) -# -# * Report statistics of sequential experiments with unique labels, -# using the #benchmark method: -# -# require 'benchmark' -# include Benchmark # we need the CAPTION and FORMAT constants -# -# n = 5000000 -# Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x| -# tf = x.report("for:") { for i in 1..n; a = "1"; end } -# tt = x.report("times:") { n.times do ; a = "1"; end } -# tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end } -# [tf+tt+tu, (tf+tt+tu)/3] -# end -# -# The result: -# -# user system total real -# for: 0.950000 0.000000 0.950000 ( 0.952039) -# times: 0.980000 0.000000 0.980000 ( 0.984938) -# upto: 0.950000 0.000000 0.950000 ( 0.946787) -# >total: 2.880000 0.000000 2.880000 ( 2.883764) -# >avg: 0.960000 0.000000 0.960000 ( 0.961255) -# -# pkg:gem/benchmark#lib/benchmark.rb:123 -module Benchmark - private - - # Invokes the block with a Benchmark::Report object, which - # may be used to collect and report on the results of individual - # benchmark tests. Reserves +label_width+ leading spaces for - # labels on each line. Prints +caption+ at the top of the - # report, and uses +format+ to format each line. - # (Note: +caption+ must contain a terminating newline character, - # see the default Benchmark::Tms::CAPTION for an example.) - # - # Returns an array of Benchmark::Tms objects. - # - # If the block returns an array of - # Benchmark::Tms objects, these will be used to format - # additional lines of output. If +labels+ parameter are - # given, these are used to label these extra lines. - # - # _Note_: Other methods provide a simpler interface to this one, and are - # suitable for nearly all benchmarking requirements. See the examples in - # Benchmark, and the #bm and #bmbm methods. - # - # Example: - # - # require 'benchmark' - # include Benchmark # we need the CAPTION and FORMAT constants - # - # n = 5000000 - # Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x| - # tf = x.report("for:") { for i in 1..n; a = "1"; end } - # tt = x.report("times:") { n.times do ; a = "1"; end } - # tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end } - # [tf+tt+tu, (tf+tt+tu)/3] - # end - # - # Generates: - # - # user system total real - # for: 0.970000 0.000000 0.970000 ( 0.970493) - # times: 0.990000 0.000000 0.990000 ( 0.989542) - # upto: 0.970000 0.000000 0.970000 ( 0.972854) - # >total: 2.930000 0.000000 2.930000 ( 2.932889) - # >avg: 0.976667 0.000000 0.976667 ( 0.977630) - # - # pkg:gem/benchmark#lib/benchmark.rb:171 - def benchmark(caption = T.unsafe(nil), label_width = T.unsafe(nil), format = T.unsafe(nil), *labels); end - - # A simple interface to the #benchmark method, #bm generates sequential - # reports with labels. +label_width+ and +labels+ parameters have the same - # meaning as for #benchmark. - # - # require 'benchmark' - # - # n = 5000000 - # Benchmark.bm(7) do |x| - # x.report("for:") { for i in 1..n; a = "1"; end } - # x.report("times:") { n.times do ; a = "1"; end } - # x.report("upto:") { 1.upto(n) do ; a = "1"; end } - # end - # - # Generates: - # - # user system total real - # for: 0.960000 0.000000 0.960000 ( 0.957966) - # times: 0.960000 0.000000 0.960000 ( 0.960423) - # upto: 0.950000 0.000000 0.950000 ( 0.954864) - # - # pkg:gem/benchmark#lib/benchmark.rb:216 - def bm(label_width = T.unsafe(nil), *labels, &blk); end - - # Sometimes benchmark results are skewed because code executed - # earlier encounters different garbage collection overheads than - # that run later. #bmbm attempts to minimize this effect by running - # the tests twice, the first time as a rehearsal in order to get the - # runtime environment stable, the second time for - # real. GC.start is executed before the start of each of - # the real timings; the cost of this is not included in the - # timings. In reality, though, there's only so much that #bmbm can - # do, and the results are not guaranteed to be isolated from garbage - # collection and other effects. - # - # Because #bmbm takes two passes through the tests, it can - # calculate the required label width. - # - # require 'benchmark' - # - # array = (1..1000000).map { rand } - # - # Benchmark.bmbm do |x| - # x.report("sort!") { array.dup.sort! } - # x.report("sort") { array.dup.sort } - # end - # - # Generates: - # - # Rehearsal ----------------------------------------- - # sort! 1.440000 0.010000 1.450000 ( 1.446833) - # sort 1.440000 0.000000 1.440000 ( 1.448257) - # -------------------------------- total: 2.890000sec - # - # user system total real - # sort! 1.460000 0.000000 1.460000 ( 1.458065) - # sort 1.450000 0.000000 1.450000 ( 1.455963) - # - # #bmbm yields a Benchmark::Job object and returns an array of - # Benchmark::Tms objects. - # - # pkg:gem/benchmark#lib/benchmark.rb:258 - def bmbm(width = T.unsafe(nil)); end - - # Returns the time used to execute the given block as a - # Benchmark::Tms object. Takes +label+ option. - # - # require 'benchmark' - # - # n = 1000000 - # - # time = Benchmark.measure do - # n.times { a = "1" } - # end - # puts time - # - # Generates: - # - # 0.220000 0.000000 0.220000 ( 0.227313) - # - # pkg:gem/benchmark#lib/benchmark.rb:303 - def measure(label = T.unsafe(nil)); end - - # Returns the elapsed real time used to execute the given block. - # The unit of time is milliseconds. - # - # Benchmark.ms { "a" * 1_000_000_000 } - # #=> 509.8029999935534 - # - # pkg:gem/benchmark#lib/benchmark.rb:335 - def ms; end - - # Returns the elapsed real time used to execute the given block. - # The unit of time is seconds. - # - # Benchmark.realtime { "a" * 1_000_000_000 } - # #=> 0.5098029999935534 - # - # pkg:gem/benchmark#lib/benchmark.rb:322 - def realtime; end - - class << self - # Invokes the block with a Benchmark::Report object, which - # may be used to collect and report on the results of individual - # benchmark tests. Reserves +label_width+ leading spaces for - # labels on each line. Prints +caption+ at the top of the - # report, and uses +format+ to format each line. - # (Note: +caption+ must contain a terminating newline character, - # see the default Benchmark::Tms::CAPTION for an example.) - # - # Returns an array of Benchmark::Tms objects. - # - # If the block returns an array of - # Benchmark::Tms objects, these will be used to format - # additional lines of output. If +labels+ parameter are - # given, these are used to label these extra lines. - # - # _Note_: Other methods provide a simpler interface to this one, and are - # suitable for nearly all benchmarking requirements. See the examples in - # Benchmark, and the #bm and #bmbm methods. - # - # Example: - # - # require 'benchmark' - # include Benchmark # we need the CAPTION and FORMAT constants - # - # n = 5000000 - # Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x| - # tf = x.report("for:") { for i in 1..n; a = "1"; end } - # tt = x.report("times:") { n.times do ; a = "1"; end } - # tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end } - # [tf+tt+tu, (tf+tt+tu)/3] - # end - # - # Generates: - # - # user system total real - # for: 0.970000 0.000000 0.970000 ( 0.970493) - # times: 0.990000 0.000000 0.990000 ( 0.989542) - # upto: 0.970000 0.000000 0.970000 ( 0.972854) - # >total: 2.930000 0.000000 2.930000 ( 2.932889) - # >avg: 0.976667 0.000000 0.976667 ( 0.977630) - # - # pkg:gem/benchmark#lib/benchmark.rb:341 - def benchmark(caption = T.unsafe(nil), label_width = T.unsafe(nil), format = T.unsafe(nil), *labels); end - - # A simple interface to the #benchmark method, #bm generates sequential - # reports with labels. +label_width+ and +labels+ parameters have the same - # meaning as for #benchmark. - # - # require 'benchmark' - # - # n = 5000000 - # Benchmark.bm(7) do |x| - # x.report("for:") { for i in 1..n; a = "1"; end } - # x.report("times:") { n.times do ; a = "1"; end } - # x.report("upto:") { 1.upto(n) do ; a = "1"; end } - # end - # - # Generates: - # - # user system total real - # for: 0.960000 0.000000 0.960000 ( 0.957966) - # times: 0.960000 0.000000 0.960000 ( 0.960423) - # upto: 0.950000 0.000000 0.950000 ( 0.954864) - # - # pkg:gem/benchmark#lib/benchmark.rb:341 - def bm(label_width = T.unsafe(nil), *labels, &blk); end - - # Sometimes benchmark results are skewed because code executed - # earlier encounters different garbage collection overheads than - # that run later. #bmbm attempts to minimize this effect by running - # the tests twice, the first time as a rehearsal in order to get the - # runtime environment stable, the second time for - # real. GC.start is executed before the start of each of - # the real timings; the cost of this is not included in the - # timings. In reality, though, there's only so much that #bmbm can - # do, and the results are not guaranteed to be isolated from garbage - # collection and other effects. - # - # Because #bmbm takes two passes through the tests, it can - # calculate the required label width. - # - # require 'benchmark' - # - # array = (1..1000000).map { rand } - # - # Benchmark.bmbm do |x| - # x.report("sort!") { array.dup.sort! } - # x.report("sort") { array.dup.sort } - # end - # - # Generates: - # - # Rehearsal ----------------------------------------- - # sort! 1.440000 0.010000 1.450000 ( 1.446833) - # sort 1.440000 0.000000 1.440000 ( 1.448257) - # -------------------------------- total: 2.890000sec - # - # user system total real - # sort! 1.460000 0.000000 1.460000 ( 1.458065) - # sort 1.450000 0.000000 1.450000 ( 1.455963) - # - # #bmbm yields a Benchmark::Job object and returns an array of - # Benchmark::Tms objects. - # - # pkg:gem/benchmark#lib/benchmark.rb:341 - def bmbm(width = T.unsafe(nil)); end - - # Returns the time used to execute the given block as a - # Benchmark::Tms object. Takes +label+ option. - # - # require 'benchmark' - # - # n = 1000000 - # - # time = Benchmark.measure do - # n.times { a = "1" } - # end - # puts time - # - # Generates: - # - # 0.220000 0.000000 0.220000 ( 0.227313) - # - # pkg:gem/benchmark#lib/benchmark.rb:341 - def measure(label = T.unsafe(nil)); end - - # Returns the elapsed real time used to execute the given block. - # The unit of time is milliseconds. - # - # Benchmark.ms { "a" * 1_000_000_000 } - # #=> 509.8029999935534 - # - # pkg:gem/benchmark#lib/benchmark.rb:341 - def ms; end - - # Returns the elapsed real time used to execute the given block. - # The unit of time is seconds. - # - # Benchmark.realtime { "a" * 1_000_000_000 } - # #=> 0.5098029999935534 - # - # pkg:gem/benchmark#lib/benchmark.rb:341 - def realtime; end - end -end - -# A Job is a sequence of labelled blocks to be processed by the -# Benchmark.bmbm method. It is of little direct interest to the user. -# -# pkg:gem/benchmark#lib/benchmark.rb:347 -class Benchmark::Job - # Returns an initialized Job instance. - # Usually, one doesn't call this method directly, as new - # Job objects are created by the #bmbm method. - # +width+ is a initial value for the label offset used in formatting; - # the #bmbm method passes its +width+ argument to this constructor. - # - # pkg:gem/benchmark#lib/benchmark.rb:355 - def initialize(width); end - - # Registers the given label and block pair in the job list. - # - # pkg:gem/benchmark#lib/benchmark.rb:363 - def item(label = T.unsafe(nil), &blk); end - - # An array of 2-element arrays, consisting of label and block pairs. - # - # pkg:gem/benchmark#lib/benchmark.rb:375 - def list; end - - # pkg:gem/benchmark#lib/benchmark.rb:372 - def report(label = T.unsafe(nil), &blk); end - - # Length of the widest label in the #list. - # - # pkg:gem/benchmark#lib/benchmark.rb:378 - def width; end -end - -# This class is used by the Benchmark.benchmark and Benchmark.bm methods. -# It is of little direct interest to the user. -# -# pkg:gem/benchmark#lib/benchmark.rb:385 -class Benchmark::Report - # Returns an initialized Report instance. - # Usually, one doesn't call this method directly, as new - # Report objects are created by the #benchmark and #bm methods. - # +width+ and +format+ are the label offset and - # format string used by Tms#format. - # - # pkg:gem/benchmark#lib/benchmark.rb:393 - def initialize(width = T.unsafe(nil), format = T.unsafe(nil)); end - - # An array of Benchmark::Tms objects representing each item. - # - # pkg:gem/benchmark#lib/benchmark.rb:412 - def format; end - - # Prints the +label+ and measured time for the block, - # formatted by +format+. See Tms#format for the - # formatting rules. - # - # pkg:gem/benchmark#lib/benchmark.rb:402 - def item(label = T.unsafe(nil), *format, &blk); end - - # An array of Benchmark::Tms objects representing each item. - # - # pkg:gem/benchmark#lib/benchmark.rb:412 - def list; end - - # pkg:gem/benchmark#lib/benchmark.rb:409 - def report(label = T.unsafe(nil), *format, &blk); end - - # An array of Benchmark::Tms objects representing each item. - # - # pkg:gem/benchmark#lib/benchmark.rb:412 - def width; end -end - -# A data object, representing the times associated with a benchmark -# measurement. -# -# pkg:gem/benchmark#lib/benchmark.rb:421 -class Benchmark::Tms - # Returns an initialized Tms object which has - # +utime+ as the user CPU time, +stime+ as the system CPU time, - # +cutime+ as the children's user CPU time, +cstime+ as the children's - # system CPU time, +real+ as the elapsed real time and +label+ as the label. - # - # pkg:gem/benchmark#lib/benchmark.rb:456 - def initialize(utime = T.unsafe(nil), stime = T.unsafe(nil), cutime = T.unsafe(nil), cstime = T.unsafe(nil), real = T.unsafe(nil), label = T.unsafe(nil)); end - - # Returns a new Tms object obtained by memberwise multiplication - # of the individual times for this Tms object by +x+. - # - # pkg:gem/benchmark#lib/benchmark.rb:504 - def *(x); end - - # Returns a new Tms object obtained by memberwise summation - # of the individual times for this Tms object with those of the +other+ - # Tms object. - # This method and #/() are useful for taking statistics. - # - # pkg:gem/benchmark#lib/benchmark.rb:491 - def +(other); end - - # Returns a new Tms object obtained by memberwise subtraction - # of the individual times for the +other+ Tms object from those of this - # Tms object. - # - # pkg:gem/benchmark#lib/benchmark.rb:498 - def -(other); end - - # Returns a new Tms object obtained by memberwise division - # of the individual times for this Tms object by +x+. - # This method and #+() are useful for taking statistics. - # - # pkg:gem/benchmark#lib/benchmark.rb:511 - def /(x); end - - # Returns a new Tms object whose times are the sum of the times for this - # Tms object, plus the time required to execute the code block (+blk+). - # - # pkg:gem/benchmark#lib/benchmark.rb:465 - def add(&blk); end - - # An in-place version of #add. - # Changes the times of this Tms object by making it the sum of the times - # for this Tms object, plus the time required to execute - # the code block (+blk+). - # - # pkg:gem/benchmark#lib/benchmark.rb:475 - def add!(&blk); end - - # System CPU time of children - # - # pkg:gem/benchmark#lib/benchmark.rb:439 - def cstime; end - - # User CPU time of children - # - # pkg:gem/benchmark#lib/benchmark.rb:436 - def cutime; end - - # Returns the contents of this Tms object as - # a formatted string, according to a +format+ string - # like that passed to Kernel.format. In addition, #format - # accepts the following extensions: - # - # %u:: Replaced by the user CPU time, as reported by Tms#utime. - # %y:: Replaced by the system CPU time, as reported by Tms#stime (Mnemonic: y of "s*y*stem") - # %U:: Replaced by the children's user CPU time, as reported by Tms#cutime - # %Y:: Replaced by the children's system CPU time, as reported by Tms#cstime - # %t:: Replaced by the total CPU time, as reported by Tms#total - # %r:: Replaced by the elapsed real time, as reported by Tms#real - # %n:: Replaced by the label string, as reported by Tms#label (Mnemonic: n of "*n*ame") - # - # If +format+ is not given, FORMAT is used as default value, detailing the - # user, system, total and real elapsed time. - # - # pkg:gem/benchmark#lib/benchmark.rb:530 - def format(format = T.unsafe(nil), *args); end - - # Label - # - # pkg:gem/benchmark#lib/benchmark.rb:448 - def label; end - - # Elapsed real time - # - # pkg:gem/benchmark#lib/benchmark.rb:442 - def real; end - - # System CPU time - # - # pkg:gem/benchmark#lib/benchmark.rb:433 - def stime; end - - # Returns a new 6-element array, consisting of the - # label, user CPU time, system CPU time, children's - # user CPU time, children's system CPU time and elapsed - # real time. - # - # pkg:gem/benchmark#lib/benchmark.rb:555 - def to_a; end - - # Returns a hash containing the same data as `to_a`. - # - # pkg:gem/benchmark#lib/benchmark.rb:562 - def to_h; end - - # Same as #format. - # - # pkg:gem/benchmark#lib/benchmark.rb:545 - def to_s; end - - # Total time, that is +utime+ + +stime+ + +cutime+ + +cstime+ - # - # pkg:gem/benchmark#lib/benchmark.rb:445 - def total; end - - # User CPU time - # - # pkg:gem/benchmark#lib/benchmark.rb:430 - def utime; end - - protected - - # Returns a new Tms object obtained by memberwise operation +op+ - # of the individual times for this Tms object with those of the other - # Tms object (+x+). - # - # +op+ can be a mathematical operation such as +, -, - # *, / - # - # pkg:gem/benchmark#lib/benchmark.rb:583 - def memberwise(op, x); end -end - -# pkg:gem/benchmark#lib/benchmark.rb:125 -Benchmark::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/bigdecimal@4.1.2.rbi b/sorbet/rbi/gems/bigdecimal@4.1.2.rbi deleted file mode 100644 index f4111c5..0000000 --- a/sorbet/rbi/gems/bigdecimal@4.1.2.rbi +++ /dev/null @@ -1,478 +0,0 @@ -# typed: false - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `bigdecimal` gem. -# Please instead update this file by running `bin/tapioca gem bigdecimal`. - - -# pkg:gem/bigdecimal#lib/bigdecimal.rb:10 -class BigDecimal < ::Numeric - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def %(_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def *(_arg0); end - - # call-seq: - # self ** other -> bigdecimal - # - # Returns the \BigDecimal value of +self+ raised to power +other+: - # - # b = BigDecimal('3.14') - # b ** 2 # => 0.98596e1 - # b ** 2.0 # => 0.98596e1 - # b ** Rational(2, 1) # => 0.98596e1 - # - # Related: BigDecimal#power. - # - # pkg:gem/bigdecimal#lib/bigdecimal.rb:127 - def **(y); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def +(_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def +@; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def -(_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def -@; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def /(_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def <(_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def <=(_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def <=>(_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def ==(_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def ===(_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def >(_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def >=(_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def _decimal_shift(_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def _dump(*_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def abs; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def add(_arg0, _arg1); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def ceil(*_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def clone; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def coerce(_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def div(*_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def divmod(_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def dup; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def eql?(_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def exponent; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def finite?; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def fix; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def floor(*_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def frac; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def hash; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def infinite?; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def inspect; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def modulo(_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def mult(_arg0, _arg1); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def n_significant_digits; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def nan?; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def nonzero?; end - - # call-seq: - # power(n) - # power(n, prec) - # - # Returns the value raised to the power of n. - # - # Also available as the operator **. - # - # pkg:gem/bigdecimal#lib/bigdecimal.rb:147 - def power(y, prec = T.unsafe(nil)); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def precision; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def precision_scale; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def quo(*_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def remainder(_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def round(*_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def scale; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def sign; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def split; end - - # Returns the square root of the value. - # - # Result has at least prec significant digits. - # - # pkg:gem/bigdecimal#lib/bigdecimal.rb:262 - def sqrt(prec); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def sub(_arg0, _arg1); end - - # call-seq: - # a.to_d -> bigdecimal - # - # Returns self. - # - # require 'bigdecimal/util' - # - # d = BigDecimal("3.14") - # d.to_d # => 0.314e1 - # - # pkg:gem/bigdecimal#lib/bigdecimal/util.rb:110 - def to_d; end - - # call-seq: - # a.to_digits -> string - # - # Converts a BigDecimal to a String of the form "nnnnnn.mmm". - # This method is deprecated; use BigDecimal#to_s("F") instead. - # - # require 'bigdecimal/util' - # - # d = BigDecimal("3.14") - # d.to_digits # => "3.14" - # - # pkg:gem/bigdecimal#lib/bigdecimal/util.rb:90 - def to_digits; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def to_f; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def to_i; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def to_int; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def to_r; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def to_s(format = T.unsafe(nil)); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def truncate(*_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def zero?; end - - class << self - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def _load(_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def double_fig; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def interpret_loosely(_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def limit(*_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def mode(*_arg0); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def save_exception_mode; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def save_limit; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:10 - def save_rounding_mode; end - end -end - -# pkg:gem/bigdecimal#lib/bigdecimal.rb:14 -module BigDecimal::Internal - class << self - # Coerce x to BigDecimal with the specified precision. - # TODO: some methods (example: BigMath.exp) require more precision than specified to coerce. - # - # pkg:gem/bigdecimal#lib/bigdecimal.rb:21 - def coerce_to_bigdecimal(x, prec, method_name); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:33 - def coerce_validate_prec(prec, method_name, accept_zero: T.unsafe(nil)); end - - # Calculates Math.log(x.to_f) considering large or small exponent - # - # pkg:gem/bigdecimal#lib/bigdecimal.rb:87 - def float_log(x); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:53 - def infinity_computation_result; end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:67 - def nan_computation_result; end - - # Iteration for Newton's method with increasing precision - # - # pkg:gem/bigdecimal#lib/bigdecimal.rb:75 - def newton_loop(prec, initial_precision: T.unsafe(nil), safe_margin: T.unsafe(nil)); end - - # Calculating Taylor series sum using binary splitting method - # Calculates f(x) = (x/d0)*(1+(x/d1)*(1+(x/d2)*(1+(x/d3)*(1+...)))) - # x.n_significant_digits or ds.size must be small to be performant. - # - # pkg:gem/bigdecimal#lib/bigdecimal.rb:94 - def taylor_sum_binary_splitting(x, ds, prec); end - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:60 - def underflow_computation_result; end - end -end - -# Default extra precision for intermediate calculations -# This value is currently the same as BigDecimal.double_fig, but defined separately for future changes. -# -# pkg:gem/bigdecimal#lib/bigdecimal.rb:17 -BigDecimal::Internal::EXTRA_PREC = T.let(T.unsafe(nil), Integer) - -BigDecimal::VERSION = T.let(T.unsafe(nil), String) - -# Core BigMath methods for BigDecimal (log, exp) are defined here. -# Other methods (sin, cos, atan) are defined in 'bigdecimal/math.rb'. -# -# -- -# Contents: -# sqrt(x, prec) -# cbrt(x, prec) -# hypot(x, y, prec) -# sin (x, prec) -# cos (x, prec) -# tan (x, prec) -# asin(x, prec) -# acos(x, prec) -# atan(x, prec) -# atan2(y, x, prec) -# sinh (x, prec) -# cosh (x, prec) -# tanh (x, prec) -# asinh(x, prec) -# acosh(x, prec) -# atanh(x, prec) -# log2 (x, prec) -# log10(x, prec) -# log1p(x, prec) -# expm1(x, prec) -# erf (x, prec) -# erfc(x, prec) -# gamma(x, prec) -# lgamma(x, prec) -# frexp(x) -# ldexp(x, exponent) -# PI (prec) -# E (prec) == exp(1.0,prec) -# -# where: -# x, y ... BigDecimal number to be computed. -# prec ... Number of digits to be obtained. -# ++ -# -# Provides mathematical functions. -# -# Example: -# -# require "bigdecimal/math" -# -# include BigMath -# -# a = BigDecimal((PI(49)/2).to_s) -# puts sin(a,100) # => 0.9999999999...9999999986e0 -# -# pkg:gem/bigdecimal#lib/bigdecimal.rb:288 -module BigMath - private - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:336 - def _exp_binary_splitting(x, prec); end - - # call-seq: - # BigMath.exp(decimal, numeric) -> BigDecimal - # - # Computes the value of e (the base of natural logarithms) raised to the - # power of +decimal+, to the specified number of digits of precision. - # - # If +decimal+ is infinity, returns Infinity. - # - # If +decimal+ is NaN, returns NaN. - # - # pkg:gem/bigdecimal#lib/bigdecimal.rb:356 - def exp(x, prec); end - - # call-seq: - # BigMath.log(decimal, numeric) -> BigDecimal - # - # Computes the natural logarithm of +decimal+ to the specified number of - # digits of precision, +numeric+. - # - # If +decimal+ is zero or negative, raises Math::DomainError. - # - # If +decimal+ is positive infinity, returns Infinity. - # - # If +decimal+ is NaN, returns NaN. - # - # pkg:gem/bigdecimal#lib/bigdecimal.rb:303 - def log(x, prec); end - - class << self - # call-seq: - # BigMath.exp(decimal, numeric) -> BigDecimal - # - # Computes the value of e (the base of natural logarithms) raised to the - # power of +decimal+, to the specified number of digits of precision. - # - # If +decimal+ is infinity, returns Infinity. - # - # If +decimal+ is NaN, returns NaN. - # - # pkg:gem/bigdecimal#lib/bigdecimal.rb:356 - def exp(x, prec); end - - # call-seq: - # BigMath.log(decimal, numeric) -> BigDecimal - # - # Computes the natural logarithm of +decimal+ to the specified number of - # digits of precision, +numeric+. - # - # If +decimal+ is zero or negative, raises Math::DomainError. - # - # If +decimal+ is positive infinity, returns Infinity. - # - # If +decimal+ is NaN, returns NaN. - # - # pkg:gem/bigdecimal#lib/bigdecimal.rb:303 - def log(x, prec); end - - private - - # pkg:gem/bigdecimal#lib/bigdecimal.rb:336 - def _exp_binary_splitting(x, prec); end - end -end - -# pkg:gem/bigdecimal#lib/bigdecimal/util.rb:141 -class Complex < ::Numeric - # call-seq: - # cmp.to_d -> bigdecimal - # cmp.to_d(precision) -> bigdecimal - # - # Returns the value as a BigDecimal. - # If the imaginary part is not +0+, an error is raised - # - # The +precision+ parameter is used to determine the number of - # significant digits for the result. When +precision+ is set to +0+, - # the number of digits to represent the float being converted is determined - # automatically. - # The default +precision+ is +0+. - # - # require 'bigdecimal' - # require 'bigdecimal/util' - # - # Complex(0.1234567, 0).to_d(4) # => 0.1235e0 - # Complex(Rational(22, 7), 0).to_d(3) # => 0.314e1 - # Complex(1, 1).to_d # raises ArgumentError - # - # See also Kernel.BigDecimal. - # - # pkg:gem/bigdecimal#lib/bigdecimal/util.rb:164 - def to_d(precision = T.unsafe(nil)); end -end - -# pkg:gem/bigdecimal#lib/bigdecimal/util.rb:116 -class Rational < ::Numeric - # call-seq: - # rat.to_d(precision) -> bigdecimal - # - # Returns the value as a BigDecimal. - # - # The +precision+ parameter is used to determine the number of - # significant digits for the result. When +precision+ is set to +0+, - # the number of digits to represent the float being converted is determined - # automatically. - # The default +precision+ is +0+. - # - # require 'bigdecimal' - # require 'bigdecimal/util' - # - # Rational(22, 7).to_d(3) # => 0.314e1 - # - # See also Kernel.BigDecimal. - # - # pkg:gem/bigdecimal#lib/bigdecimal/util.rb:135 - def to_d(precision = T.unsafe(nil)); end -end diff --git a/sorbet/rbi/gems/date@3.5.1.rbi b/sorbet/rbi/gems/date@3.5.1.rbi deleted file mode 100644 index 2135e86..0000000 --- a/sorbet/rbi/gems/date@3.5.1.rbi +++ /dev/null @@ -1,391 +0,0 @@ -# typed: false - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `date` gem. -# Please instead update this file by running `bin/tapioca gem date`. - - -# pkg:gem/date#lib/date.rb:4 -class Date - include ::Comparable - - # pkg:gem/date#lib/date.rb:4 - def initialize(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def +(other); end - - # pkg:gem/date#lib/date.rb:4 - def -(other); end - - # pkg:gem/date#lib/date.rb:4 - def <<(_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def <=>(other); end - - # pkg:gem/date#lib/date.rb:4 - def ===(_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def >>(_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def ajd; end - - # pkg:gem/date#lib/date.rb:4 - def amjd; end - - # pkg:gem/date#lib/date.rb:4 - def asctime; end - - # pkg:gem/date#lib/date.rb:4 - def ctime; end - - # pkg:gem/date#lib/date.rb:4 - def cwday; end - - # pkg:gem/date#lib/date.rb:4 - def cweek; end - - # pkg:gem/date#lib/date.rb:4 - def cwyear; end - - # pkg:gem/date#lib/date.rb:4 - def day; end - - # pkg:gem/date#lib/date.rb:4 - def day_fraction; end - - # pkg:gem/date#lib/date.rb:4 - def deconstruct_keys(_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def downto(_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def england; end - - # pkg:gem/date#lib/date.rb:4 - def eql?(_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def friday?; end - - # pkg:gem/date#lib/date.rb:4 - def gregorian; end - - # pkg:gem/date#lib/date.rb:4 - def gregorian?; end - - # pkg:gem/date#lib/date.rb:4 - def hash; end - - # pkg:gem/date#lib/date.rb:4 - def httpdate; end - - # call-seq: - # infinite? -> false - # - # Returns +false+ - # - # pkg:gem/date#lib/date.rb:13 - def infinite?; end - - # pkg:gem/date#lib/date.rb:4 - def inspect; end - - # pkg:gem/date#lib/date.rb:4 - def iso8601; end - - # pkg:gem/date#lib/date.rb:4 - def italy; end - - # pkg:gem/date#lib/date.rb:4 - def jd; end - - # pkg:gem/date#lib/date.rb:4 - def jisx0301; end - - # pkg:gem/date#lib/date.rb:4 - def julian; end - - # pkg:gem/date#lib/date.rb:4 - def julian?; end - - # pkg:gem/date#lib/date.rb:4 - def ld; end - - # pkg:gem/date#lib/date.rb:4 - def leap?; end - - # pkg:gem/date#lib/date.rb:4 - def marshal_dump; end - - # pkg:gem/date#lib/date.rb:4 - def marshal_load(_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def mday; end - - # pkg:gem/date#lib/date.rb:4 - def mjd; end - - # pkg:gem/date#lib/date.rb:4 - def mon; end - - # pkg:gem/date#lib/date.rb:4 - def monday?; end - - # pkg:gem/date#lib/date.rb:4 - def month; end - - # pkg:gem/date#lib/date.rb:4 - def new_start(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def next; end - - # pkg:gem/date#lib/date.rb:4 - def next_day(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def next_month(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def next_year(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def prev_day(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def prev_month(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def prev_year(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def rfc2822; end - - # pkg:gem/date#lib/date.rb:4 - def rfc3339; end - - # pkg:gem/date#lib/date.rb:4 - def rfc822; end - - # pkg:gem/date#lib/date.rb:4 - def saturday?; end - - # pkg:gem/date#lib/date.rb:4 - def start; end - - # pkg:gem/date#lib/date.rb:4 - def step(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def strftime(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def succ; end - - # pkg:gem/date#lib/date.rb:4 - def sunday?; end - - # pkg:gem/date#lib/date.rb:4 - def thursday?; end - - # pkg:gem/date#lib/date.rb:4 - def to_date; end - - # pkg:gem/date#lib/date.rb:4 - def to_datetime; end - - # pkg:gem/date#lib/date.rb:4 - def to_s; end - - # pkg:gem/date#lib/date.rb:4 - def to_time(form = T.unsafe(nil)); end - - # pkg:gem/date#lib/date.rb:4 - def tuesday?; end - - # pkg:gem/date#lib/date.rb:4 - def upto(_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def wday; end - - # pkg:gem/date#lib/date.rb:4 - def wednesday?; end - - # pkg:gem/date#lib/date.rb:4 - def xmlschema; end - - # pkg:gem/date#lib/date.rb:4 - def yday; end - - # pkg:gem/date#lib/date.rb:4 - def year; end - - private - - # pkg:gem/date#lib/date.rb:4 - def hour; end - - # pkg:gem/date#lib/date.rb:4 - def initialize_copy(_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def min; end - - # pkg:gem/date#lib/date.rb:4 - def minute; end - - # pkg:gem/date#lib/date.rb:4 - def sec; end - - # pkg:gem/date#lib/date.rb:4 - def second; end - - class << self - # pkg:gem/date#lib/date.rb:4 - def _httpdate(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def _iso8601(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def _jisx0301(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def _load(_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def _parse(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def _rfc2822(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def _rfc3339(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def _rfc822(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def _strptime(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def _xmlschema(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def civil(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def commercial(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def gregorian_leap?(_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def httpdate(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def iso8601(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def jd(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def jisx0301(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def julian_leap?(_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def leap?(_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def ordinal(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def parse(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def rfc2822(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def rfc3339(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def rfc822(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def strptime(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def today(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def valid_civil?(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def valid_commercial?(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def valid_date?(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def valid_jd?(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def valid_ordinal?(*_arg0); end - - # pkg:gem/date#lib/date.rb:4 - def xmlschema(*_arg0); end - end -end - -# pkg:gem/date#lib/date.rb:17 -class Date::Infinity < ::Numeric - # pkg:gem/date#lib/date.rb:19 - def initialize(d = T.unsafe(nil)); end - - # pkg:gem/date#lib/date.rb:33 - def +@; end - - # pkg:gem/date#lib/date.rb:32 - def -@; end - - # pkg:gem/date#lib/date.rb:35 - def <=>(other); end - - # pkg:gem/date#lib/date.rb:30 - def abs; end - - # pkg:gem/date#lib/date.rb:51 - def coerce(other); end - - # pkg:gem/date#lib/date.rb:26 - def finite?; end - - # pkg:gem/date#lib/date.rb:27 - def infinite?; end - - # pkg:gem/date#lib/date.rb:28 - def nan?; end - - # pkg:gem/date#lib/date.rb:59 - def to_f; end - - # pkg:gem/date#lib/date.rb:25 - def zero?; end - - protected - - # pkg:gem/date#lib/date.rb:21 - def d; end -end - -# pkg:gem/date#lib/date.rb:7 -Date::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/drb@2.2.3.rbi b/sorbet/rbi/gems/drb@2.2.3.rbi deleted file mode 100644 index a8dd54b..0000000 --- a/sorbet/rbi/gems/drb@2.2.3.rbi +++ /dev/null @@ -1,1589 +0,0 @@ -# typed: false - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `drb` gem. -# Please instead update this file by running `bin/tapioca gem drb`. - - -# == Overview -# -# dRuby is a distributed object system for Ruby. It is written in -# pure Ruby and uses its own protocol. No add-in services are needed -# beyond those provided by the Ruby runtime, such as TCP sockets. It -# does not rely on or interoperate with other distributed object -# systems such as CORBA, RMI, or .NET. -# -# dRuby allows methods to be called in one Ruby process upon a Ruby -# object located in another Ruby process, even on another machine. -# References to objects can be passed between processes. Method -# arguments and return values are dumped and loaded in marshalled -# format. All of this is done transparently to both the caller of the -# remote method and the object that it is called upon. -# -# An object in a remote process is locally represented by a -# DRb::DRbObject instance. This acts as a sort of proxy for the -# remote object. Methods called upon this DRbObject instance are -# forwarded to its remote object. This is arranged dynamically at run -# time. There are no statically declared interfaces for remote -# objects, such as CORBA's IDL. -# -# dRuby calls made into a process are handled by a DRb::DRbServer -# instance within that process. This reconstitutes the method call, -# invokes it upon the specified local object, and returns the value to -# the remote caller. Any object can receive calls over dRuby. There -# is no need to implement a special interface, or mixin special -# functionality. Nor, in the general case, does an object need to -# explicitly register itself with a DRbServer in order to receive -# dRuby calls. -# -# One process wishing to make dRuby calls upon another process must -# somehow obtain an initial reference to an object in the remote -# process by some means other than as the return value of a remote -# method call, as there is initially no remote object reference it can -# invoke a method upon. This is done by attaching to the server by -# URI. Each DRbServer binds itself to a URI such as -# 'druby://example.com:8787'. A DRbServer can have an object attached -# to it that acts as the server's *front* *object*. A DRbObject can -# be explicitly created from the server's URI. This DRbObject's -# remote object will be the server's front object. This front object -# can then return references to other Ruby objects in the DRbServer's -# process. -# -# Method calls made over dRuby behave largely the same as normal Ruby -# method calls made within a process. Method calls with blocks are -# supported, as are raising exceptions. In addition to a method's -# standard errors, a dRuby call may also raise one of the -# dRuby-specific errors, all of which are subclasses of DRb::DRbError. -# -# Any type of object can be passed as an argument to a dRuby call or -# returned as its return value. By default, such objects are dumped -# or marshalled at the local end, then loaded or unmarshalled at the -# remote end. The remote end therefore receives a copy of the local -# object, not a distributed reference to it; methods invoked upon this -# copy are executed entirely in the remote process, not passed on to -# the local original. This has semantics similar to pass-by-value. -# -# However, if an object cannot be marshalled, a dRuby reference to it -# is passed or returned instead. This will turn up at the remote end -# as a DRbObject instance. All methods invoked upon this remote proxy -# are forwarded to the local object, as described in the discussion of -# DRbObjects. This has semantics similar to the normal Ruby -# pass-by-reference. -# -# The easiest way to signal that we want an otherwise marshallable -# object to be passed or returned as a DRbObject reference, rather -# than marshalled and sent as a copy, is to include the -# DRb::DRbUndumped mixin module. -# -# dRuby supports calling remote methods with blocks. As blocks (or -# rather the Proc objects that represent them) are not marshallable, -# the block executes in the local, not the remote, context. Each -# value yielded to the block is passed from the remote object to the -# local block, then the value returned by each block invocation is -# passed back to the remote execution context to be collected, before -# the collected values are finally returned to the local context as -# the return value of the method invocation. -# -# == Examples of usage -# -# For more dRuby samples, see the +samples+ directory in the full -# dRuby distribution. -# -# === dRuby in client/server mode -# -# This illustrates setting up a simple client-server drb -# system. Run the server and client code in different terminals, -# starting the server code first. -# -# ==== Server code -# -# require 'drb/drb' -# -# # The URI for the server to connect to -# URI="druby://localhost:8787" -# -# class TimeServer -# -# def get_current_time -# return Time.now -# end -# -# end -# -# # The object that handles requests on the server -# FRONT_OBJECT=TimeServer.new -# -# DRb.start_service(URI, FRONT_OBJECT) -# # Wait for the drb server thread to finish before exiting. -# DRb.thread.join -# -# ==== Client code -# -# require 'drb/drb' -# -# # The URI to connect to -# SERVER_URI="druby://localhost:8787" -# -# # Start a local DRbServer to handle callbacks. -# # -# # Not necessary for this small example, but will be required -# # as soon as we pass a non-marshallable object as an argument -# # to a dRuby call. -# # -# # Note: this must be called at least once per process to take any effect. -# # This is particularly important if your application forks. -# DRb.start_service -# -# timeserver = DRbObject.new_with_uri(SERVER_URI) -# puts timeserver.get_current_time -# -# === Remote objects under dRuby -# -# This example illustrates returning a reference to an object -# from a dRuby call. The Logger instances live in the server -# process. References to them are returned to the client process, -# where methods can be invoked upon them. These methods are -# executed in the server process. -# -# ==== Server code -# -# require 'drb/drb' -# -# URI="druby://localhost:8787" -# -# class Logger -# -# # Make dRuby send Logger instances as dRuby references, -# # not copies. -# include DRb::DRbUndumped -# -# def initialize(n, fname) -# @name = n -# @filename = fname -# end -# -# def log(message) -# File.open(@filename, "a") do |f| -# f.puts("#{Time.now}: #{@name}: #{message}") -# end -# end -# -# end -# -# # We have a central object for creating and retrieving loggers. -# # This retains a local reference to all loggers created. This -# # is so an existing logger can be looked up by name, but also -# # to prevent loggers from being garbage collected. A dRuby -# # reference to an object is not sufficient to prevent it being -# # garbage collected! -# class LoggerFactory -# -# def initialize(bdir) -# @basedir = bdir -# @loggers = {} -# end -# -# def get_logger(name) -# if !@loggers.has_key? name -# # make the filename safe, then declare it to be so -# fname = name.gsub(/[.\/\\\:]/, "_") -# @loggers[name] = Logger.new(name, @basedir + "/" + fname) -# end -# return @loggers[name] -# end -# -# end -# -# FRONT_OBJECT=LoggerFactory.new("/tmp/dlog") -# -# DRb.start_service(URI, FRONT_OBJECT) -# DRb.thread.join -# -# ==== Client code -# -# require 'drb/drb' -# -# SERVER_URI="druby://localhost:8787" -# -# DRb.start_service -# -# log_service=DRbObject.new_with_uri(SERVER_URI) -# -# ["loga", "logb", "logc"].each do |logname| -# -# logger=log_service.get_logger(logname) -# -# logger.log("Hello, world!") -# logger.log("Goodbye, world!") -# logger.log("=== EOT ===") -# -# end -# -# == Security -# -# As with all network services, security needs to be considered when -# using dRuby. By allowing external access to a Ruby object, you are -# not only allowing outside clients to call the methods you have -# defined for that object, but by default to execute arbitrary Ruby -# code on your server. Consider the following: -# -# # !!! UNSAFE CODE !!! -# ro = DRbObject::new_with_uri("druby://your.server.com:8989") -# class << ro -# undef :instance_eval # force call to be passed to remote object -# end -# ro.instance_eval("`rm -rf *`") -# -# The dangers posed by instance_eval and friends are such that a -# DRbServer should only be used when clients are trusted. -# -# A DRbServer can be configured with an access control list to -# selectively allow or deny access from specified IP addresses. The -# main druby distribution provides the ACL class for this purpose. In -# general, this mechanism should only be used alongside, rather than -# as a replacement for, a good firewall. -# -# == dRuby internals -# -# dRuby is implemented using three main components: a remote method -# call marshaller/unmarshaller; a transport protocol; and an -# ID-to-object mapper. The latter two can be directly, and the first -# indirectly, replaced, in order to provide different behaviour and -# capabilities. -# -# Marshalling and unmarshalling of remote method calls is performed by -# a DRb::DRbMessage instance. This uses the Marshal module to dump -# the method call before sending it over the transport layer, then -# reconstitute it at the other end. There is normally no need to -# replace this component, and no direct way is provided to do so. -# However, it is possible to implement an alternative marshalling -# scheme as part of an implementation of the transport layer. -# -# The transport layer is responsible for opening client and server -# network connections and forwarding dRuby request across them. -# Normally, it uses DRb::DRbMessage internally to manage marshalling -# and unmarshalling. The transport layer is managed by -# DRb::DRbProtocol. Multiple protocols can be installed in -# DRbProtocol at the one time; selection between them is determined by -# the scheme of a dRuby URI. The default transport protocol is -# selected by the scheme 'druby:', and implemented by -# DRb::DRbTCPSocket. This uses plain TCP/IP sockets for -# communication. An alternative protocol, using UNIX domain sockets, -# is implemented by DRb::DRbUNIXSocket in the file drb/unix.rb, and -# selected by the scheme 'drbunix:'. A sample implementation over -# HTTP can be found in the samples accompanying the main dRuby -# distribution. -# -# The ID-to-object mapping component maps dRuby object ids to the -# objects they refer to, and vice versa. The implementation to use -# can be specified as part of a DRb::DRbServer's configuration. The -# default implementation is provided by DRb::DRbIdConv. It uses an -# object's ObjectSpace id as its dRuby id. This means that the dRuby -# reference to that object only remains meaningful for the lifetime of -# the object's process and the lifetime of the object within that -# process. A modified implementation is provided by DRb::TimerIdConv -# in the file drb/timeridconv.rb. This implementation retains a local -# reference to all objects exported over dRuby for a configurable -# period of time (defaulting to ten minutes), to prevent them being -# garbage-collected within this time. Another sample implementation -# is provided in sample/name.rb in the main dRuby distribution. This -# allows objects to specify their own id or "name". A dRuby reference -# can be made persistent across processes by having each process -# register an object using the same dRuby name. -# -# pkg:gem/drb#lib/drb/eq.rb:2 -module DRb - private - - # Get the configuration of the current server. - # - # If there is no current server, this returns the default configuration. - # See #current_server and DRbServer::make_config. - # - # pkg:gem/drb#lib/drb/drb.rb:1882 - def config; end - - # Get the 'current' server. - # - # In the context of execution taking place within the main - # thread of a dRuby server (typically, as a result of a remote - # call on the server or one of its objects), the current - # server is that server. Otherwise, the current server is - # the primary server. - # - # If the above rule fails to find a server, a DRbServerNotFound - # error is raised. - # - # pkg:gem/drb#lib/drb/drb.rb:1839 - def current_server; end - - # Retrieves the server with the given +uri+. - # - # See also regist_server and remove_server. - # - # pkg:gem/drb#lib/drb/drb.rb:1984 - def fetch_server(uri); end - - # Get the front object of the current server. - # - # This raises a DRbServerNotFound error if there is no current server. - # See #current_server. - # - # pkg:gem/drb#lib/drb/drb.rb:1893 - def front; end - - # Is +uri+ the URI for the current local server? - # - # pkg:gem/drb#lib/drb/drb.rb:1872 - def here?(uri); end - - # Set the default ACL to +acl+. - # - # See DRb::DRbServer.default_acl. - # - # pkg:gem/drb#lib/drb/drb.rb:1938 - def install_acl(acl); end - - # Set the default id conversion object. - # - # This is expected to be an instance such as DRb::DRbIdConv that responds to - # #to_id and #to_obj that can convert objects to and from DRb references. - # - # See DRbServer#default_id_conv. - # - # pkg:gem/drb#lib/drb/drb.rb:1930 - def install_id_conv(idconv); end - - # pkg:gem/drb#lib/drb/drb.rb:1944 - def mutex; end - - # The primary local dRuby server. - # - # This is the server created by the #start_service call. - # - # pkg:gem/drb#lib/drb/drb.rb:1826 - def primary_server; end - - # The primary local dRuby server. - # - # This is the server created by the #start_service call. - # - # pkg:gem/drb#lib/drb/drb.rb:1826 - def primary_server=(_arg0); end - - # Registers +server+ with DRb. - # - # This is called when a new DRb::DRbServer is created. - # - # If there is no primary server then +server+ becomes the primary server. - # - # Example: - # - # require 'drb' - # - # s = DRb::DRbServer.new # automatically calls regist_server - # DRb.fetch_server s.uri #=> # - # - # pkg:gem/drb#lib/drb/drb.rb:1962 - def regist_server(server); end - - # Removes +server+ from the list of registered servers. - # - # pkg:gem/drb#lib/drb/drb.rb:1971 - def remove_server(server); end - - # Start a dRuby server locally. - # - # The new dRuby server will become the primary server, even - # if another server is currently the primary server. - # - # +uri+ is the URI for the server to bind to. If nil, - # the server will bind to random port on the default local host - # name and use the default dRuby protocol. - # - # +front+ is the server's front object. This may be nil. - # - # +config+ is the configuration for the new server. This may - # be nil. - # - # See DRbServer::new. - # - # pkg:gem/drb#lib/drb/drb.rb:1818 - def start_service(uri = T.unsafe(nil), front = T.unsafe(nil), config = T.unsafe(nil)); end - - # Stop the local dRuby server. - # - # This operates on the primary server. If there is no primary - # server currently running, it is a noop. - # - # pkg:gem/drb#lib/drb/drb.rb:1851 - def stop_service; end - - # Get the thread of the primary server. - # - # This returns nil if there is no primary server. See #primary_server. - # - # pkg:gem/drb#lib/drb/drb.rb:1919 - def thread; end - - # Get a reference id for an object using the current server. - # - # This raises a DRbServerNotFound error if there is no current server. - # See #current_server. - # - # pkg:gem/drb#lib/drb/drb.rb:1910 - def to_id(obj); end - - # Convert a reference into an object using the current server. - # - # This raises a DRbServerNotFound error if there is no current server. - # See #current_server. - # - # pkg:gem/drb#lib/drb/drb.rb:1902 - def to_obj(ref); end - - # Get the URI defining the local dRuby space. - # - # This is the URI of the current server. See #current_server. - # - # pkg:gem/drb#lib/drb/drb.rb:1860 - def uri; end - - class << self - # Get the configuration of the current server. - # - # If there is no current server, this returns the default configuration. - # See #current_server and DRbServer::make_config. - # - # pkg:gem/drb#lib/drb/drb.rb:1887 - def config; end - - # Get the 'current' server. - # - # In the context of execution taking place within the main - # thread of a dRuby server (typically, as a result of a remote - # call on the server or one of its objects), the current - # server is that server. Otherwise, the current server is - # the primary server. - # - # If the above rule fails to find a server, a DRbServerNotFound - # error is raised. - # - # pkg:gem/drb#lib/drb/drb.rb:1845 - def current_server; end - - # Retrieves the server with the given +uri+. - # - # See also regist_server and remove_server. - # - # pkg:gem/drb#lib/drb/drb.rb:1987 - def fetch_server(uri); end - - # Get the front object of the current server. - # - # This raises a DRbServerNotFound error if there is no current server. - # See #current_server. - # - # pkg:gem/drb#lib/drb/drb.rb:1896 - def front; end - - # Is +uri+ the URI for the current local server? - # - # pkg:gem/drb#lib/drb/drb.rb:1876 - def here?(uri); end - - # Set the default ACL to +acl+. - # - # See DRb::DRbServer.default_acl. - # - # pkg:gem/drb#lib/drb/drb.rb:1941 - def install_acl(acl); end - - # Set the default id conversion object. - # - # This is expected to be an instance such as DRb::DRbIdConv that responds to - # #to_id and #to_obj that can convert objects to and from DRb references. - # - # See DRbServer#default_id_conv. - # - # pkg:gem/drb#lib/drb/drb.rb:1933 - def install_id_conv(idconv); end - - # pkg:gem/drb#lib/drb/drb.rb:1947 - def mutex; end - - # The primary local dRuby server. - # - # This is the server created by the #start_service call. - # - # pkg:gem/drb#lib/drb/drb.rb:1827 - def primary_server; end - - # pkg:gem/drb#lib/drb/drb.rb:1827 - def primary_server=(_arg0); end - - # Registers +server+ with DRb. - # - # This is called when a new DRb::DRbServer is created. - # - # If there is no primary server then +server+ becomes the primary server. - # - # Example: - # - # require 'drb' - # - # s = DRb::DRbServer.new # automatically calls regist_server - # DRb.fetch_server s.uri #=> # - # - # pkg:gem/drb#lib/drb/drb.rb:1968 - def regist_server(server); end - - # Removes +server+ from the list of registered servers. - # - # pkg:gem/drb#lib/drb/drb.rb:1979 - def remove_server(server); end - - # Start a dRuby server locally. - # - # The new dRuby server will become the primary server, even - # if another server is currently the primary server. - # - # +uri+ is the URI for the server to bind to. If nil, - # the server will bind to random port on the default local host - # name and use the default dRuby protocol. - # - # +front+ is the server's front object. This may be nil. - # - # +config+ is the configuration for the new server. This may - # be nil. - # - # See DRbServer::new. - # - # pkg:gem/drb#lib/drb/drb.rb:1821 - def start_service(uri = T.unsafe(nil), front = T.unsafe(nil), config = T.unsafe(nil)); end - - # Stop the local dRuby server. - # - # This operates on the primary server. If there is no primary - # server currently running, it is a noop. - # - # pkg:gem/drb#lib/drb/drb.rb:1855 - def stop_service; end - - # Get the thread of the primary server. - # - # This returns nil if there is no primary server. See #primary_server. - # - # pkg:gem/drb#lib/drb/drb.rb:1922 - def thread; end - - # Get a reference id for an object using the current server. - # - # This raises a DRbServerNotFound error if there is no current server. - # See #current_server. - # - # pkg:gem/drb#lib/drb/drb.rb:1913 - def to_id(obj); end - - # Convert a reference into an object using the current server. - # - # This raises a DRbServerNotFound error if there is no current server. - # See #current_server. - # - # pkg:gem/drb#lib/drb/drb.rb:1914 - def to_obj(ref); end - - # Get the URI defining the local dRuby space. - # - # This is the URI of the current server. See #current_server. - # - # pkg:gem/drb#lib/drb/drb.rb:1869 - def uri; end - end -end - -# This is an internal singleton instance. This must not be used -# by users. -# -# pkg:gem/drb#lib/drb/drb.rb:382 -DRb::DRB_OBJECT_SPACE = T.let(T.unsafe(nil), DRb::DRbObjectSpace) - -# An Array wrapper that can be sent to another server via DRb. -# -# All entries in the array will be dumped or be references that point to -# the local server. -# -# pkg:gem/drb#lib/drb/drb.rb:546 -class DRb::DRbArray - # Creates a new DRbArray that either dumps or wraps all the items in the - # Array +ary+ so they can be loaded by a remote DRb server. - # - # pkg:gem/drb#lib/drb/drb.rb:551 - def initialize(ary); end - - # pkg:gem/drb#lib/drb/drb.rb:570 - def _dump(lv); end - - class << self - # pkg:gem/drb#lib/drb/drb.rb:566 - def _load(s); end - end -end - -# Class handling the connection between a DRbObject and the -# server the real object lives on. -# -# This class maintains a pool of connections, to reduce the -# overhead of starting and closing down connections for each -# method call. -# -# This class is used internally by DRbObject. The user does -# not normally need to deal with it directly. -# -# pkg:gem/drb#lib/drb/drb.rb:1284 -class DRb::DRbConn - # pkg:gem/drb#lib/drb/drb.rb:1345 - def initialize(remote_uri); end - - # pkg:gem/drb#lib/drb/drb.rb:1361 - def alive?; end - - # pkg:gem/drb#lib/drb/drb.rb:1356 - def close; end - - # pkg:gem/drb#lib/drb/drb.rb:1351 - def send_message(ref, msg_id, arg, block); end - - # pkg:gem/drb#lib/drb/drb.rb:1349 - def uri; end - - class << self - # pkg:gem/drb#lib/drb/drb.rb:1287 - def make_pool; end - - # pkg:gem/drb#lib/drb/drb.rb:1325 - def open(remote_uri); end - - # pkg:gem/drb#lib/drb/drb.rb:1320 - def stop_pool; end - end -end - -# Class responsible for converting between an object and its id. -# -# This, the default implementation, uses an object's local ObjectSpace -# __id__ as its id. This means that an object's identification over -# drb remains valid only while that object instance remains alive -# within the server runtime. -# -# For alternative mechanisms, see DRb::TimerIdConv in drb/timeridconv.rb -# and DRbNameIdConv in sample/name.rb in the full drb distribution. -# -# pkg:gem/drb#lib/drb/drb.rb:393 -class DRb::DRbIdConv - # Convert an object into a reference id. - # - # This implementation returns the object's __id__ in the local - # object space. - # - # pkg:gem/drb#lib/drb/drb.rb:407 - def to_id(obj); end - - # Convert an object reference id to an object. - # - # This implementation looks up the reference id in the local object - # space and returns the object it refers to. - # - # pkg:gem/drb#lib/drb/drb.rb:399 - def to_obj(ref); end -end - -# Handler for sending and receiving drb messages. -# -# This takes care of the low-level marshalling and unmarshalling -# of drb requests and responses sent over the wire between server -# and client. This relieves the implementor of a new drb -# protocol layer with having to deal with these details. -# -# The user does not have to directly deal with this object in -# normal use. -# -# pkg:gem/drb#lib/drb/drb.rb:584 -class DRb::DRbMessage - # pkg:gem/drb#lib/drb/drb.rb:585 - def initialize(config); end - - # pkg:gem/drb#lib/drb/drb.rb:590 - def dump(obj, error = T.unsafe(nil)); end - - # pkg:gem/drb#lib/drb/drb.rb:607 - def load(soc); end - - # pkg:gem/drb#lib/drb/drb.rb:667 - def recv_reply(stream); end - - # pkg:gem/drb#lib/drb/drb.rb:647 - def recv_request(stream); end - - # pkg:gem/drb#lib/drb/drb.rb:661 - def send_reply(stream, succ, result); end - - # pkg:gem/drb#lib/drb/drb.rb:633 - def send_request(stream, ref, msg_id, arg, b); end - - private - - # pkg:gem/drb#lib/drb/drb.rb:674 - def make_proxy(obj, error = T.unsafe(nil)); end -end - -# Object wrapping a reference to a remote drb object. -# -# Method calls on this object are relayed to the remote -# object that this object is a stub for. -# -# pkg:gem/drb#lib/drb/eq.rb:3 -class DRb::DRbObject - # Create a new remote object stub. - # - # +obj+ is the (local) object we want to create a stub for. Normally - # this is +nil+. +uri+ is the URI of the remote object that this - # will be a stub for. - # - # pkg:gem/drb#lib/drb/drb.rb:1117 - def initialize(obj, uri = T.unsafe(nil)); end - - # pkg:gem/drb#lib/drb/eq.rb:4 - def ==(other); end - - # Get the reference of the object, if local. - # - # pkg:gem/drb#lib/drb/drb.rb:1143 - def __drbref; end - - # Get the URI of the remote object. - # - # pkg:gem/drb#lib/drb/drb.rb:1138 - def __drburi; end - - # Marshall this object. - # - # The URI and ref of the object are marshalled. - # - # pkg:gem/drb#lib/drb/drb.rb:1108 - def _dump(lv); end - - # pkg:gem/drb#lib/drb/eq.rb:13 - def eql?(other); end - - # pkg:gem/drb#lib/drb/eq.rb:9 - def hash; end - - # pkg:gem/drb#lib/drb/drb.rb:1163 - def method_missing(msg_id, *a, **_arg2, &b); end - - # pkg:gem/drb#lib/drb/drb.rb:1215 - def pretty_print(q); end - - # pkg:gem/drb#lib/drb/drb.rb:1219 - def pretty_print_cycle(q); end - - # Routes respond_to? to the referenced remote object. - # - # pkg:gem/drb#lib/drb/drb.rb:1151 - def respond_to?(msg_id, priv = T.unsafe(nil)); end - - class << self - # Unmarshall a marshalled DRbObject. - # - # If the referenced object is located within the local server, then - # the object itself is returned. Otherwise, a new DRbObject is - # created to act as a stub for the remote referenced object. - # - # pkg:gem/drb#lib/drb/drb.rb:1079 - def _load(s); end - - # Creates a DRb::DRbObject given the reference information to the remote - # host +uri+ and object +ref+. - # - # pkg:gem/drb#lib/drb/drb.rb:1093 - def new_with(uri, ref); end - - # Create a new DRbObject from a URI alone. - # - # pkg:gem/drb#lib/drb/drb.rb:1101 - def new_with_uri(uri); end - - # Returns a modified backtrace from +result+ with the +uri+ where each call - # in the backtrace came from. - # - # pkg:gem/drb#lib/drb/drb.rb:1201 - def prepare_backtrace(uri, result); end - - # Given the +uri+ of another host executes the block provided. - # - # pkg:gem/drb#lib/drb/drb.rb:1188 - def with_friend(uri); end - end -end - -# pkg:gem/drb#lib/drb/drb.rb:351 -class DRb::DRbObjectSpace - include ::MonitorMixin - - # pkg:gem/drb#lib/drb/drb.rb:357 - def initialize; end - - # pkg:gem/drb#lib/drb/drb.rb:362 - def to_id(obj); end - - # pkg:gem/drb#lib/drb/drb.rb:369 - def to_obj(ref); end -end - -# Module managing the underlying network protocol(s) used by drb. -# -# By default, drb uses the DRbTCPSocket protocol. Other protocols -# can be defined. A protocol must define the following class methods: -# -# [open(uri, config)] Open a client connection to the server at +uri+, -# using configuration +config+. Return a protocol -# instance for this connection. -# [open_server(uri, config)] Open a server listening at +uri+, -# using configuration +config+. Return a -# protocol instance for this listener. -# [uri_option(uri, config)] Take a URI, possibly containing an option -# component (e.g. a trailing '?param=val'), -# and return a [uri, option] tuple. -# -# All of these methods should raise a DRbBadScheme error if the URI -# does not identify the protocol they support (e.g. "druby:" for -# the standard Ruby protocol). This is how the DRbProtocol module, -# given a URI, determines which protocol implementation serves that -# protocol. -# -# The protocol instance returned by #open_server must have the -# following methods: -# -# [accept] Accept a new connection to the server. Returns a protocol -# instance capable of communicating with the client. -# [close] Close the server connection. -# [uri] Get the URI for this server. -# -# The protocol instance returned by #open must have the following methods: -# -# [send_request (ref, msg_id, arg, b)] -# Send a request to +ref+ with the given message id and arguments. -# This is most easily implemented by calling DRbMessage.send_request, -# providing a stream that sits on top of the current protocol. -# [recv_reply] -# Receive a reply from the server and return it as a [success-boolean, -# reply-value] pair. This is most easily implemented by calling -# DRb.recv_reply, providing a stream that sits on top of the -# current protocol. -# [alive?] -# Is this connection still alive? -# [close] -# Close this connection. -# -# The protocol instance returned by #open_server().accept() must have -# the following methods: -# -# [recv_request] -# Receive a request from the client and return a [object, message, -# args, block] tuple. This is most easily implemented by calling -# DRbMessage.recv_request, providing a stream that sits on top of -# the current protocol. -# [send_reply(succ, result)] -# Send a reply to the client. This is most easily implemented -# by calling DRbMessage.send_reply, providing a stream that sits -# on top of the current protocol. -# [close] -# Close this connection. -# -# A new protocol is registered with the DRbProtocol module using -# the add_protocol method. -# -# For examples of other protocols, see DRbUNIXSocket in drb/unix.rb, -# and HTTP0 in sample/http0.rb and sample/http0serv.rb in the full -# drb distribution. -# -# pkg:gem/drb#lib/drb/drb.rb:749 -module DRb::DRbProtocol - private - - # Add a new protocol to the DRbProtocol module. - # - # pkg:gem/drb#lib/drb/drb.rb:752 - def add_protocol(prot); end - - # pkg:gem/drb#lib/drb/drb.rb:830 - def auto_load(uri); end - - # Open a client connection to +uri+ with the configuration +config+. - # - # The DRbProtocol module asks each registered protocol in turn to - # try to open the URI. Each protocol signals that it does not handle that - # URI by raising a DRbBadScheme error. If no protocol recognises the - # URI, then a DRbBadURI error is raised. If a protocol accepts the - # URI, but an error occurs in opening it, a DRbConnError is raised. - # - # pkg:gem/drb#lib/drb/drb.rb:764 - def open(uri, config, first = T.unsafe(nil)); end - - # Open a server listening for connections at +uri+ with - # configuration +config+. - # - # The DRbProtocol module asks each registered protocol in turn to - # try to open a server at the URI. Each protocol signals that it does - # not handle that URI by raising a DRbBadScheme error. If no protocol - # recognises the URI, then a DRbBadURI error is raised. If a protocol - # accepts the URI, but an error occurs in opening it, the underlying - # error is passed on to the caller. - # - # pkg:gem/drb#lib/drb/drb.rb:792 - def open_server(uri, config, first = T.unsafe(nil)); end - - # Parse +uri+ into a [uri, option] pair. - # - # The DRbProtocol module asks each registered protocol in turn to - # try to parse the URI. Each protocol signals that it does not handle that - # URI by raising a DRbBadScheme error. If no protocol recognises the - # URI, then a DRbBadURI error is raised. - # - # pkg:gem/drb#lib/drb/drb.rb:813 - def uri_option(uri, config, first = T.unsafe(nil)); end - - class << self - # Add a new protocol to the DRbProtocol module. - # - # pkg:gem/drb#lib/drb/drb.rb:755 - def add_protocol(prot); end - - # pkg:gem/drb#lib/drb/drb.rb:835 - def auto_load(uri); end - - # Open a client connection to +uri+ with the configuration +config+. - # - # The DRbProtocol module asks each registered protocol in turn to - # try to open the URI. Each protocol signals that it does not handle that - # URI by raising a DRbBadScheme error. If no protocol recognises the - # URI, then a DRbBadURI error is raised. If a protocol accepts the - # URI, but an error occurs in opening it, a DRbConnError is raised. - # - # pkg:gem/drb#lib/drb/drb.rb:781 - def open(uri, config, first = T.unsafe(nil)); end - - # Open a server listening for connections at +uri+ with - # configuration +config+. - # - # The DRbProtocol module asks each registered protocol in turn to - # try to open a server at the URI. Each protocol signals that it does - # not handle that URI by raising a DRbBadScheme error. If no protocol - # recognises the URI, then a DRbBadURI error is raised. If a protocol - # accepts the URI, but an error occurs in opening it, the underlying - # error is passed on to the caller. - # - # pkg:gem/drb#lib/drb/drb.rb:805 - def open_server(uri, config, first = T.unsafe(nil)); end - - # Parse +uri+ into a [uri, option] pair. - # - # The DRbProtocol module asks each registered protocol in turn to - # try to parse the URI. Each protocol signals that it does not handle that - # URI by raising a DRbBadScheme error. If no protocol recognises the - # URI, then a DRbBadURI error is raised. - # - # pkg:gem/drb#lib/drb/drb.rb:828 - def uri_option(uri, config, first = T.unsafe(nil)); end - end -end - -# An exception wrapping an error object -# -# pkg:gem/drb#lib/drb/drb.rb:459 -class DRb::DRbRemoteError < ::DRb::DRbError - # Creates a new remote error that wraps the Exception +error+ - # - # pkg:gem/drb#lib/drb/drb.rb:462 - def initialize(error); end - - # the class of the error, as a string. - # - # pkg:gem/drb#lib/drb/drb.rb:469 - def reason; end -end - -# Class representing a drb server instance. -# -# A DRbServer must be running in the local process before any incoming -# dRuby calls can be accepted, or any local objects can be passed as -# dRuby references to remote processes, even if those local objects are -# never actually called remotely. You do not need to start a DRbServer -# in the local process if you are only making outgoing dRuby calls -# passing marshalled parameters. -# -# Unless multiple servers are being used, the local DRbServer is normally -# started by calling DRb.start_service. -# -# pkg:gem/drb#lib/drb/drb.rb:1378 -class DRb::DRbServer - # Create a new DRbServer instance. - # - # +uri+ is the URI to bind to. This is normally of the form - # 'druby://:' where is a hostname of - # the local machine. If nil, then the system's default hostname - # will be bound to, on a port selected by the system; these value - # can be retrieved from the +uri+ attribute. 'druby:' specifies - # the default dRuby transport protocol: another protocol, such - # as 'drbunix:', can be specified instead. - # - # +front+ is the front object for the server, that is, the object - # to which remote method calls on the server will be passed. If - # nil, then the server will not accept remote method calls. - # - # If +config_or_acl+ is a hash, it is the configuration to - # use for this server. The following options are recognised: - # - # :idconv :: an id-to-object conversion object. This defaults - # to an instance of the class DRb::DRbIdConv. - # :verbose :: if true, all unsuccessful remote calls on objects - # in the server will be logged to $stdout. false - # by default. - # :tcp_acl :: the access control list for this server. See - # the ACL class from the main dRuby distribution. - # :load_limit :: the maximum message size in bytes accepted by - # the server. Defaults to 25 MB (26214400). - # :argc_limit :: the maximum number of arguments to a remote - # method accepted by the server. Defaults to - # 256. - # The default values of these options can be modified on - # a class-wide basis by the class methods #default_argc_limit, - # #default_load_limit, #default_acl, #default_id_conv, - # and #verbose= - # - # If +config_or_acl+ is not a hash, but is not nil, it is - # assumed to be the access control list for this server. - # See the :tcp_acl option for more details. - # - # If no other server is currently set as the primary server, - # this will become the primary server. - # - # The server will immediately start running in its own thread. - # - # pkg:gem/drb#lib/drb/drb.rb:1479 - def initialize(uri = T.unsafe(nil), front = T.unsafe(nil), config_or_acl = T.unsafe(nil)); end - - # Is this server alive? - # - # pkg:gem/drb#lib/drb/drb.rb:1534 - def alive?; end - - # Check that a method is callable via dRuby. - # - # +obj+ is the object we want to invoke the method on. +msg_id+ is the - # method name, as a Symbol. - # - # If the method is an insecure method (see #insecure_method?) a - # SecurityError is thrown. If the method is private or undefined, - # a NameError is thrown. - # - # pkg:gem/drb#lib/drb/drb.rb:1622 - def check_insecure_method(obj, msg_id); end - - # The configuration of this DRbServer - # - # pkg:gem/drb#lib/drb/drb.rb:1521 - def config; end - - # The front object of the DRbServer. - # - # This object receives remote method calls made on the server's - # URI alone, with an object id. - # - # pkg:gem/drb#lib/drb/drb.rb:1518 - def front; end - - # Is +uri+ the URI for this server? - # - # pkg:gem/drb#lib/drb/drb.rb:1539 - def here?(uri); end - - # Stop this server. - # - # pkg:gem/drb#lib/drb/drb.rb:1544 - def stop_service; end - - # The main thread of this DRbServer. - # - # This is the thread that listens for and accepts connections - # from clients, not that handles each client's request-response - # session. - # - # pkg:gem/drb#lib/drb/drb.rb:1512 - def thread; end - - # Convert a local object to a dRuby reference. - # - # pkg:gem/drb#lib/drb/drb.rb:1561 - def to_id(obj); end - - # Convert a dRuby reference to the local object it refers to. - # - # pkg:gem/drb#lib/drb/drb.rb:1554 - def to_obj(ref); end - - # The URI of this DRbServer. - # - # pkg:gem/drb#lib/drb/drb.rb:1505 - def uri; end - - # Get whether the server is in verbose mode. - # - # In verbose mode, failed calls are logged to stdout. - # - # pkg:gem/drb#lib/drb/drb.rb:1531 - def verbose; end - - # Set whether to operate in verbose mode. - # - # In verbose mode, failed calls are logged to stdout. - # - # pkg:gem/drb#lib/drb/drb.rb:1526 - def verbose=(v); end - - private - - # Coerce an object to a string, providing our own representation if - # to_s is not defined for the object. - # - # pkg:gem/drb#lib/drb/drb.rb:1608 - def any_to_s(obj); end - - # pkg:gem/drb#lib/drb/drb.rb:1746 - def error_print(exception); end - - # Has a method been included in the list of insecure methods? - # - # pkg:gem/drb#lib/drb/drb.rb:1602 - def insecure_method?(msg_id); end - - # The main loop performed by a DRbServer's internal thread. - # - # Accepts a connection from a client, and starts up its own - # thread to handle it. This thread loops, receiving requests - # from the client, invoking them on a local object, and - # returning responses, until the client closes the connection - # or a local method call fails. - # - # pkg:gem/drb#lib/drb/drb.rb:1764 - def main_loop; end - - # Starts the DRb main loop in a new thread. - # - # pkg:gem/drb#lib/drb/drb.rb:1583 - def run; end - - # pkg:gem/drb#lib/drb/drb.rb:1568 - def shutdown; end - - class << self - # Set the default access control list to +acl+. The default ACL is +nil+. - # - # See also DRb::ACL and #new() - # - # pkg:gem/drb#lib/drb/drb.rb:1403 - def default_acl(acl); end - - # Set the default value for the :argc_limit option. - # - # See #new(). The initial default value is 256. - # - # pkg:gem/drb#lib/drb/drb.rb:1389 - def default_argc_limit(argc); end - - # Set the default value for the :id_conv option. - # - # See #new(). The initial default value is a DRbIdConv instance. - # - # pkg:gem/drb#lib/drb/drb.rb:1410 - def default_id_conv(idconv); end - - # Set the default value for the :load_limit option. - # - # See #new(). The initial default value is 25 MB. - # - # pkg:gem/drb#lib/drb/drb.rb:1396 - def default_load_limit(sz); end - - # pkg:gem/drb#lib/drb/drb.rb:1426 - def make_config(hash = T.unsafe(nil)); end - - # Get the default value of the :verbose option. - # - # pkg:gem/drb#lib/drb/drb.rb:1422 - def verbose; end - - # Set the default value of the :verbose option. - # - # See #new(). The initial default value is false. - # - # pkg:gem/drb#lib/drb/drb.rb:1417 - def verbose=(on); end - end -end - -# pkg:gem/drb#lib/drb/drb.rb:1652 -class DRb::DRbServer::InvokeMethod - # pkg:gem/drb#lib/drb/drb.rb:1653 - def initialize(drb_server, client); end - - # pkg:gem/drb#lib/drb/drb.rb:1658 - def perform; end - - private - - # pkg:gem/drb#lib/drb/drb.rb:1704 - def block_yield(x); end - - # pkg:gem/drb#lib/drb/drb.rb:1695 - def check_insecure_method; end - - # pkg:gem/drb#lib/drb/drb.rb:1687 - def init_with_client; end - - # pkg:gem/drb#lib/drb/drb.rb:1711 - def perform_with_block; end - - # pkg:gem/drb#lib/drb/drb.rb:1731 - def perform_without_block; end - - # pkg:gem/drb#lib/drb/drb.rb:1699 - def setup_message; end -end - -# The default drb protocol which communicates over a TCP socket. -# -# The DRb TCP protocol URI looks like: -# druby://:?. The option is optional. -# -# pkg:gem/drb#lib/drb/drb.rb:843 -class DRb::DRbTCPSocket - # Create a new DRbTCPSocket instance. - # - # +uri+ is the URI we are connected to. - # +soc+ is the tcp socket we are bound to. +config+ is our - # configuration. - # - # pkg:gem/drb#lib/drb/drb.rb:931 - def initialize(uri, soc, config = T.unsafe(nil)); end - - # On the server side, for an instance returned by #open_server, - # accept a client connection and return a new instance to handle - # the server's side of this client-server session. - # - # pkg:gem/drb#lib/drb/drb.rb:999 - def accept; end - - # Check to see if this connection is alive. - # - # pkg:gem/drb#lib/drb/drb.rb:1029 - def alive?; end - - # Close the connection. - # - # If this is an instance returned by #open_server, then this stops - # listening for new connections altogether. If this is an instance - # returned by #open or by #accept, then it closes this particular - # client-server session. - # - # pkg:gem/drb#lib/drb/drb.rb:981 - def close; end - - # Get the address of our TCP peer (the other end of the socket - # we are bound to. - # - # pkg:gem/drb#lib/drb/drb.rb:946 - def peeraddr; end - - # On the client side, receive a reply from the server. - # - # pkg:gem/drb#lib/drb/drb.rb:969 - def recv_reply; end - - # On the server side, receive a request from the client. - # - # pkg:gem/drb#lib/drb/drb.rb:959 - def recv_request; end - - # On the server side, send a reply to the client. - # - # pkg:gem/drb#lib/drb/drb.rb:964 - def send_reply(succ, result); end - - # On the client side, send a request to the server. - # - # pkg:gem/drb#lib/drb/drb.rb:954 - def send_request(ref, msg_id, arg, b); end - - # pkg:gem/drb#lib/drb/drb.rb:1038 - def set_sockopt(soc); end - - # Graceful shutdown - # - # pkg:gem/drb#lib/drb/drb.rb:1024 - def shutdown; end - - # Get the socket. - # - # pkg:gem/drb#lib/drb/drb.rb:951 - def stream; end - - # Get the URI that we are connected to. - # - # pkg:gem/drb#lib/drb/drb.rb:942 - def uri; end - - private - - # pkg:gem/drb#lib/drb/drb.rb:1014 - def accept_or_shutdown; end - - # pkg:gem/drb#lib/drb/drb.rb:990 - def close_shutdown_pipe; end - - class << self - # Returns the hostname of this server - # - # pkg:gem/drb#lib/drb/drb.rb:873 - def getservername; end - - # Open a client connection to +uri+ (DRb URI string) using configuration - # +config+. - # - # This can raise DRb::DRbBadScheme or DRb::DRbBadURI if +uri+ is not for a - # recognized protocol. See DRb::DRbServer.new for information on built-in - # URI protocols. - # - # pkg:gem/drb#lib/drb/drb.rb:866 - def open(uri, config); end - - # Open a server listening for connections at +uri+ using - # configuration +config+. - # - # pkg:gem/drb#lib/drb/drb.rb:904 - def open_server(uri, config); end - - # For the families available for +host+, returns a TCPServer on +port+. - # If +port+ is 0 the first available port is used. IPv4 servers are - # preferred over IPv6 servers. - # - # pkg:gem/drb#lib/drb/drb.rb:889 - def open_server_inaddr_any(host, port); end - - # pkg:gem/drb#lib/drb/drb.rb:846 - def parse_uri(uri); end - - # Parse +uri+ into a [uri, option] pair. - # - # pkg:gem/drb#lib/drb/drb.rb:921 - def uri_option(uri, config); end - end -end - -# Implements DRb over a UNIX socket -# -# DRb UNIX socket URIs look like drbunix:?. The -# option is optional. -# -# pkg:gem/drb#lib/drb/unix.rb:15 -class DRb::DRbUNIXSocket < ::DRb::DRbTCPSocket - # pkg:gem/drb#lib/drb/unix.rb:62 - def initialize(uri, soc, config = T.unsafe(nil), server_mode = T.unsafe(nil)); end - - # pkg:gem/drb#lib/drb/unix.rb:105 - def accept; end - - # pkg:gem/drb#lib/drb/unix.rb:95 - def close; end - - # pkg:gem/drb#lib/drb/unix.rb:111 - def set_sockopt(soc); end - - class << self - # pkg:gem/drb#lib/drb/unix.rb:28 - def open(uri, config); end - - # pkg:gem/drb#lib/drb/unix.rb:34 - def open_server(uri, config); end - - # :stopdoc: - # - # pkg:gem/drb#lib/drb/unix.rb:17 - def parse_uri(uri); end - - # pkg:gem/drb#lib/drb/unix.rb:72 - def temp_server; end - - # pkg:gem/drb#lib/drb/unix.rb:57 - def uri_option(uri, config); end - end -end - -# import from tempfile.rb -# -# pkg:gem/drb#lib/drb/unix.rb:70 -DRb::DRbUNIXSocket::Max_try = T.let(T.unsafe(nil), Integer) - -# pkg:gem/drb#lib/drb/drb.rb:1049 -class DRb::DRbURIOption - # pkg:gem/drb#lib/drb/drb.rb:1050 - def initialize(option); end - - # pkg:gem/drb#lib/drb/drb.rb:1056 - def ==(other); end - - # pkg:gem/drb#lib/drb/drb.rb:1065 - def eql?(other); end - - # pkg:gem/drb#lib/drb/drb.rb:1061 - def hash; end - - # pkg:gem/drb#lib/drb/drb.rb:1053 - def option; end - - # pkg:gem/drb#lib/drb/drb.rb:1054 - def to_s; end -end - -# Mixin module making an object undumpable or unmarshallable. -# -# If an object which includes this module is returned by method -# called over drb, then the object remains in the server space -# and a reference to the object is returned, rather than the -# object being marshalled and moved into the client space. -# -# pkg:gem/drb#lib/drb/drb.rb:418 -module DRb::DRbUndumped - # pkg:gem/drb#lib/drb/drb.rb:419 - def _dump(dummy); end -end - -# Class wrapping a marshalled object whose type is unknown locally. -# -# If an object is returned by a method invoked over drb, but the -# class of the object is unknown in the client namespace, or -# the object is a constant unknown in the client namespace, then -# the still-marshalled object is returned wrapped in a DRbUnknown instance. -# -# If this object is passed as an argument to a method invoked over -# drb, then the wrapped object is passed instead. -# -# The class or constant name of the object can be read from the -# +name+ attribute. The marshalled object is held in the +buf+ -# attribute. -# -# pkg:gem/drb#lib/drb/drb.rb:485 -class DRb::DRbUnknown - # Create a new DRbUnknown object. - # - # +buf+ is a string containing a marshalled object that could not - # be unmarshalled. +err+ is the error message that was raised - # when the unmarshalling failed. It is used to determine the - # name of the unmarshalled object. - # - # pkg:gem/drb#lib/drb/drb.rb:493 - def initialize(err, buf); end - - # pkg:gem/drb#lib/drb/drb.rb:522 - def _dump(lv); end - - # Buffer contained the marshalled, unknown object. - # - # pkg:gem/drb#lib/drb/drb.rb:512 - def buf; end - - # Create a DRbUnknownError exception containing this object. - # - # pkg:gem/drb#lib/drb/drb.rb:536 - def exception; end - - # The name of the unknown thing. - # - # Class name for unknown objects; variable name for unknown - # constants. - # - # pkg:gem/drb#lib/drb/drb.rb:509 - def name; end - - # Attempt to load the wrapped marshalled object again. - # - # If the class of the object is now known locally, the object - # will be unmarshalled and returned. Otherwise, a new - # but identical DRbUnknown object will be returned. - # - # pkg:gem/drb#lib/drb/drb.rb:531 - def reload; end - - class << self - # pkg:gem/drb#lib/drb/drb.rb:514 - def _load(s); end - end -end - -# An exception wrapping a DRb::DRbUnknown object -# -# pkg:gem/drb#lib/drb/drb.rb:438 -class DRb::DRbUnknownError < ::DRb::DRbError - # Create a new DRbUnknownError for the DRb::DRbUnknown object +unknown+ - # - # pkg:gem/drb#lib/drb/drb.rb:441 - def initialize(unknown); end - - # pkg:gem/drb#lib/drb/drb.rb:453 - def _dump(lv); end - - # Get the wrapped DRb::DRbUnknown object. - # - # pkg:gem/drb#lib/drb/drb.rb:447 - def unknown; end - - class << self - # pkg:gem/drb#lib/drb/drb.rb:449 - def _load(s); end - end -end - -# pkg:gem/drb#lib/drb/drb.rb:1227 -class DRb::ThreadObject - include ::MonitorMixin - - # pkg:gem/drb#lib/drb/drb.rb:1230 - def initialize(&blk); end - - # pkg:gem/drb#lib/drb/drb.rb:1265 - def _execute; end - - # pkg:gem/drb#lib/drb/drb.rb:1241 - def alive?; end - - # pkg:gem/drb#lib/drb/drb.rb:1245 - def kill; end - - # pkg:gem/drb#lib/drb/drb.rb:1250 - def method_missing(msg, *arg, &blk); end -end - -# pkg:gem/drb#lib/drb/version.rb:2 -DRb::VERSION = T.let(T.unsafe(nil), String) - -# pkg:gem/drb#lib/drb/drb.rb:1993 -DRbIdConv = DRb::DRbIdConv - -# :stopdoc: -# -# pkg:gem/drb#lib/drb/drb.rb:1991 -DRbObject = DRb::DRbObject - -# pkg:gem/drb#lib/drb/drb.rb:1992 -DRbUndumped = DRb::DRbUndumped diff --git a/sorbet/rbi/gems/erb@6.0.2.rbi b/sorbet/rbi/gems/erb@6.0.2.rbi deleted file mode 100644 index 117ad71..0000000 --- a/sorbet/rbi/gems/erb@6.0.2.rbi +++ /dev/null @@ -1,1537 +0,0 @@ -# typed: false - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `erb` gem. -# Please instead update this file by running `bin/tapioca gem erb`. - - -# :markup: markdown -# -# Class **ERB** (the name stands for **Embedded Ruby**) -# is an easy-to-use, but also very powerful, [template processor][template processor]. -# -# ## Usage -# -# Before you can use \ERB, you must first require it -# (examples on this page assume that this has been done): -# -# ``` -# require 'erb' -# ``` -# -# ## In Brief -# -# Here's how \ERB works: -# -# - You can create a *template*: a plain-text string that includes specially formatted *tags*.. -# - You can create an \ERB object to store the template. -# - You can call instance method ERB#result to get the *result*. -# -# \ERB supports tags of three kinds: -# -# - [Expression tags][expression tags]: -# each begins with `'<%='`, ends with `'%>'`; contains a Ruby expression; -# in the result, the value of the expression replaces the entire tag: -# -# template = 'The magic word is <%= magic_word %>.' -# erb = ERB.new(template) -# magic_word = 'xyzzy' -# erb.result(binding) # => "The magic word is xyzzy." -# -# The above call to #result passes argument `binding`, -# which contains the binding of variable `magic_word` to its string value `'xyzzy'`. -# -# The below call to #result need not pass a binding, -# because its expression `Date::DAYNAMES` is globally defined. -# -# ERB.new('Today is <%= Date::DAYNAMES[Date.today.wday] %>.').result # => "Today is Monday." -# -# - [Execution tags][execution tags]: -# each begins with `'<%'`, ends with `'%>'`; contains Ruby code to be executed: -# -# template = '<% File.write("t.txt", "Some stuff.") %>' -# ERB.new(template).result -# File.read('t.txt') # => "Some stuff." -# -# - [Comment tags][comment tags]: -# each begins with `'<%#'`, ends with `'%>'`; contains comment text; -# in the result, the entire tag is omitted. -# -# template = 'Some stuff;<%# Note to self: figure out what the stuff is. %> more stuff.' -# ERB.new(template).result # => "Some stuff; more stuff." -# -# ## Some Simple Examples -# -# Here's a simple example of \ERB in action: -# -# ``` -# template = 'The time is <%= Time.now %>.' -# erb = ERB.new(template) -# erb.result -# # => "The time is 2025-09-09 10:49:26 -0500." -# ``` -# -# Details: -# -# 1. A plain-text string is assigned to variable `template`. -# Its embedded [expression tag][expression tags] `'<%= Time.now %>'` includes a Ruby expression, `Time.now`. -# 2. The string is put into a new \ERB object, and stored in variable `erb`. -# 4. Method call `erb.result` generates a string that contains the run-time value of `Time.now`, -# as computed at the time of the call. -# -# The -# \ERB object may be re-used: -# -# ``` -# erb.result -# # => "The time is 2025-09-09 10:49:33 -0500." -# ``` -# -# Another example: -# -# ``` -# template = 'The magic word is <%= magic_word %>.' -# erb = ERB.new(template) -# magic_word = 'abracadabra' -# erb.result(binding) -# # => "The magic word is abracadabra." -# ``` -# -# Details: -# -# 1. As before, a plain-text string is assigned to variable `template`. -# Its embedded [expression tag][expression tags] `'<%= magic_word %>'` has a variable *name*, `magic_word`. -# 2. The string is put into a new \ERB object, and stored in variable `erb`; -# note that `magic_word` need not be defined before the \ERB object is created. -# 3. `magic_word = 'abracadabra'` assigns a value to variable `magic_word`. -# 4. Method call `erb.result(binding)` generates a string -# that contains the *value* of `magic_word`. -# -# As before, the \ERB object may be re-used: -# -# ``` -# magic_word = 'xyzzy' -# erb.result(binding) -# # => "The magic word is xyzzy." -# ``` -# -# ## Bindings -# -# A call to method #result, which produces the formatted result string, -# requires a [Binding object][binding object] as its argument. -# -# The binding object provides the bindings for expressions in [expression tags][expression tags]. -# -# There are three ways to provide the required binding: -# -# - [Default binding][default binding]. -# - [Local binding][local binding]. -# - [Augmented binding][augmented binding] -# -# ### Default Binding -# -# When you pass no `binding` argument to method #result, -# the method uses its default binding: the one returned by method #new_toplevel. -# This binding has the bindings defined by Ruby itself, -# which are those for Ruby's constants and variables. -# -# That binding is sufficient for an expression tag that refers only to Ruby's constants and variables; -# these expression tags refer only to Ruby's global constant `RUBY_COPYRIGHT` and global variable `$0`: -# -# ``` -# template = <