From 58dc58abd14640c24b64453e8ab2dd7e6bf1c711 Mon Sep 17 00:00:00 2001 From: rougsig Date: Mon, 4 Sep 2023 21:20:54 +0400 Subject: [PATCH] Update detekt config for compose Updated according to https://detekt.dev/docs/introduction/compose/ --- config/detekt/config.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/config/detekt/config.yml b/config/detekt/config.yml index c1e3a1e530..3eb3a48832 100644 --- a/config/detekt/config.yml +++ b/config/detekt/config.yml @@ -133,9 +133,8 @@ complexity: active: true functionThreshold: 6 constructorThreshold: 7 - ignoreDefaultParameters: false + ignoreDefaultParameters: true ignoreDataClasses: true - ignoreAnnotatedParameter: [] MethodOverloading: active: false threshold: 6 @@ -333,6 +332,7 @@ naming: excludes: ['**/test/**', '**/androidTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**'] functionPattern: '[a-z][a-zA-Z0-9]*' excludeClassPattern: '$^' + ignoreAnnotated: ['Composable'] FunctionParameterNaming: active: true parameterPattern: '[a-z][A-Za-z0-9]*' @@ -364,7 +364,7 @@ naming: packagePattern: '[a-z]+(\.[a-z][A-Za-z0-9]*)*' TopLevelPropertyNaming: active: true - constantPattern: '[A-Z][_A-Z0-9]*' + constantPattern: '[A-Z][A-Za-z0-9]*' propertyPattern: '[A-Za-z][_A-Za-z0-9]*' privatePropertyPattern: '_?[A-Za-z][_A-Za-z0-9]*' VariableMaxLength: @@ -621,7 +621,7 @@ style: - '1' - '2' ignoreHashCodeFunction: true - ignorePropertyDeclaration: false + ignorePropertyDeclaration: true ignoreLocalVariableDeclaration: false ignoreConstantDeclaration: true ignoreCompanionObjectPropertyDeclaration: true @@ -744,6 +744,7 @@ style: UnusedPrivateMember: active: true allowedNames: '' + ignoreAnnotated: ['Preview'] UnusedPrivateProperty: active: true allowedNames: '_|ignored|expected|serialVersionUID'