-
-
Notifications
You must be signed in to change notification settings - Fork 783
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
Inline Cases enum and inline other external test code into the test classes #6107
Conversation
…med to thresholdInClasses. Also simplify test code.
LargeClassSpec.kt:15:9: The function `should detect only the nested large class which exceeds threshold 70` is too long (107). The maximum length is 60. [LongMethod] NestedBlockDepthSpec.kt:18:9: The function `should detect only the nested large class` is too long (108). The maximum length is 60. [LongMethod] EmptyCodeSpec.kt:156:13: The function `test` is too long (61). The maximum length is 60. [LongMethod] UtilityClassWithPublicConstructorSpec.kt:99:13: The function does not report given classes is too long (110). The maximum length is 60. [LongMethod]
…s.commentsClass (package.kt)
Codecov Report
@@ Coverage Diff @@
## main #6107 +/- ##
=========================================
Coverage 84.86% 84.86%
Complexity 4011 4011
=========================================
Files 568 568
Lines 13422 13422
Branches 2368 2368
=========================================
Hits 11390 11390
Misses 871 871
Partials 1161 1161 |
Thanks for linking me, but I've stopped using Detekt, so please feel free to continue this in any direction you'd want. |
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 doing this tedious work! I like!
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 cleanup @TWiStErRob
More changes related to #1089 cc @vanniktech @schalkms
I wanted to work on
LoopWithTooManyJumpStatements
and then noticed the Cases enum and the comment on it. I wanted some relaxing activity to rest anyway, so I moved all the files intocode
blocks like in newer tests. Then I went ahead by looking at otherresourceAsPath
, and there were some without an enum declaration too, so moved them as well.I deliberately did not make significant changes like splitting up the code blocks into N tests, because that would be much harder to review. Babysteps.
Tried to make no modifications other than copy-paste, few exceptions:
package cases
declarationsTip: for review I recommend using IDEA, commit by commit + use the "right click in any code editor > Compare with clipboard" feature to compare deleted files (copy to clipboard) with added code blocks.