brew icon indicating copy to clipboard operation
brew copied to clipboard

Use Sorbet `typed: strict` in all (non-package) files in Homebrew organisation

Open MikeMcQuaid opened this issue 1 year ago • 10 comments

Verification

  • [X] This issue's title and/or description do not reference a single formula e.g. brew install wget. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.

Provide a detailed description of the proposed feature

We should use Sorbet's typed: strict for all (non-package i.e. not casks or formulae) files in the Homebrew organisation.

Some good transition steps will include:

  • [x] requiring typed: strict on all new files https://github.com/Homebrew/brew/pull/18023
  • [x] enabling Sorbet in brew test-bot for taps https://github.com/Homebrew/homebrew-test-bot/pull/1173
  • [x] using Sorbet in all taps
  • [ ] finally: requiring typed: strict in all Homebrew/brew and tap files

What is the motivation for the feature?

  • Improving the reliability of Homebrew
  • Providing additional support to tests to avoiding regressions
  • Improving our API documentation

How will the feature be relevant to at least 90% of Homebrew users?

Making Homebrew more reliable.

What alternatives to the feature have been considered?

Not doing this.

MikeMcQuaid avatar May 14 '24 07:05 MikeMcQuaid

Running brew typecheck --update --suggest-typed with this diff:

diff --git a/Library/Homebrew/dev-cmd/typecheck.rb b/Library/Homebrew/dev-cmd/typecheck.rb
index d87e54bfb2..cc03f66ffd 100644
--- a/Library/Homebrew/dev-cmd/typecheck.rb
+++ b/Library/Homebrew/dev-cmd/typecheck.rb
@@ -61,9 +61,9 @@ module Homebrew
               ohai "Checking if we can bump Sorbet `typed` sigils..."
               # --sorbet needed because of https://github.com/Shopify/spoom/issues/488
               safe_system "bundle", "exec", "spoom", "srb", "bump", "--dry", "--from", "false", "--to", "true",
-                          "--sorbet", "#{Gem.bin_path("sorbet", "srb")} tc"
+                          "-f", "--sorbet", "#{Gem.bin_path("sorbet", "srb")} tc"
               safe_system "bundle", "exec", "spoom", "srb", "bump", "--dry", "--from", "true", "--to", "strict",
-                          "--sorbet", "#{Gem.bin_path("sorbet", "srb")} tc"
+                          "-f", "--sorbet", "#{Gem.bin_path("sorbet", "srb")} tc"
             end
 
             return

(where -f is "attempt to bump things even if they generate type errors") enables Spoom to tell me what needs doing here wrt core Homebrew Ruby files:

==> Checking if we can bump Sorbet `typed` sigils...
Checking files...

No files to bump from false to true
Checking files...

