Skip to content

Conversation

@cho-m
Copy link
Member

@cho-m cho-m commented Dec 22, 2025

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) with your changes locally?

Part of #17297

Copilot AI review requested due to automatic review settings December 22, 2025 17:51
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR upgrades the Sorbet type checking level from typed: true to typed: strict for the cask/metadata.rb file, as part of the broader effort tracked in issue #17297. The upgrade requires adding explicit type signatures to all methods and making minor refactorings to satisfy strict type checking requirements.

Key changes:

  • Added Sorbet type signatures to all public and private methods in the Metadata module
  • Refactored metadata_timestamped_path to use a case statement for clearer control flow
  • Added defensive programming to reject invalid timestamp symbols

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
Library/Homebrew/cask/metadata.rb Upgraded from typed: true to typed: strict; added type signatures to all methods; refactored metadata_timestamped_path to use case statement with defensive symbol validation
Library/Homebrew/cask/cask.rb Modified timestamped_versions to explicitly convert Pathname to string before passing to Pathname.glob, likely to satisfy strict type checking requirements

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue Dec 22, 2025
Merged via the queue into main with commit df0bddf Dec 22, 2025
37 checks passed
@MikeMcQuaid MikeMcQuaid deleted the cask-metadata-type branch December 22, 2025 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants