This commit is contained in:
Mygod
2020-02-08 04:12:45 +08:00
parent 1507050eea
commit cae191b991
6 changed files with 38 additions and 26 deletions

View File

@@ -1,4 +1,4 @@
# https://github.com/arturbosch/detekt/blob/1.3.1/detekt-cli/src/main/resources/default-detekt-config.yml
# https://github.com/arturbosch/detekt/blob/1.5.0/detekt-cli/src/main/resources/default-detekt-config.yml
comments:
active: false
@@ -56,6 +56,13 @@ complexity:
ignorePrivate: false
ignoreOverridden: true
coroutines:
active: true
GlobalCoroutineUsage:
active: false
RedundantSuspendModifier:
active: true
empty-blocks:
active: true
EmptyCatchBlock:
@@ -75,7 +82,7 @@ empty-blocks:
active: true
EmptyFunctionBlock:
active: true
ignoreOverriddenFunctions: true
ignoreOverridden: true
EmptyIfBlock:
active: true
EmptyInitBlock:
@@ -122,22 +129,22 @@ exceptions:
active: true
excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
exceptionNames:
- ArrayIndexOutOfBoundsException
- Error
- Exception
- IllegalMonitorStateException
- NullPointerException
- IndexOutOfBoundsException
- RuntimeException
- Throwable
- ArrayIndexOutOfBoundsException
- Error
- Exception
- IllegalMonitorStateException
- NullPointerException
- IndexOutOfBoundsException
- RuntimeException
- Throwable
allowedExceptionNameRegex: "^(_|(ignore|expected).*)"
TooGenericExceptionThrown:
active: true
exceptionNames:
- Error
- Exception
- Throwable
- RuntimeException
- Error
- Exception
- Throwable
- RuntimeException
formatting:
active: true
@@ -151,6 +158,9 @@ formatting:
autoCorrect: true
CommentSpacing:
active: false
EnumEntryNameCase:
active: true
autoCorrect: false
Filename:
active: true
FinalNewline:
@@ -180,6 +190,9 @@ formatting:
NoEmptyClassBody:
active: true
autoCorrect: true
NoEmptyFirstLineInMethodBlock:
active: true
autoCorrect: true
NoLineBreakAfterElse:
active: true
autoCorrect: true
@@ -261,9 +274,7 @@ naming:
excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
maximumFunctionNameLength: 30
FunctionMinLength:
active: true
excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
minimumFunctionNameLength: 3
active: false
FunctionNaming:
active: true
excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
@@ -275,7 +286,7 @@ naming:
excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
parameterPattern: '[a-z][A-Za-z0-9]*'
excludeClassPattern: '$^'
ignoreOverriddenFunctions: true
ignoreOverridden: true
InvalidPackageDeclaration:
active: true
rootPackage: ''
@@ -381,6 +392,8 @@ style:
active: true
EqualsOnSignatureLine:
active: true
ExplicitCollectionElementAccessMethod:
active: true
ExplicitItLambdaParameter:
active: true
ExpressionBodySyntax: