Inline Cases enum and inline other external test code into the test classes#6107
Merged
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 |
Contributor
|
Thanks for linking me, but I've stopped using Detekt, so please feel free to continue this in any direction you'd want. |
schalkms
approved these changes
May 18, 2023
Member
schalkms
left a comment
There was a problem hiding this comment.
Thanks for doing this tedious work! I like!
cortinico
approved these changes
May 20, 2023
Member
cortinico
left a comment
There was a problem hiding this comment.
Thanks for the cleanup @TWiStErRob
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
More changes related to #1089 cc @vanniktech @schalkms
I wanted to work on
LoopWithTooManyJumpStatementsand then noticed the Cases enum and the comment on it. I wanted some relaxing activity to rest anyway, so I moved all the files intocodeblocks 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 casesdeclarationsTip: 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.