We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have a sealed class with no members of its own, except for a factory function:
sealed class
sealed class Parent { companion object { fun create(foo: Int?, bar: String?): Parent? = when { foo != null -> FooChild(foo) bar != null -> BarChild(bar) else -> null } } } data class FooChild(val foo: Int) : Parent() data class BarChild(val bar: String) : Parent()
This reports:
UtilityClassWithPublicConstructor - [Parent]
UtilityClassWithPublicConstructor should not be reported for Parent, or any other sealed class, since sealed classes don't have public constructors.
Parent
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Observed Behavior
I have a
sealed class
with no members of its own, except for a factory function:This reports:
Expected Behavior
UtilityClassWithPublicConstructor should not be reported for
Parent
, or any othersealed class
, sincesealed class
es don't have public constructors.Your Environment
The text was updated successfully, but these errors were encountered: