Update detekt
This commit is contained in:
65
detekt.yml
65
detekt.yml
@@ -1,4 +1,4 @@
|
|||||||
# https://github.com/detekt/detekt/blob/v1.14.2/detekt-core/src/main/resources/default-detekt-config.yml
|
# https://github.com/detekt/detekt/blob/v1.17.1/detekt-core/src/main/resources/default-detekt-config.yml
|
||||||
|
|
||||||
comments:
|
comments:
|
||||||
active: false
|
active: false
|
||||||
@@ -36,6 +36,8 @@ complexity:
|
|||||||
ignoreAnnotated: []
|
ignoreAnnotated: []
|
||||||
MethodOverloading:
|
MethodOverloading:
|
||||||
active: false
|
active: false
|
||||||
|
NamedArguments:
|
||||||
|
active: false
|
||||||
NestedBlockDepth:
|
NestedBlockDepth:
|
||||||
active: true
|
active: true
|
||||||
threshold: 4
|
threshold: 4
|
||||||
@@ -66,6 +68,8 @@ coroutines:
|
|||||||
active: false
|
active: false
|
||||||
RedundantSuspendModifier:
|
RedundantSuspendModifier:
|
||||||
active: true
|
active: true
|
||||||
|
SleepInsteadOfDelay:
|
||||||
|
active: true
|
||||||
SuspendFunWithFlowReturnType:
|
SuspendFunWithFlowReturnType:
|
||||||
active: true
|
active: true
|
||||||
|
|
||||||
@@ -113,8 +117,10 @@ exceptions:
|
|||||||
active: false
|
active: false
|
||||||
NotImplementedDeclaration:
|
NotImplementedDeclaration:
|
||||||
active: true
|
active: true
|
||||||
|
ObjectExtendsThrowable:
|
||||||
|
active: true
|
||||||
PrintStackTrace:
|
PrintStackTrace:
|
||||||
active: false
|
active: true
|
||||||
RethrowCaughtException:
|
RethrowCaughtException:
|
||||||
active: false
|
active: false
|
||||||
ReturnFromFinally:
|
ReturnFromFinally:
|
||||||
@@ -179,11 +185,13 @@ formatting:
|
|||||||
ImportOrdering:
|
ImportOrdering:
|
||||||
active: true
|
active: true
|
||||||
autoCorrect: true
|
autoCorrect: true
|
||||||
layout: 'idea'
|
layout: '*,java.**,javax.**,kotlin.**,^'
|
||||||
Indentation:
|
Indentation:
|
||||||
active: false
|
active: false
|
||||||
MaximumLineLength:
|
MaximumLineLength:
|
||||||
active: false
|
active: true
|
||||||
|
maxLineLength: 120
|
||||||
|
ignoreBackTickedIdentifier: false
|
||||||
ModifierOrdering:
|
ModifierOrdering:
|
||||||
active: true
|
active: true
|
||||||
autoCorrect: true
|
autoCorrect: true
|
||||||
@@ -229,6 +237,9 @@ formatting:
|
|||||||
autoCorrect: true
|
autoCorrect: true
|
||||||
ParameterListWrapping:
|
ParameterListWrapping:
|
||||||
active: false
|
active: false
|
||||||
|
SpacingAroundAngleBrackets:
|
||||||
|
active: true
|
||||||
|
autoCorrect: true
|
||||||
SpacingAroundColon:
|
SpacingAroundColon:
|
||||||
active: true
|
active: true
|
||||||
autoCorrect: true
|
autoCorrect: true
|
||||||
@@ -256,6 +267,9 @@ formatting:
|
|||||||
SpacingAroundRangeOperator:
|
SpacingAroundRangeOperator:
|
||||||
active: true
|
active: true
|
||||||
autoCorrect: true
|
autoCorrect: true
|
||||||
|
SpacingAroundUnaryOperator:
|
||||||
|
active: true
|
||||||
|
autoCorrect: true
|
||||||
SpacingBetweenDeclarationsWithAnnotations:
|
SpacingBetweenDeclarationsWithAnnotations:
|
||||||
active: false
|
active: false
|
||||||
SpacingBetweenDeclarationsWithComments:
|
SpacingBetweenDeclarationsWithComments:
|
||||||
@@ -306,12 +320,15 @@ naming:
|
|||||||
ignoreOverridden: true
|
ignoreOverridden: true
|
||||||
InvalidPackageDeclaration:
|
InvalidPackageDeclaration:
|
||||||
active: true
|
active: true
|
||||||
|
excludes: ['buildSrc/**', '**/*.kts']
|
||||||
rootPackage: ''
|
rootPackage: ''
|
||||||
MatchingDeclarationName:
|
MatchingDeclarationName:
|
||||||
active: true
|
active: true
|
||||||
mustBeFirst: true
|
mustBeFirst: true
|
||||||
MemberNameEqualsClassName:
|
MemberNameEqualsClassName:
|
||||||
active: false
|
active: false
|
||||||
|
NoNameShadowing:
|
||||||
|
active: true
|
||||||
NonBooleanPropertyPrefixedWithIs:
|
NonBooleanPropertyPrefixedWithIs:
|
||||||
active: true
|
active: true
|
||||||
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
||||||
@@ -327,7 +344,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
|
||||||
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
excludes: ['buildSrc/**', '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
||||||
constantPattern: '[A-Z][_A-Z0-9]*'
|
constantPattern: '[A-Z][_A-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]*'
|
||||||
@@ -359,14 +376,22 @@ performance:
|
|||||||
|
|
||||||
potential-bugs:
|
potential-bugs:
|
||||||
active: true
|
active: true
|
||||||
|
CastToNullableType:
|
||||||
|
active: false
|
||||||
Deprecation:
|
Deprecation:
|
||||||
active: true
|
active: true
|
||||||
|
DontDowncastCollectionTypes:
|
||||||
|
active: true
|
||||||
|
DoubleMutabilityForCollection:
|
||||||
|
active: true
|
||||||
DuplicateCaseInWhenExpression:
|
DuplicateCaseInWhenExpression:
|
||||||
active: true
|
active: true
|
||||||
EqualsAlwaysReturnsTrueOrFalse:
|
EqualsAlwaysReturnsTrueOrFalse:
|
||||||
active: true
|
active: true
|
||||||
EqualsWithHashCodeExist:
|
EqualsWithHashCodeExist:
|
||||||
active: true
|
active: true
|
||||||
|
ExitOutsideMain:
|
||||||
|
active: true
|
||||||
ExplicitGarbageCollectionCall:
|
ExplicitGarbageCollectionCall:
|
||||||
active: true
|
active: true
|
||||||
HasPlatformType:
|
HasPlatformType:
|
||||||
@@ -398,15 +423,19 @@ potential-bugs:
|
|||||||
UnconditionalJumpStatementInLoop:
|
UnconditionalJumpStatementInLoop:
|
||||||
active: true
|
active: true
|
||||||
UnnecessaryNotNullOperator:
|
UnnecessaryNotNullOperator:
|
||||||
active: false
|
active: true
|
||||||
UnnecessarySafeCall:
|
UnnecessarySafeCall:
|
||||||
active: false
|
active: true
|
||||||
|
UnreachableCatchBlock:
|
||||||
|
active: true
|
||||||
UnreachableCode:
|
UnreachableCode:
|
||||||
active: true
|
active: true
|
||||||
UnsafeCallOnNullableType:
|
UnsafeCallOnNullableType:
|
||||||
active: true
|
active: true
|
||||||
UnsafeCast:
|
UnsafeCast:
|
||||||
active: false
|
active: true
|
||||||
|
UnusedUnaryOperator:
|
||||||
|
active: true
|
||||||
UselessPostfixExpression:
|
UselessPostfixExpression:
|
||||||
active: true
|
active: true
|
||||||
WrongEqualsTypeParameter:
|
WrongEqualsTypeParameter:
|
||||||
@@ -422,6 +451,8 @@ style:
|
|||||||
active: false
|
active: false
|
||||||
DataClassShouldBeImmutable:
|
DataClassShouldBeImmutable:
|
||||||
active: false
|
active: false
|
||||||
|
DestructuringDeclarationWithTooManyEntries:
|
||||||
|
active: false
|
||||||
EqualsNullCall:
|
EqualsNullCall:
|
||||||
active: true
|
active: true
|
||||||
EqualsOnSignatureLine:
|
EqualsOnSignatureLine:
|
||||||
@@ -446,6 +477,7 @@ style:
|
|||||||
methods: ['kotlin.io.println', 'kotlin.io.print']
|
methods: ['kotlin.io.println', 'kotlin.io.print']
|
||||||
ForbiddenPublicDataClass:
|
ForbiddenPublicDataClass:
|
||||||
active: true
|
active: true
|
||||||
|
excludes: ['**']
|
||||||
ignorePackages: ['*.internal', '*.internal.*']
|
ignorePackages: ['*.internal', '*.internal.*']
|
||||||
ForbiddenVoid:
|
ForbiddenVoid:
|
||||||
active: true
|
active: true
|
||||||
@@ -454,12 +486,15 @@ style:
|
|||||||
FunctionOnlyReturningConstant:
|
FunctionOnlyReturningConstant:
|
||||||
active: true
|
active: true
|
||||||
ignoreOverridableFunction: true
|
ignoreOverridableFunction: true
|
||||||
|
ignoreActualFunction: true
|
||||||
excludedFunctions: 'describeContents'
|
excludedFunctions: 'describeContents'
|
||||||
excludeAnnotatedFunction: ['dagger.Provides']
|
excludeAnnotatedFunction: ['dagger.Provides']
|
||||||
LibraryCodeMustSpecifyReturnType:
|
LibraryCodeMustSpecifyReturnType:
|
||||||
active: true
|
active: true
|
||||||
|
excludes: ['**']
|
||||||
LibraryEntitiesShouldNotBePublic:
|
LibraryEntitiesShouldNotBePublic:
|
||||||
active: true
|
active: true
|
||||||
|
excludes: ['**']
|
||||||
LoopWithTooManyJumpStatements:
|
LoopWithTooManyJumpStatements:
|
||||||
active: true
|
active: true
|
||||||
maxJumpCount: 1
|
maxJumpCount: 1
|
||||||
@@ -479,12 +514,16 @@ style:
|
|||||||
active: true
|
active: true
|
||||||
ModifierOrder:
|
ModifierOrder:
|
||||||
active: true
|
active: true
|
||||||
|
MultilineLambdaItParameter:
|
||||||
|
active: false
|
||||||
NestedClassesVisibility:
|
NestedClassesVisibility:
|
||||||
active: true
|
active: true
|
||||||
NewLineAtEndOfFile:
|
NewLineAtEndOfFile:
|
||||||
active: true
|
active: true
|
||||||
NoTabs:
|
NoTabs:
|
||||||
active: true
|
active: true
|
||||||
|
ObjectLiteralToLambda:
|
||||||
|
active: true
|
||||||
OptionalAbstractKeyword:
|
OptionalAbstractKeyword:
|
||||||
active: true
|
active: true
|
||||||
OptionalUnit:
|
OptionalUnit:
|
||||||
@@ -497,6 +536,8 @@ style:
|
|||||||
active: true
|
active: true
|
||||||
RedundantExplicitType:
|
RedundantExplicitType:
|
||||||
active: true
|
active: true
|
||||||
|
RedundantHigherOrderMapUsage:
|
||||||
|
active: true
|
||||||
RedundantVisibilityModifierRule:
|
RedundantVisibilityModifierRule:
|
||||||
active: true
|
active: true
|
||||||
ReturnCount:
|
ReturnCount:
|
||||||
@@ -520,6 +561,8 @@ style:
|
|||||||
active: true
|
active: true
|
||||||
UnnecessaryApply:
|
UnnecessaryApply:
|
||||||
active: true
|
active: true
|
||||||
|
UnnecessaryFilter:
|
||||||
|
active: true
|
||||||
UnnecessaryInheritance:
|
UnnecessaryInheritance:
|
||||||
active: true
|
active: true
|
||||||
UnnecessaryLet:
|
UnnecessaryLet:
|
||||||
@@ -545,8 +588,14 @@ style:
|
|||||||
active: false
|
active: false
|
||||||
UseEmptyCounterpart:
|
UseEmptyCounterpart:
|
||||||
active: true
|
active: true
|
||||||
|
UseIfEmptyOrIfBlank:
|
||||||
|
active: true
|
||||||
UseIfInsteadOfWhen:
|
UseIfInsteadOfWhen:
|
||||||
active: false
|
active: false
|
||||||
|
UseIsNullOrEmpty:
|
||||||
|
active: true
|
||||||
|
UseOrEmpty:
|
||||||
|
active: true
|
||||||
UseRequire:
|
UseRequire:
|
||||||
active: true
|
active: true
|
||||||
UseRequireNotNull:
|
UseRequireNotNull:
|
||||||
|
|||||||
Reference in New Issue
Block a user