Expected Behavior
LongMethod should consider the method definition without the input parameters.
Example:
If LongMethod threshold is set to 7, then the below method shouldn't be tagged as the method implementation is actually 3 loc and detekt already has LongParameterList to check the param list
fun fetch(
user: User,
org: Org,
@QueryValue startDate: String,
@QueryValue endDate: String
) {
val data = service1.get(startDate, endDate, context.user, context.org)
val moreData = service2.get(startDate)
ok(mapOf("data" to data+moreData))
}
Observed Behavior
The above snippet of code gets tagged with LongMethod code smell
Steps to Reproduce
#2806
Context
More LongMethod code smell then expected
Your Environment
- Version of detekt used:1.9.1
- Version of Gradle used (if applicable):6.1.1
- Operating System and version:macOS 10.15.5
- Link to your project (if it's a public repository):
Expected Behavior
LongMethod should consider the method definition without the input parameters.
Example:
If
LongMethodthreshold is set to 7, then the below method shouldn't be tagged as the method implementation is actually 3 loc and detekt already hasLongParameterListto check the param listObserved Behavior
The above snippet of code gets tagged with
LongMethodcode smellSteps to Reproduce
#2806
Context
More LongMethod code smell then expected
Your Environment