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
WrongEqualsTypeParameter
As stated with the documentation provided, WrongEqualsTypeParameter should only check for equals methods with one parameter.
If function is not top level and name is equals and has one parameter that is not Any? or Kotlin.Any? rule should fail.
For mocking purposes I delegate some of standard library methods to helper classes. such as
interface StringHelper { @Contract("null -> true") fun isEmpty(input: String?): Boolean @JvmDefault @Contract("null, null -> true") fun equals(left: String?, right: String?, ignoreCase: Boolean = false): Boolean } class StringHelperImpl : StringHelper { override fun isEmpty(input: String?) = input.isNullOrEmpty() override fun equals(left: String?, right: String?, ignoreCase: Boolean): Boolean = left.equals(right, ignoreCase) }
In this particular case rule fails. I believe rule should ignore equals methods with more than one parameter.
The text was updated successfully, but these errors were encountered:
2486bfa
No branches or pull requests
WrongEqualsTypeParameter
Expected Behavior of the rule
As stated with the documentation provided, WrongEqualsTypeParameter should only check for equals methods with one parameter.
If function is not top level and name is equals and has one parameter that is not Any? or Kotlin.Any? rule should fail.
Context
For mocking purposes I delegate some of standard library methods to helper classes. such as
In this particular case rule fails. I believe rule should ignore equals methods with more than one parameter.
The text was updated successfully, but these errors were encountered: