Skip to content

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

Merged
picklebento merged 2 commits into
detekt:mainfrom
krzykrucz:main
Apr 2, 2021
Merged

[ThrowingExceptionInMain] [ExitOutsideMainfix] fix for KtNamedFunction.isMainFunction()#3641
picklebento merged 2 commits into
detekt:mainfrom
krzykrucz:main

Conversation

@krzykrucz

Copy link
Copy Markdown
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

codecov Bot commented Mar 31, 2021

Copy link
Copy Markdown

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
Copy Markdown
Member

Good catch!

@picklebento picklebento added this to the 1.17.0 milestone Apr 2, 2021
@picklebento picklebento 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