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

Support KDoc generation for rethrown exceptions #990

Merged
merged 2 commits into from
Jul 20, 2021

Conversation

petertrr
Copy link
Member

What's done:

  • Changed logic
  • Added tests

This pull request closes #975

Fixme:

  • We may also want throwing of local variables with exception type, e.g. val x = IllegalStateException(); throw x

### What's done:
* Changed logic
* Added tests
@codecov
Copy link

codecov bot commented Jul 20, 2021

Codecov Report

Merging #990 (9b8f6eb) into master (9e3fde2) will decrease coverage by 0.04%.
The diff coverage is 73.33%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #990      +/-   ##
============================================
- Coverage     83.85%   83.80%   -0.05%     
- Complexity     2416     2422       +6     
============================================
  Files           102      102              
  Lines          6094     6108      +14     
  Branches       1802     1809       +7     
============================================
+ Hits           5110     5119       +9     
  Misses          269      269              
- Partials        715      720       +5     
Flag Coverage Δ
unittests 83.80% <73.33%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
.../diktat/ruleset/rules/chapter2/kdoc/KdocMethods.kt 87.21% <73.33%> (-2.70%) ⬇️

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 9e3fde2...9b8f6eb. Read the comment docs.

### What's done:
* Changed logic
* Added tests
println("Whoops...")
throw e
} catch (e: Error) {
val x = IllegalStateException()
Copy link
Member

Choose a reason for hiding this comment

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

May be create issue on subject to improve missingExceptions detection to cover this case? When exception throws via local variable?

Or at least add TODO in code?

Copy link
Member Author

Choose a reason for hiding this comment

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

@petertrr petertrr merged commit 36c8479 into master Jul 20, 2021
@petertrr petertrr deleted the bugfix/kdoc-throws#975 branch July 20, 2021 15:24
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.

Kdoc generation for "throws exception"
2 participants