-
Notifications
You must be signed in to change notification settings - Fork 24
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
Fix allowed names for Unit-returning functions #139
Fix allowed names for Unit-returning functions #139
Conversation
Thanks for the contribution! Before we can merge this, we need @dellisd to sign the Salesforce Inc. Contributor License Agreement. |
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.
Thanks!
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.
Actually, I think we don't want to do this. This more or less just disables the lint, which at that point you may as well use @Suppress("ComposableNaming")
This only disables the lint if you've added the function name to the allowed names, doesn't it? That seems fine to me if you have a specific function name that you want to disable this rule on in many (many) places, but not actually disable it in general. |
Hmmm I'm not sure. @chrisbanes @mrmans0n thoughts? |
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 to me! The allowed names functionality should opt-out as fast as possible imo.
The allowed names for the naming detector were only being checked for compsable functions that returned a value. For functions that return nothing or Unit, the allowed names would have no effect.