-
-
Notifications
You must be signed in to change notification settings - Fork 794
Reduce complexity in FindingsReport #2246
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
Conversation
The following tests were added: * case where 2 rule sets contain at least 1 code smell * excludeCorrectable=true -> issues are not included in the report
This allows to separate business logic from the printing view.
* Removes duplicated test: rule set contains no smells * Don't create unnecessary irrelevant findings for a test case
* Rules can classified into different severity grades. Maintainer can choose | ||
* a grade which is most harmful to their projects. | ||
*/ | ||
enum class Severity { |
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.
Moved this enum class into a separate .kt file.
* Debt describes the estimated amount of work needed to fix a given issue. | ||
*/ | ||
@Suppress("MagicNumber") | ||
data class Debt(val days: Int = 0, val hours: Int = 0, val mins: Int = 0) { |
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.
Moved this data class into a separate .kt file.
Codecov Report
@@ Coverage Diff @@
## master #2246 +/- ##
===========================================
- Coverage 81.42% 81.4% -0.03%
- Complexity 2081 2085 +4
===========================================
Files 345 346 +1
Lines 5993 5975 -18
Branches 1086 1082 -4
===========================================
- Hits 4880 4864 -16
- Misses 532 533 +1
+ Partials 581 578 -3
Continue to review full report at Codecov.
|
This PR reduces the complexity in both
FindingsReport
classes and adds some tests to the corresponding Spek classes.There's still some code duplication there, which I'll tackle in a subsequent PR.