Add new files to the list of all files in sorbet/files.yaml.
following 8 files are added to false:
- ./cmd/--caskroom.rb
- ./rubocops/cask/mixin/on_desc_stanza.rb
- ./rubocops/shared/desc_helper.rb
- ./rubocops/shared/helper_functions.rb
- ./test/cmd/--caskroom_spec.rb
- ./test/dependencies_helpers_spec.rb
- ./test/rubocops/cask/desc_spec.rb
- ./test/utils/spdx_spec.rb
following 6 files are added to true:
- ./compat/cli/parser.rb
- ./compat/dependencies_helpers.rb
- ./context.rb
- ./dependencies_helpers.rb
- ./rubocops/cask/desc.rb
- ./utils/spdx.rb
- Sorbet gives preference to class methods over methods defined in
included modules, hence Sorbet was unavailable to resolve the
definition of the gsub! method.
- The gsub! method in StringInreplaceExtension conflicts with the definition in String.
- This PR refactors the call to the gsub! method so that a custom object
is exposed instead of a string.
Set the following files to true in sorbet/files.yaml:
- ./fetch.rb
- ./formula_pin.rb
- ./hardware.rb
- ./help.rb
- ./language/go.rb
- ./language/java.rb
- ./language/perl.rb
- ./messages.rb
Set the following files to true in sorbet/files.yaml:
- ./cleaner.rb
- ./compilers.rb
- ./dependency_collector.rb
- ./description_cache_store.rb
- ./descriptions.rb
- ./env_config.rb
- My refactoring of #7933 went wrong in that the tests passed for `brew
extract` and my manual testing, but both forgot about third-party taps
exist, so that functionality broke as follows (courtesy of Misty).
Before:
```
# Git.last_revision_commit_of_files("/usr/local/Homebrew", ["LICENSE.txt", "README.md"])
=> ["ac0665d", ["README.md"]]
```
After:
```
# Git.last_revision_commit_of_files("/usr/local/Homebrew", ["LICENSE.txt", "README.md"])
=> [nil, []]
```
- While we think about how to do splats in Sorbet, revert this so
that users are able to `brew extract` from third party taps again.
- A TODO for later in a separate PR is to write a test for `brew
extract` that tests the behaviour of third-party taps.
---
- Reverted this manually because the GitHub UI couldn't do it.
- Arguably I didn't need to remove the RBI file, but it's easier to have
everything gone for now and then revert this revert in future once we
have a strategy for dealing with splats in Sorbet than have
inconsistency.