detekt: tweak default config for better Compose support

This commit is contained in:
Harsh Shandilya 2022-07-17 13:26:14 +05:30
parent b8799d7de8
commit 5d2a8e9aba
No known key found for this signature in database
GPG key ID: 366D7BBAD1031E80

View file

@ -325,6 +325,7 @@ naming:
functionPattern: '[a-z][a-zA-Z0-9]*' functionPattern: '[a-z][a-zA-Z0-9]*'
excludeClassPattern: '$^' excludeClassPattern: '$^'
ignoreOverridden: true ignoreOverridden: true
ignoreAnnotated: ['Composable']
FunctionParameterNaming: FunctionParameterNaming:
active: true active: true
parameterPattern: '[a-z][A-Za-z0-9]*' parameterPattern: '[a-z][A-Za-z0-9]*'
@ -357,7 +358,7 @@ naming:
packagePattern: '[a-z]+(\.[a-z][A-Za-z0-9]*)*' packagePattern: '[a-z]+(\.[a-z][A-Za-z0-9]*)*'
TopLevelPropertyNaming: TopLevelPropertyNaming:
active: true active: true
constantPattern: '[A-Z][_A-Z0-9]*' constantPattern: '[A-Z][A-Za-z0-9]*'
propertyPattern: '[A-Za-z][_A-Za-z0-9]*' propertyPattern: '[A-Za-z][_A-Za-z0-9]*'
privatePropertyPattern: '_?[A-Za-z][_A-Za-z0-9]*' privatePropertyPattern: '_?[A-Za-z][_A-Za-z0-9]*'
VariableMaxLength: VariableMaxLength:
@ -569,7 +570,7 @@ style:
- '1' - '1'
- '2' - '2'
ignoreHashCodeFunction: true ignoreHashCodeFunction: true
ignorePropertyDeclaration: false ignorePropertyDeclaration: true
ignoreLocalVariableDeclaration: false ignoreLocalVariableDeclaration: false
ignoreConstantDeclaration: true ignoreConstantDeclaration: true
ignoreCompanionObjectPropertyDeclaration: true ignoreCompanionObjectPropertyDeclaration: true
@ -673,6 +674,7 @@ style:
UnusedPrivateMember: UnusedPrivateMember:
active: true active: true
allowedNames: '(_|ignored|expected|serialVersionUID)' allowedNames: '(_|ignored|expected|serialVersionUID)'
ignoreAnnotated: ['Preview']
UseAnyOrNoneInsteadOfFind: UseAnyOrNoneInsteadOfFind:
active: true active: true
UseArrayLiteralsInAnnotations: UseArrayLiteralsInAnnotations: