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

Forbid usage of Void #1058

Closed
egor-n opened this issue Aug 20, 2018 · 6 comments
Closed

Forbid usage of Void #1058

egor-n opened this issue Aug 20, 2018 · 6 comments

Comments

@egor-n
Copy link
Contributor

egor-n commented Aug 20, 2018

Detekt should warn about using Void since Kotlin has Unit instead.

Although, maybe java.lang.Void::class should be allowed.

@schalkms
Copy link
Member

Good point. This might be called OptionalVoid to be in line with the existing rule.

@egor-n
Copy link
Contributor Author

egor-n commented Aug 20, 2018

I'll take a stab at it.

@schalkms
Copy link
Member

@egor-n cool! You might want to take a look at #1034

@egor-n
Copy link
Contributor Author

egor-n commented Aug 20, 2018

@schalkms I have opened #1059. I don't think this rule falls into the Optional* set. Usage of Void doesn't seem optional to me.

@schalkms
Copy link
Member

I agree @egor-n

@arturbosch arturbosch added this to the RC9 milestone Sep 10, 2018
@lock
Copy link

lock bot commented Jun 20, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related topics.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants