From d672a1abc7c5fb2b5baafd455747ee7cf2fc3250 Mon Sep 17 00:00:00 2001 From: Ken Yee Date: Mon, 1 Jun 2020 11:53:31 -0400 Subject: [PATCH] add better documentation for the LongParameterList ignoreAnnotated (#2714) * add better documentation for the LongParameterList ignoreAnnotated * make LongParameterList doc changes in the right place * Checkin documentation Co-authored-by: Ken Yee Co-authored-by: Artur Bosch --- .../arturbosch/detekt/rules/complexity/LongParameterList.kt | 3 ++- docs/pages/documentation/complexity.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/detekt-rules/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/complexity/LongParameterList.kt b/detekt-rules/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/complexity/LongParameterList.kt index 25961c293..ebe875350 100644 --- a/detekt-rules/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/complexity/LongParameterList.kt +++ b/detekt-rules/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/complexity/LongParameterList.kt @@ -32,7 +32,8 @@ import org.jetbrains.kotlin.psi.psiUtil.containingClassOrObject * @configuration ignoreDefaultParameters - ignore parameters that have a default value (default: `false`) * @configuration ignoreDataClasses - ignore long constructor parameters list for data classes (default: `true`) * @configuration ignoreAnnotated - ignore long parameters list for constructors or functions in the context of these - * annotation class names (default: `[]`) + * annotation class names (default: `[]`); (e.g. ['Inject', 'Module', 'Suppress']); + * the most common case is for dependency injection where constructors are annotated with @Inject. * * @active since v1.0.0 */ diff --git a/docs/pages/documentation/complexity.md b/docs/pages/documentation/complexity.md index 6bdc3ae95..0eaabf637 100644 --- a/docs/pages/documentation/complexity.md +++ b/docs/pages/documentation/complexity.md @@ -243,7 +243,8 @@ Reports functions and constructors which have more parameters than a certain thr * ``ignoreAnnotated`` (default: ``[]``) ignore long parameters list for constructors or functions in the context of these -annotation class names +annotation class names ; (e.g. ['Inject', 'Module', 'Suppress']); +the most common case is for dependency injection where constructors are annotated with @Inject. ### MethodOverloading