Skip to content

[ThrowingExceptionInMain] [ExitOutsideMainfix] fix for KtNamedFunction.isMainFunction() #3641

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

Merged
merged 2 commits into from
Apr 2, 2021

Conversation

krzykrucz
Copy link
Contributor

Fixes the issue that vararg variation of main function was not taken into account in KtNamedFunction#isMainFunction.

As a result fixes also rules using this function: ThrowingExceptionInMain, ExitOutsideMain.

@codecov
Copy link

codecov bot commented Mar 31, 2021

Codecov Report

Merging #3641 (1109cb9) into main (2dd29ef) will decrease coverage by 0.00%.
The diff coverage is 33.33%.

❗ Current head 1109cb9 differs from pull request most recent head 2d2e045. Consider uploading reports for the commit 2d2e045 to get more accurate results
Impacted file tree graph

@@             Coverage Diff              @@
##               main    #3641      +/-   ##
============================================
- Coverage     78.14%   78.13%   -0.01%     
  Complexity     2833     2833              
============================================
  Files           467      467              
  Lines          9133     9135       +2     
  Branches       1733     1735       +2     
============================================
+ Hits           7137     7138       +1     
  Misses         1058     1058              
- Partials        938      939       +1     
Impacted Files Coverage Δ Complexity Δ
.../gitlab/arturbosch/detekt/rules/MethodSignature.kt 57.89% <33.33%> (-0.93%) 0.00 <0.00> (ø)

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 2dd29ef...2d2e045. Read the comment docs.

@BraisGabin
Copy link
Member

Good catch!

@chao2zhang chao2zhang added this to the 1.17.0 milestone Apr 2, 2021
@chao2zhang chao2zhang merged commit 90d5efc into detekt:main Apr 2, 2021
@cortinico cortinico changed the title fix for KtNamedFunction.isMainFunction() [ThrowingExceptionInMain] [ExitOutsideMainfix] fix for KtNamedFunction.isMainFunction() May 1, 2021
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.

3 participants