Can bump 383 files from true to strict:
 + PATH.rb
 + api.rb
 + api/analytics.rb
 + api/cask.rb
 + api/download.rb
 + api/formula.rb
 + build.rb
 + build_environment.rb
 + build_options.rb
 + bundle_version.rb
 + cache_store.rb
 + cask/artifact/abstract_artifact.rb
 + cask/artifact/abstract_flight_block.rb
 + cask/artifact/abstract_uninstall.rb
 + cask/artifact/binary.rb
 + cask/artifact/installer.rb
 + cask/artifact/keyboard_layout.rb
 + cask/artifact/manpage.rb
 + cask/artifact/mdimporter.rb
 + cask/artifact/moved.rb
 + cask/artifact/pkg.rb
 + cask/artifact/qlplugin.rb
 + cask/artifact/relocated.rb
 + cask/artifact/stage_only.rb
 + cask/artifact/symlinked.rb
 + cask/artifact/uninstall.rb
 + cask/artifact/zap.rb
 + cask/artifact_set.rb
 + cask/audit.rb
 + cask/auditor.rb
 + cask/cask.rb
 + cask/cask_loader.rb
 + cask/caskroom.rb
 + cask/config.rb
 + cask/download.rb
 + cask/dsl.rb
 + cask/dsl/base.rb
 + cask/dsl/caveats.rb
 + cask/dsl/conflicts_with.rb
 + cask/dsl/container.rb
 + cask/dsl/depends_on.rb
 + cask/dsl/version.rb
 + cask/exceptions.rb
 + cask/info.rb
 + cask/installer.rb
 + cask/list.rb
 + cask/macos.rb
 + cask/metadata.rb
 + cask/migrator.rb
 + cask/pkg.rb
 + cask/quarantine.rb
 + cask/reinstall.rb
 + cask/staged.rb
 + cask/uninstall.rb
 + cask/url.rb
 + cask/utils.rb
 + cask_dependent.rb
 + caveats.rb
 + cleaner.rb
 + cleanup.rb
 + cli/args.rb
 + cli/named_args.rb
 + cmd/--prefix.rb
 + cmd/deps.rb
 + cmd/fetch.rb
 + cmd/gist-logs.rb
 + cmd/home.rb
 + cmd/info.rb
 + cmd/leaves.rb
 + cmd/link.rb
 + cmd/list.rb
 + cmd/options.rb
 + cmd/outdated.rb
 + cmd/search.rb
 + cmd/tap-info.rb
 + cmd/update-report.rb
 + cmd/uses.rb
 + commands.rb
 + compilers.rb
 + completions.rb
 + context.rb
 + cxxstdlib.rb
 + debrew.rb
 + debrew/irb.rb
 + dependable.rb
 + dependencies.rb
 + dependencies_helpers.rb
 + dependency.rb
 + dependency_collector.rb
 + deprecate_disable.rb
 + description_cache_store.rb
 + descriptions.rb
 + dev-cmd/audit.rb
 + dev-cmd/bottle.rb
 + dev-cmd/bump-formula-pr.rb
 + dev-cmd/contributions.rb
 + dev-cmd/extract.rb
 + dev-cmd/generate-cask-api.rb
 + dev-cmd/generate-formula-api.rb
 + dev-cmd/irb.rb
 + dev-cmd/livecheck.rb
 + dev-cmd/pr-pull.rb
 + dev-cmd/pr-upload.rb
 + dev-cmd/tap-new.rb
 + dev-cmd/test.rb
 + dev-cmd/tests.rb
 + dev-cmd/unbottled.rb
 + dev-cmd/update-sponsors.rb
 + development_tools.rb
 + diagnostic.rb
 + download_strategy.rb
 + downloadable.rb
 + env_config.rb
 + exceptions.rb
 + extend/ENV/shared.rb
 + extend/ENV/super.rb
 + extend/api_hashable.rb
 + extend/io.rb
 + extend/kernel.rb
 + extend/on_system.rb
 + extend/os/linux/cleanup.rb
 + extend/os/linux/cmd/update-report.rb
 + extend/os/linux/dependency_collector.rb
 + extend/os/linux/development_tools.rb
 + extend/os/linux/diagnostic.rb
 + extend/os/linux/extend/ENV/shared.rb
 + extend/os/linux/extend/ENV/std.rb
 + extend/os/linux/extend/ENV/super.rb
 + extend/os/linux/formula.rb
 + extend/os/linux/formula_installer.rb
 + extend/os/linux/hardware/cpu.rb
 + extend/os/linux/install.rb
 + extend/os/linux/keg.rb
 + extend/os/linux/keg_relocate.rb
 + extend/os/linux/linkage_checker.rb
 + extend/os/linux/parser.rb
 + extend/os/linux/simulate_system.rb
 + extend/os/linux/system_config.rb
 + extend/os/mac/cleaner.rb
 + extend/os/mac/cleanup.rb
 + extend/os/mac/dependency_collector.rb
 + extend/os/mac/dev-cmd/bottle.rb
 + extend/os/mac/development_tools.rb
 + extend/os/mac/diagnostic.rb
 + extend/os/mac/extend/ENV/std.rb
 + extend/os/mac/extend/ENV/super.rb
 + extend/os/mac/formula.rb
 + extend/os/mac/formula_installer.rb
 + extend/os/mac/hardware/cpu.rb
 + extend/os/mac/keg.rb
 + extend/os/mac/keg_relocate.rb
 + extend/os/mac/linkage_checker.rb
 + extend/os/mac/readall.rb
 + extend/os/mac/simulate_system.rb
 + extend/os/mac/system_config.rb
 + extend/os/mac/utils/bottles.rb
 + extend/pathname.rb
 + formula.rb
 + formula_assertions.rb
 + formula_auditor.rb
 + formula_cellar_checks.rb
 + formula_creator.rb
 + formula_info.rb
 + formula_installer.rb
 + formula_pin.rb
 + formula_support.rb
 + formula_versions.rb
 + formulary.rb
 + github_packages.rb
 + global.rb
 + hardware.rb
 + help.rb
 + ignorable.rb
 + install.rb
 + install_renamed.rb
 + installed_dependents.rb
 + keg.rb
 + keg_relocate.rb
 + lazy_object.rb
 + linkage_cache_store.rb
 + linkage_checker.rb
 + linuxbrew-core-migration.rb
 + livecheck.rb
 + livecheck/skip_conditions.rb
 + livecheck/strategy.rb
 + livecheck/strategy/crate.rb
 + livecheck/strategy/github_releases.rb
 + livecheck/strategy/header_match.rb
 + livecheck/strategy/sparkle.rb
 + livecheck/strategy/xorg.rb
 + locale.rb
 + lock_file.rb
 + macos_version.rb
 + manpages.rb
 + manpages/converter/kramdown.rb
 + manpages/converter/roff.rb
 + manpages/parser/ronn.rb
 + metafiles.rb
 + migrator.rb
 + missing_formula.rb
 + mktemp.rb
 + official_taps.rb
 + options.rb
 + os.rb
 + os/linux.rb
 + os/linux/elf.rb
 + os/linux/glibc.rb
 + os/mac.rb
 + os/mac/keg.rb
 + os/mac/mach.rb
 + os/mac/sdk.rb
 + os/mac/xcode.rb
 + patch.rb
 + pkg_version.rb
 + readall.rb
 + reinstall.rb
 + requirement.rb
 + requirements/arch_requirement.rb
 + requirements/codesign_requirement.rb
 + requirements/macos_requirement.rb
 + requirements/xcode_requirement.rb
 + resource.rb
 + resource_auditor.rb
 + rubocops/blank.rb
 + rubocops/bottle.rb
 + rubocops/cask/array_alphabetization.rb
 + rubocops/cask/ast/cask_block.rb
 + rubocops/cask/ast/cask_header.rb
 + rubocops/cask/ast/stanza.rb
 + rubocops/cask/constants/stanza.rb
 + rubocops/cask/desc.rb
 + rubocops/cask/discontinued.rb
 + rubocops/cask/extend/node.rb
 + rubocops/cask/homepage_url_styling.rb
 + rubocops/cask/mixin/cask_help.rb
 + rubocops/cask/mixin/on_desc_stanza.rb
 + rubocops/cask/mixin/on_homepage_stanza.rb
 + rubocops/cask/mixin/on_url_stanza.rb
 + rubocops/cask/no_overrides.rb
 + rubocops/cask/on_system_conditionals.rb
 + rubocops/cask/shared_filelist_glob.rb
 + rubocops/cask/stanza_grouping.rb
 + rubocops/cask/stanza_order.rb
 + rubocops/cask/url.rb
 + rubocops/cask/url_legacy_comma_separators.rb
 + rubocops/cask/variables.rb
 + rubocops/caveats.rb
 + rubocops/checksum.rb
 + rubocops/class.rb
 + rubocops/compact_blank.rb
 + rubocops/components_order.rb
 + rubocops/components_redundancy.rb
 + rubocops/conflicts.rb
 + rubocops/dependency_order.rb
 + rubocops/deprecate_disable.rb
 + rubocops/desc.rb
 + rubocops/extend/formula_cop.rb
 + rubocops/files.rb
 + rubocops/homepage.rb
 + rubocops/install_bundler_gems.rb
 + rubocops/io_read.rb
 + rubocops/keg_only.rb
 + rubocops/lines.rb
 + rubocops/livecheck.rb
 + rubocops/move_to_extend_os.rb
 + rubocops/negate_include.rb
 + rubocops/options.rb
 + rubocops/patches.rb
 + rubocops/presence.rb
 + rubocops/present.rb
 + rubocops/resource_requires_dependencies.rb
 + rubocops/safe_navigation_with_blank.rb
 + rubocops/service.rb
 + rubocops/shared/desc_helper.rb
 + rubocops/shared/helper_functions.rb
 + rubocops/shared/homepage_helper.rb
 + rubocops/shared/on_system_conditionals_helper.rb
 + rubocops/shared/url_helper.rb
 + rubocops/shell_commands.rb
 + rubocops/text.rb
 + rubocops/urls.rb
 + rubocops/uses_from_macos.rb
 + rubocops/version.rb
 + sbom.rb
 + search.rb
 + service.rb
 + settings.rb
 + simulate_system.rb
 + software_spec.rb
 + sorbet/parlour.rb
 + standalone/init.rb
 + standalone/sorbet.rb
 + startup/config.rb
 + startup/ruby_path.rb
 + style.rb
 + system_command.rb
 + system_config.rb
 + tab.rb
 + tap.rb
 + tap_auditor.rb
 + test.rb
 + test/support/fixtures/failball.rb
 + test/support/fixtures/failball_offline_install.rb
 + test/support/fixtures/testball.rb
 + test/support/fixtures/testball_bottle.rb
 + test/support/fixtures/testball_bottle_cellar.rb
 + test/support/helper/cask/install_helper.rb
 + test/support/helper/cask/never_sudo_system_command.rb
 + test/support/helper/files.rb
 + test/support/helper/fixtures.rb
 + test/support/helper/integration_mocks.rb
 + test/support/lib/startup/config.rb
 + test/support/quiet_progress_formatter.rb
 + uninstall.rb
 + unlink.rb
 + unpack_strategy.rb
 + unpack_strategy/air.rb
 + unpack_strategy/bazaar.rb
 + unpack_strategy/bzip2.rb
 + unpack_strategy/cab.rb
 + unpack_strategy/compress.rb
 + unpack_strategy/cvs.rb
 + unpack_strategy/directory.rb
 + unpack_strategy/dmg.rb
 + unpack_strategy/executable.rb
 + unpack_strategy/fossil.rb
 + unpack_strategy/generic_unar.rb
 + unpack_strategy/git.rb
 + unpack_strategy/gzip.rb
 + unpack_strategy/jar.rb
 + unpack_strategy/lha.rb
 + unpack_strategy/lua_rock.rb
 + unpack_strategy/lzip.rb
 + unpack_strategy/lzma.rb
 + unpack_strategy/mercurial.rb
 + unpack_strategy/microsoft_office_xml.rb
 + unpack_strategy/otf.rb
 + unpack_strategy/p7zip.rb
 + unpack_strategy/pax.rb
 + unpack_strategy/pkg.rb
 + unpack_strategy/rar.rb
 + unpack_strategy/self_extracting_executable.rb
 + unpack_strategy/sit.rb
 + unpack_strategy/subversion.rb
 + unpack_strategy/tar.rb
 + unpack_strategy/ttf.rb
 + unpack_strategy/xar.rb
 + unpack_strategy/xz.rb
 + unpack_strategy/zstd.rb
 + unversioned_cask_checker.rb
 + upgrade.rb
 + url.rb
 + utils.rb
 + utils/analytics.rb
 + utils/bottles.rb
 + utils/curl.rb
 + utils/fork.rb
 + utils/formatter.rb
 + utils/gems.rb
 + utils/git.rb
 + utils/github.rb
 + utils/github/actions.rb
 + utils/github/api.rb
 + utils/github/artifacts.rb
 + utils/inreplace.rb
 + utils/link.rb
 + utils/popen.rb
 + utils/pypi.rb
 + utils/repology.rb
 + utils/ruby_check_version_script.rb
 + utils/service.rb
 + utils/shared_audits.rb
 + utils/shebang.rb
 + utils/shell.rb
 + utils/spdx.rb
 + utils/svn.rb
 + utils/tar.rb
 + utils/topological_hash.rb
 + utils/tty.rb
 + utils/user.rb
 + warnings.rb
 + yard/docstring_parser.rb
 + yard/templates/default/docstring/html/setup.rb

Run spoom bump --from true --to strict locally then commit the changes and push them

My first task is the above, specifically utils and dev-cmd I think.

issyl0 avatar Jun 27 '24 12:06 issyl0

Follow-up work for dev-cmd and patterns to be aware of for future conversions:

Think it'd be good to get rid of some of the T.nilable and T.untyped when possible later but: this is better than the status quo for sure. There's also some returns(NilClass) that should probably be void. All this can be done in follow-ups. Thanks again!

issyl0 avatar Jul 04 '24 08:07 issyl0

To set expectations: this is a slow burn kind of task because if I do too much of it at once then my brain melts. But I've got some branches on the go.

issyl0 avatar Aug 08 '24 22:08 issyl0

I reran spoom bump [...] -f --dry as of 2024-08-09 and categorized (ish) these into groups to make it seem less :scream:.

Public APIs

grep -rL "# typed: strict" Library/Homebrew | xargs grep -l "@api public"

  • [ ] extend/pathname.rb
  • [ ] extend/ENV/super.rb
  • [ ] extend/kernel.rb
  • [ ] download_strategy.rb
  • [ ] utils/inreplace.rb
  • [ ] tap.rb
  • [ ] resource.rb
  • [ ] cask/cask.rb
  • [ ] cask/url.rb
  • [ ] cask/dsl/version.rb
  • [ ] cask/dsl.rb
  • [ ] formula.rb

API

  • [ ] api.rb
  • [ ] api/analytics.rb
  • [ ] api/cask.rb
  • [ ] api/download.rb
  • [ ] api/formula.rb

Cask

  • [ ] cask/artifact/abstract_artifact.rb
  • [ ] cask/artifact/abstract_flight_block.rb
  • [ ] cask/artifact/abstract_uninstall.rb
  • [ ] cask/artifact/binary.rb
  • [ ] cask/artifact/installer.rb
  • [ ] cask/artifact/keyboard_layout.rb
  • [ ] cask/artifact/manpage.rb
  • [ ] cask/artifact/mdimporter.rb
  • [ ] cask/artifact/moved.rb
  • [ ] cask/artifact/pkg.rb
  • [ ] cask/artifact/qlplugin.rb
  • [ ] cask/artifact/relocated.rb
  • [ ] cask/artifact/stage_only.rb
  • [ ] cask/artifact/symlinked.rb
  • [ ] cask/artifact/uninstall.rb
  • [ ] cask/artifact/zap.rb
  • [ ] cask/artifact_set.rb
  • [ ] cask/audit.rb
  • [ ] cask/auditor.rb
  • [ ] cask/cask_loader.rb
  • [ ] cask/caskroom.rb
  • [ ] cask/config.rb
  • [ ] cask/download.rb
  • [ ] cask/dsl/base.rb
  • [ ] cask/dsl/caveats.rb
  • [ ] cask/dsl/conflicts_with.rb
  • [ ] cask/dsl/container.rb
  • [ ] cask/dsl/depends_on.rb
  • [ ] cask/exceptions.rb
  • [ ] cask/installer.rb
  • [ ] cask/list.rb
  • [ ] cask/macos.rb
  • [ ] cask/metadata.rb
  • [ ] cask/migrator.rb
  • [ ] cask/pkg.rb
  • [ ] cask/quarantine.rb
  • [ ] cask/reinstall.rb
  • [ ] cask/staged.rb
  • [ ] cask/tab.rb
  • [ ] cask/uninstall.rb
  • [ ] cask/utils.rb
  • [ ] cask_dependent.rb

Commands

  • [ ] cli/named_args.rb
  • [ ] cmd/--prefix.rb
  • [ ] cmd/deps.rb
  • [ ] cmd/fetch.rb
  • [ ] cmd/gist-logs.rb
  • [ ] cmd/home.rb
  • [ ] cmd/info.rb
  • [ ] cmd/leaves.rb
  • [ ] cmd/link.rb
  • [ ] cmd/list.rb
  • [ ] cmd/options.rb
  • [ ] cmd/outdated.rb
  • [ ] cmd/search.rb
  • [ ] cmd/tap-info.rb
  • [ ] cmd/update-report.rb
  • [ ] cmd/uses.rb
  • [ ] commands.rb
  • [x] ~dev-cmd/extract.rb~
  • [ ] compilers.rb
  • [ ] completions.rb
  • [ ] context.rb
  • [ ] cxxstdlib.rb
  • [ ] debrew.rb
  • [ ] debrew/irb.rb
  • [ ] dependable.rb
  • [ ] dependencies.rb
  • [ ] dependencies_helpers.rb
  • [ ] dependency.rb
  • [ ] dependency_collector.rb
  • [ ] deprecate_disable.rb
  • [ ] description_cache_store.rb
  • [ ] descriptions.rb
  • [ ] diagnostic.rb
  • [ ] downloadable.rb
  • [ ] exceptions.rb

Extend

  • [ ] extend/ENV/shared.rb
  • [ ] extend/api_hashable.rb
  • [ ] extend/io.rb
  • [ ] extend/on_system.rb
  • [x] ~extend/os/linux/cleanup.rb~
  • [ ] extend/os/linux/cmd/update-report.rb
  • [x] ~extend/os/linux/dependency_collector.rb~
  • [ ] extend/os/linux/development_tools.rb
  • [x] ~extend/os/linux/diagnostic.rb~
  • [ ] extend/os/linux/extend/ENV/shared.rb
  • [ ] extend/os/linux/extend/ENV/std.rb
  • [ ] extend/os/linux/extend/ENV/super.rb
  • [x] ~extend/os/linux/formula.rb~
  • [x] ~extend/os/linux/formula_installer.rb~
  • [ ] extend/os/linux/hardware/cpu.rb
  • [ ] extend/os/linux/install.rb
  • [x] ~extend/os/linux/keg.rb~
  • [ ] extend/os/linux/keg_relocate.rb
  • [ ] extend/os/linux/linkage_checker.rb
  • [x] ~extend/os/linux/parser.rb~
  • [x] ~extend/os/linux/simulate_system.rb~
  • [ ] extend/os/linux/system_config.rb
  • [x] ~extend/os/mac/cleaner.rb~
  • [x] ~extend/os/mac/cleanup.rb~
  • [x] ~extend/os/mac/dependency_collector.rb~
  • [x] ~extend/os/mac/dev-cmd/bottle.rb~
  • [x] ~extend/os/mac/development_tools.rb~
  • [x] ~extend/os/mac/diagnostic.rb~
  • [x] ~extend/os/mac/extend/ENV/std.rb~
  • [x] ~extend/os/mac/extend/ENV/super.rb~
  • [x] ~extend/os/mac/formula.rb~
  • [x] ~extend/os/mac/formula_installer.rb~
  • [x] ~extend/os/mac/hardware/cpu.rb~
  • [x] ~extend/os/mac/keg.rb~
  • [x] ~extend/os/mac/keg_relocate.rb~
  • [x] ~extend/os/mac/linkage_checker.rb~
  • [x] ~extend/os/mac/readall.rb~
  • [x] ~extend/os/mac/simulate_system.rb~
  • [x] ~extend/os/mac/system_config.rb~
  • [x] extend/os/mac/utils/bottles.rb

Formula

  • [ ] formula_auditor.rb
  • [ ] formula_cellar_checks.rb
  • [ ] formula_creator.rb
  • [ ] formula_info.rb
  • [ ] formula_installer.rb
  • [ ] formula_pin.rb
  • [ ] formula_support.rb
  • [ ] formula_versions.rb
  • [ ] formulary.rb

