Skip to content
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

Add DidYouMean #980

Merged
merged 1 commit into from
May 8, 2022
Merged

Add DidYouMean #980

merged 1 commit into from
May 8, 2022

Conversation

ksss
Copy link
Collaborator

@ksss ksss commented Apr 13, 2022

I wrote the type for DidYouMean.

DidYouMean is mostly for internal use.
However, DidYouMean::Correctable is also used in Rails, so I think type definition is necessary.

# - new(dictionary:, separator: '/', augment: nil)
# -->
#
def initialize: (dictionary: Array[String], ?separator: String, ?augment: bool?) -> void
Copy link
Member

Choose a reason for hiding this comment

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

[Goodcheck] Prefer boolish over bool for method arguments and block return values (view)

See the doc below:
https://github.com/ruby/rbs/blob/78d04a2db0f1c4925d2b13c2939868edf9465d6c/docs/syntax.md#bool-or-boolish

Rule
rbs.prefer_boolish

You can close this issue if no need to fix it. Learn more.

I closed this issue. Reason:

  • When you strictly want true | false. Use bool in this case.

Copy link
Member

@soutaro soutaro left a comment

Choose a reason for hiding this comment

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

Thanks!

@soutaro soutaro merged commit df336b0 into ruby:master May 8, 2022
@ksss ksss deleted the did_you_mean branch May 9, 2022 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants