-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
linkage_checker: typed: strict
#21258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 linkage_checker.rb file to Sorbet's typed: strict mode as part of a broader effort tracked in issue #17297. The changes add comprehensive type annotations and make necessary code adjustments to satisfy strict type checking requirements while maintaining the existing functionality.
Key changes:
- Upgraded from
typed: truetotyped: strictwith complete type signatures for all methods and attributes - Added explicit type annotations using
T.letfor all instance variables with appropriate generic types - Refactored
display_itemsmethod to use array operations instead of string concatenation, improving readability and removing dead code
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
MikeMcQuaid
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far! Most of the T.must though don't seem to be guaranteed to be the case?
Co-authored-by: Mike McQuaid <[email protected]>
This allows using standard Ruby for flow control typing rather than having to use T.must to express that nil formula was checked by caller.
Added commits to remove some of the The ones currently left are:
|
brew lgtm(style, typechecking and tests) with your changes locally?Part of
typed: strictin all (non-package) files in Homebrew organisation #17297