mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
Enable more detekt rules and remove unused extension.
This commit is contained in:
committed by
Benoit Marty
parent
1354ec76c9
commit
f7536a5450
-4
@@ -72,7 +72,3 @@ fun String.ellipsize(length: Int): String {
|
|||||||
|
|
||||||
return "${this.take(length)}…"
|
return "${this.take(length)}…"
|
||||||
}
|
}
|
||||||
|
|
||||||
inline fun <reified R> Any?.takeAs(): R? {
|
|
||||||
return takeIf { it is R } as R?
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -8,6 +8,14 @@ style:
|
|||||||
includeElvis: true
|
includeElvis: true
|
||||||
DataClassShouldBeImmutable:
|
DataClassShouldBeImmutable:
|
||||||
active: true
|
active: true
|
||||||
|
EqualsNullCall:
|
||||||
|
active: true
|
||||||
|
EqualsOnSignatureLine:
|
||||||
|
active: true
|
||||||
|
ExplicitCollectionElementAccessMethod:
|
||||||
|
active: true
|
||||||
|
ExplicitItLambdaParameter:
|
||||||
|
active: true
|
||||||
MaxLineLength:
|
MaxLineLength:
|
||||||
# Default is 120
|
# Default is 120
|
||||||
maxLineLength: 160
|
maxLineLength: 160
|
||||||
@@ -65,6 +73,34 @@ empty-blocks:
|
|||||||
potential-bugs:
|
potential-bugs:
|
||||||
ImplicitDefaultLocale:
|
ImplicitDefaultLocale:
|
||||||
active: true
|
active: true
|
||||||
|
CastNullableToNonNullableType:
|
||||||
|
active: true
|
||||||
|
CastToNullableType:
|
||||||
|
active: true
|
||||||
|
Deprecation:
|
||||||
|
active: true
|
||||||
|
DontDowncastCollectionTypes:
|
||||||
|
active: true
|
||||||
|
ElseCaseInsteadOfExhaustiveWhen:
|
||||||
|
active: true
|
||||||
|
ExitOutsideMain:
|
||||||
|
active: true
|
||||||
|
ImplicitUnitReturnType:
|
||||||
|
active: true
|
||||||
|
allowExplicitReturnType: false
|
||||||
|
MissingPackageDeclaration:
|
||||||
|
active: true
|
||||||
|
excludes: ['**/*.kts']
|
||||||
|
NullCheckOnMutableProperty:
|
||||||
|
active: true
|
||||||
|
NullableToStringCall:
|
||||||
|
active: true
|
||||||
|
PropertyUsedBeforeDeclaration:
|
||||||
|
active: true
|
||||||
|
UnconditionalJumpStatementInLoop:
|
||||||
|
active: true
|
||||||
|
UnnecessaryNotNullCheck:
|
||||||
|
active: true
|
||||||
|
|
||||||
exceptions:
|
exceptions:
|
||||||
TooGenericExceptionCaught:
|
TooGenericExceptionCaught:
|
||||||
@@ -77,6 +113,8 @@ exceptions:
|
|||||||
active: true
|
active: true
|
||||||
InstanceOfCheckForException:
|
InstanceOfCheckForException:
|
||||||
active: true
|
active: true
|
||||||
|
ObjectExtendsThrowable:
|
||||||
|
active: true
|
||||||
|
|
||||||
complexity:
|
complexity:
|
||||||
TooManyFunctions:
|
TooManyFunctions:
|
||||||
@@ -102,10 +140,20 @@ naming:
|
|||||||
FunctionNaming:
|
FunctionNaming:
|
||||||
active: true
|
active: true
|
||||||
ignoreAnnotated: ['Composable']
|
ignoreAnnotated: ['Composable']
|
||||||
|
LambdaParameterNaming:
|
||||||
|
active: true
|
||||||
|
NonBooleanPropertyPrefixedWithIs:
|
||||||
|
active: true
|
||||||
|
VariableMaxLength:
|
||||||
|
active: true
|
||||||
|
|
||||||
performance:
|
performance:
|
||||||
SpreadOperator:
|
SpreadOperator:
|
||||||
active: false
|
active: false
|
||||||
|
CouldBeSequence:
|
||||||
|
active: true
|
||||||
|
UnnecessaryPartOfBinaryExpression:
|
||||||
|
active: true
|
||||||
|
|
||||||
# Note: all rules for `comments` are disabled by default, but I put them here to be aware of their existence
|
# Note: all rules for `comments` are disabled by default, but I put them here to be aware of their existence
|
||||||
comments:
|
comments:
|
||||||
|
|||||||
Reference in New Issue
Block a user