perf: rubocop/tapioca parser optimizations

This commit is contained in:
Douglas Eichelberger 2025-04-01 21:05:43 -07:00
parent b4ae6f5513
commit b3b6c147fb
No known key found for this signature in database
GPG Key ID: F90193CBD547EB81
3 changed files with 10 additions and 0 deletions

View File

@ -18,12 +18,17 @@ inherit_mode:
- Exclude
AllCops:
# TODO: This is the default parser in Ruby >= 3.4
# https://github.com/rubocop/rubocop-ast/blob/6b9136235219e9448ee4f369e17cf69bcd9db621/lib/rubocop/ast/processed_source.rb#L385
ParserEngine: parser_prism
TargetRubyVersion: 3.3
NewCops: enable
Include:
- "**/*.rbi"
Exclude:
- "Homebrew/sorbet/rbi/{dsl,gems}/**/*.rbi"
# TODO: remove file and exclusion in Ruby 3.4
- "Homebrew/sorbet/rbi/parser*.rbi"
- "Homebrew/bin/*"
- "Homebrew/vendor/**/*"
- "Taps/*/*/vendor/**/*"

View File

@ -37,4 +37,9 @@ gem:
# The tapioca generated gem is not correct or sufficient for pycall
# so we need to generate our own:
- pycall
# Skipping rbi generation for parser results in a 7x performance
# improvement in `brew typecheck --update--all`, so we just persist it
# instead. (This gem is only needed by rubocop, which is in the process of
# migrating to prism.)
- parser
prerequire: sorbet/tapioca/prerequire.rb