Skip to content

Commit

Permalink
Updated detekt configuration:
Browse files Browse the repository at this point in the history
*   Increased the `functionThreshold` for `LongParameterList` from 6 to 8.
*   Enabled `ignoreDefaultParameters` for `LongParameterList`.
*   Updated `functionPattern` to allow uppercase letters at the beginning.
* Add  `ignoreAnnotatedFunctions` to `['Preview']`
* Add `ignoreAnnotated` to `['Composable']`
* Updated `constantPattern` to accept uppercase letters followed by alphanumeric characters.
* Enabled `ignorePropertyDeclaration` for `MagicNumber`.
  • Loading branch information
jackq97 committed Jan 18, 2025
1 parent 283d845 commit 181ce41
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions config/detekt/detekt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ complexity:
threshold: 60
LongParameterList:
active: true
functionThreshold: 6
functionThreshold: 8
constructorThreshold: 6
ignoreDefaultParameters: false
ignoreDefaultParameters: true
MethodOverloading:
active: false
threshold: 6
Expand All @@ -106,6 +106,7 @@ complexity:
ignoreDeprecated: false
ignorePrivate: false
ignoreOverridden: false
ignoreAnnotatedFunctions: ['Preview']

coroutines:
active: true
Expand Down Expand Up @@ -230,9 +231,10 @@ naming:
FunctionNaming:
active: true
excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
functionPattern: '^([a-z$][a-zA-Z$0-9]*)|(`.*`)$'
functionPattern: '^([a-zA-Z$][a-zA-Z$0-9]*)|(`.*`)$'
excludeClassPattern: '$^'
ignoreOverridden: true
ignoreAnnotated: ['Composable']
FunctionParameterNaming:
active: true
excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
Expand Down Expand Up @@ -260,7 +262,7 @@ naming:
TopLevelPropertyNaming:
active: true
excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
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:
Expand Down Expand Up @@ -391,7 +393,7 @@ style:
excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
ignoreNumbers: '-1,0,1,2'
ignoreHashCodeFunction: true
ignorePropertyDeclaration: false
ignorePropertyDeclaration: true
ignoreLocalVariableDeclaration: false
ignoreConstantDeclaration: true
ignoreCompanionObjectPropertyDeclaration: true
Expand Down

0 comments on commit 181ce41

Please sign in to comment.