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

FunctionNaming - Allow factory function names - fix #1639 #3973

Merged
merged 1 commit into from
Jul 25, 2021
Merged

Conversation

BraisGabin
Copy link
Member

The PR #1668 tried to fix this issue but it seems that it forgot to add the .isEmpty() so it wasn't actually fixed.

I would like the review of @schalkms because it was the one tring to fixing this so I can be missing something.

@BraisGabin BraisGabin requested a review from schalkms July 25, 2021 10:34
@codecov
Copy link

codecov bot commented Jul 25, 2021

Codecov Report

Merging #3973 (bb71672) into main (ce7bb32) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #3973      +/-   ##
============================================
+ Coverage     83.48%   83.49%   +0.01%     
- Complexity     3159     3160       +1     
============================================
  Files           458      458              
  Lines          9047     9047              
  Branches       1759     1759              
============================================
+ Hits           7553     7554       +1     
  Misses          567      567              
+ Partials        927      926       -1     
Impacted Files Coverage Δ
...b/arturbosch/detekt/rules/naming/FunctionNaming.kt 100.00% <100.00%> (+3.84%) ⬆️

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 ce7bb32...bb71672. Read the comment docs.

Copy link
Member

@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.

Thanks for the fix!

@schalkms schalkms merged commit 768a50e into main Jul 25, 2021
@schalkms schalkms deleted the update-1668 branch July 25, 2021 11:04
@schalkms
Copy link
Member

Such things are tricky to catch but easy to create. Ideally, this code does not compile. It makes no sense.
Do you happen to know whether other similar instances exist in detekt's code base?

assertThat(FunctionNaming(config).compileAndLint(code)) // missing .is... check

@BraisGabin
Copy link
Member Author

I think that if we merge #3974 and fix #3975 (I just created both) detekt will spot this mistakes. It is not a compilation error but I think that with an issue in detekt is enough.

@schalkms
Copy link
Member

Good idea!

@schalkms schalkms added this to the 1.19.0 milestone Jul 25, 2021
@BraisGabin BraisGabin modified the milestones: 1.19.0, 1.18.0 Jul 25, 2021
@cortinico cortinico changed the title Allow factory function names - fix #1639 FunctionNaming - Allow factory function names - fix #1639 Aug 5, 2021
@cortinico cortinico added the rules label Aug 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants