-
-
Notifications
You must be signed in to change notification settings - Fork 766
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
Add default values to SwallowedException rule #2661
Add default values to SwallowedException rule #2661
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First of all, thank you to take the time to fix this issue! I added some comment below
detekt-rules/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/exceptions/SwallowedException.kt
Show resolved
Hide resolved
...rules/src/test/kotlin/io/gitlab/arturbosch/detekt/rules/exceptions/SwallowedExceptionSpec.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Great first contribution :)
The error that you are getting in CI is kind of odd. I think that what happen is that you need to add the imports for java.net.MalformedURLException
and java.text.ParseException
because they are not imported by default. You can test it in your computer with:
./gradlew :detekt-rules:test -Pcompile-test-snippets=true
By default the code in the snippets is not compiled, it's only compiled in the ubuntu/java8.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the nice 1st contribution! No worries. Everyone starts out as a 1st time contributor someday. I have a few comments regarding your PR.
If you have questions, please ping me directly.
It's nice to hear that you want to help out further with subsequent PRs. That's cool! 🙂
detekt-rules/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/exceptions/SwallowedException.kt
Show resolved
Hide resolved
...rules/src/test/kotlin/io/gitlab/arturbosch/detekt/rules/exceptions/SwallowedExceptionSpec.kt
Outdated
Show resolved
Hide resolved
c8890fa
to
582b178
Compare
@juliabirkett @schalkms I've added a commit to get this into the next release soon :) |
Codecov Report
@@ Coverage Diff @@
## master #2661 +/- ##
============================================
+ Coverage 80.44% 80.45% +0.01%
Complexity 2303 2303
============================================
Files 378 378
Lines 6949 6954 +5
Branches 1262 1262
============================================
+ Hits 5590 5595 +5
Misses 729 729
Partials 630 630
Continue to review full report at Codecov.
|
582b178
to
dddfa17
Compare
There are some rules that have default values in the documentation but those values are not implemented in the code.
This is a bug mapped here #2597
This PR adds default values to
SwallowedException
rule as mapped in the documentation.