-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Support Optional<()> returns that use syntactic sugar, ()? #1760
Support Optional<()> returns that use syntactic sugar, ()? #1760
Conversation
Generated by 🚫 Danger |
@ryanbooker Can you share more information about the motivation for this change? IMO |
Moreover, why would you ever want to return |
@jpsim e.g. However, whether you should or shouldn't return NB: Only the sugared versions have the bug, as they run afoul of the original regex. |
Perhaps there is another way I'm supposed to specify the test, but only the And of course there may be better regex to fix it. :) |
@marcelofabri In case I wasn't clear. It's simply a bug in the The bug is that :) |
Actually, this is the whole purpose of this rule. To make sure What I think would be the better approach is to change Does that make sense, @ryanbooker? Or am I missing something else here? |
No we’re on the same page now. That’s precisely what I intended to do. I did it in the wrong rule. Now I understand why you’re talking about irrelevant things. Haha. :)
… On 10 Aug 2017, at 18:50, Marcelo Fabri ***@***.***> wrote:
It's irrelevant whether () or Void is preferred. That's a settings in the linter.
Actually, this is the whole purpose of this rule. To make sure Void is preferred.
What I think would be the better approach is to change redundant_void_return to allow returning Void!, Void?, ()? and ()!. Although I agree that's not common to return those types, it's not that rule's job to enforce that (it's only concerned about the cases that the whole return type can be omitted).
Does that make sense, @ryanbooker? Or am I missing something else here?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Let's try this again. :) |
Thanks! 💯 |
👍 |
#1761