Linters

  • [ ] rubocops/blank.rb
  • [ ] rubocops/bottle.rb
  • [ ] rubocops/cask/array_alphabetization.rb
  • [ ] rubocops/cask/ast/cask_block.rb
  • [ ] rubocops/cask/ast/cask_header.rb
  • [ ] rubocops/cask/ast/stanza.rb
  • [ ] rubocops/cask/constants/stanza.rb
  • [ ] rubocops/cask/desc.rb
  • [ ] rubocops/cask/discontinued.rb
  • [ ] rubocops/cask/extend/node.rb
  • [ ] rubocops/cask/homepage_url_styling.rb
  • [ ] rubocops/cask/mixin/cask_help.rb
  • [ ] rubocops/cask/mixin/on_desc_stanza.rb
  • [ ] rubocops/cask/mixin/on_homepage_stanza.rb
  • [ ] rubocops/cask/mixin/on_url_stanza.rb
  • [ ] rubocops/cask/no_overrides.rb
  • [ ] rubocops/cask/on_system_conditionals.rb
  • [ ] rubocops/cask/shared_filelist_glob.rb
  • [ ] rubocops/cask/stanza_grouping.rb
  • [ ] rubocops/cask/stanza_order.rb
  • [ ] rubocops/cask/url.rb
  • [ ] rubocops/cask/url_legacy_comma_separators.rb
  • [ ] rubocops/cask/variables.rb
  • [ ] rubocops/checksum.rb
  • [ ] rubocops/compact_blank.rb
  • [ ] rubocops/components_order.rb
  • [ ] rubocops/conflicts.rb
  • [ ] rubocops/dependency_order.rb
  • [ ] rubocops/deprecate_disable.rb
  • [ ] rubocops/desc.rb
  • [ ] rubocops/extend/formula_cop.rb
  • [ ] rubocops/install_bundler_gems.rb
  • [ ] rubocops/io_read.rb
  • [ ] rubocops/keg_only.rb
  • [ ] rubocops/lines.rb
  • [ ] rubocops/move_to_extend_os.rb
  • [ ] rubocops/negate_include.rb
  • [ ] rubocops/no_fileutils_rmrf.rb
  • [ ] rubocops/patches.rb
  • [ ] rubocops/presence.rb
  • [ ] rubocops/present.rb
  • [ ] rubocops/safe_navigation_with_blank.rb
  • [ ] rubocops/service.rb
  • [ ] rubocops/shared/desc_helper.rb
  • [ ] rubocops/shared/helper_functions.rb
  • [ ] rubocops/shared/homepage_helper.rb
  • [ ] rubocops/shared/on_system_conditionals_helper.rb
  • [ ] rubocops/shared/url_helper.rb
  • [ ] rubocops/shell_commands.rb
  • [ ] rubocops/text.rb
  • [ ] rubocops/urls.rb
  • [ ] rubocops/uses_from_macos.rb

Utils

  • [ ] url.rb
  • [ ] utils.rb
  • [ ] utils/analytics.rb
  • [ ] utils/bottles.rb
  • [ ] utils/curl.rb
  • [ ] utils/fork.rb
  • [ ] utils/formatter.rb
  • [ ] utils/gems.rb
  • [ ] utils/git.rb
  • [ ] utils/github.rb
  • [ ] utils/github/api.rb
  • [x] utils/link.rb
  • [ ] utils/popen.rb
  • [ ] utils/pypi.rb
  • [ ] utils/repology.rb
  • [ ] utils/ruby_check_version_script.rb
  • [ ] utils/service.rb
  • [x] utils/shared_audits.rb
  • [ ] utils/shell.rb
  • [ ] utils/spdx.rb
  • [x] utils/svn.rb
  • [ ] utils/topological_hash.rb
  • [ ] utils/tty.rb
  • [x] utils/user.rb

Other (TODO: break these down further, or just grab a few and start)

  • [ ] PATH.rb
  • [ ] build.rb
  • [ ] build_environment.rb
  • [ ] build_options.rb
  • [ ] bundle_version.rb
  • [ ] cache_store.rb
  • [ ] caveats.rb
  • [ ] cleaner.rb
  • [ ] cleanup.rb
  • [x] cli/args.rb # Can't bump to strict because it uses undef
  • [ ] sbom.rb
  • [ ] search.rb
  • [ ] service.rb
  • [ ] settings.rb
  • [ ] simulate_system.rb
  • [ ] software_spec.rb
  • [ ] sorbet/parlour.rb
  • [ ] standalone/init.rb
  • [ ] standalone/sorbet.rb
  • [ ] startup/config.rb
  • [ ] startup/ruby_path.rb
  • [ ] style.rb
  • [ ] system_command.rb
  • [ ] system_config.rb
  • [ ] tab.rb
  • [ ] tap_auditor.rb
  • [ ] test.rb
  • [ ] test/support/fixtures/failball.rb
  • [ ] test/support/fixtures/failball_offline_install.rb
  • [ ] test/support/fixtures/testball.rb
  • [ ] test/support/fixtures/testball_bottle.rb
  • [ ] test/support/fixtures/testball_bottle_cellar.rb
  • [ ] test/support/helper/cask/install_helper.rb
  • [ ] test/support/helper/cask/never_sudo_system_command.rb
  • [ ] test/support/helper/files.rb
  • [ ] test/support/helper/fixtures.rb
  • [ ] test/support/helper/integration_mocks.rb
  • [ ] test/support/lib/startup/config.rb
  • [ ] test/support/quiet_progress_formatter.rb
  • [ ] uninstall.rb
  • [x] unlink.rb
  • [ ] unversioned_cask_checker.rb
  • [ ] upgrade.rb
  • [ ] warnings.rb
  • [ ] yard/docstring_parser.rb
  • [ ] yard/templates/default/docstring/html/setup.rb
  • [ ] - [ ] github_packages.rb
  • [ ] global.rb
  • [ ] hardware.rb
  • [ ] help.rb
  • [x] ~ignorable.rb~
  • [ ] install.rb
  • [ ] install_renamed.rb
  • [ ] installed_dependents.rb
  • [ ] keg.rb
  • [ ] keg_relocate.rb
  • [ ] lazy_object.rb
  • [ ] linkage_cache_store.rb
  • [ ] linkage_checker.rb
  • [ ] locale.rb
  • [ ] lock_file.rb
  • [ ] macos_version.rb
  • [ ] manpages.rb
  • [ ] manpages/converter/kramdown.rb
  • [ ] manpages/converter/roff.rb
  • [ ] manpages/parser/ronn.rb
  • [x] metafiles.rb
  • [ ] migrator.rb
  • [x] missing_formula.rb
  • [ ] mktemp.rb
  • [ ] options.rb
  • [ ] os/linux.rb
  • [ ] os/linux/elf.rb
  • [ ] os/linux/glibc.rb
  • [ ] os/mac.rb
  • [ ] os/mac/keg.rb
  • [ ] os/mac/mach.rb
  • [ ] os/mac/sdk.rb
  • [ ] os/mac/xcode.rb
  • [ ] patch.rb
  • [ ] pkg_version.rb
  • [x] readall.rb
  • [ ] reinstall.rb
  • [ ] requirement.rb
  • [ ] requirements/arch_requirement.rb
  • [ ] requirements/codesign_requirement.rb
  • [ ] requirements/macos_requirement.rb
  • [ ] requirements/xcode_requirement.rb
  • [ ] resource_auditor.rb

issyl0 avatar Aug 09 '24 15:08 issyl0

For item two on the initial transition ideas list:

enabling Sorbet in brew test-bot for taps

I have no idea how test-bot works in this case, but it sounds good. Anyone else got any ideas for approaches here? I do know that brew typecheck does HOMEBREW_LIBRARY_PATH.cd so that it only runs on Library/Homebrew/ code, not taps.

issyl0 avatar Aug 12 '24 16:08 issyl0

Anyone else got any ideas for approaches here?

brew typecheck should/could take a tap or path argument and then it should be scoped to that directory when run (like brew style).

MikeMcQuaid avatar Aug 12 '24 16:08 MikeMcQuaid

If anyone's looking to help with this (thank you), please note that git grep rubocop:todo Sorbet/StrictSigil should give you a good starting point. The ones with rubocop:disable Sorbet/StrictSigil are probably related to #17998 which is a question we still need to answer, but there's plenty of TODOs to do in the meantime.

issyl0 avatar Aug 13 '24 21:08 issyl0

Which taps need typing? So far I've done homebrew/test-bot, homebrew/services, homebrew/command-not-found. Still on my list are homebrew/bundle and?

issyl0 avatar Aug 20 '24 20:08 issyl0

@issyl0 Great work! I think all of the taps that provide commands might be nice?

Remaining ones:

  • https://github.com/Homebrew/homebrew-core/tree/master/cmd
  • https://github.com/Homebrew/homebrew-cask/tree/master/cmd
  • https://github.com/Homebrew/homebrew-formula-analytics/tree/master/cmd
  • https://github.com/Homebrew/homebrew-portable-ruby/tree/master/cmd
  • https://github.com/Homebrew/homebrew-aliases/tree/master/cmd

MikeMcQuaid avatar Aug 21 '24 07:08 MikeMcQuaid

Progress update: the one remaining untyped tap is Homebrew/homebrew-bundle. We’re all collectively making our way through bumping Homebrew/brew files to typed: strict when we feel the urge.

issyl0 avatar Jan 02 '25 16:01 issyl0