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

Fix #2230 equals() func detection #2233

Merged
merged 7 commits into from
Jan 11, 2020
Merged

Fix #2230 equals() func detection #2233

merged 7 commits into from
Jan 11, 2020

Conversation

schalkms
Copy link
Member

@schalkms schalkms commented Jan 9, 2020

The equals() func check should assert that there is exact 1 parameter.

The equals() func check should assert that there is exact 1 parameter.
Copy link
Member Author

@schalkms schalkms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test is missing

@codecov-io
Copy link

codecov-io commented Jan 9, 2020

Codecov Report

Merging #2233 into master will increase coverage by 0.04%.
The diff coverage is 80%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2233      +/-   ##
============================================
+ Coverage     81.35%   81.39%   +0.04%     
- Complexity     2067     2076       +9     
============================================
  Files           341      343       +2     
  Lines          5968     5982      +14     
  Branches       1086     1086              
============================================
+ Hits           4855     4869      +14     
  Misses          532      532              
  Partials        581      581
Impacted Files Coverage Δ Complexity Δ
...osch/detekt/rules/bugs/WrongEqualsTypeParameter.kt 100% <100%> (ø) 10 <7> (+3) ⬆️
.../gitlab/arturbosch/detekt/rules/MethodSignature.kt 70% <66.66%> (+10%) 0 <0> (ø) ⬇️
...bosch/detekt/rules/providers/CoroutinesProvider.kt 100% <0%> (ø) 3% <0%> (?)
...ch/detekt/rules/coroutines/GlobalCoroutineUsage.kt 88.88% <0%> (ø) 3% <0%> (?)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 43a0982...d6757d7. Read the comment docs.

A wrong overridden equals() function signature should be reported.
That if, the equals() function has a different parameter size.
This could potentially have a minor performance impact.
This checks for a different overridden hashCode() function signature.
@schalkms schalkms marked this pull request as ready for review January 10, 2020 20:17
This could potentially have a minor performance impact.
@schalkms
Copy link
Member Author

This is good to go!

@3flex 3flex merged commit 2486bfa into detekt:master Jan 11, 2020
@schalkms schalkms deleted the fix-#2230-equals()-detection branch January 11, 2020 11:54
@arturbosch arturbosch added this to the 1.4.0 milestone Jan 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants