* fix(deps): update dependency androidx.compose:compose-bom to v2025.04.01 * Fix autofill deprecations * Adapt our custom BottomSheetState and scaffold to the new APIs * Get rid of all the custom bottom sheet implementation It doesn't seem to be needed anymore 🎉 * Replace `semantics { invisibleToUser() }` with `hideFromAccessibility()` * Update screenshots * Add commit and cancel callbacks for autofill on the login view * Fix broken tests caused mainly by https://issuetracker.google.com/issues/366255137 Add `LocalUiTestMode` composition local and helper functions. * Remove dependency that caused a new license to need to be approved * Let setSafeContent handle setting the value for LocalUiTestMode * Fix broken test * Apply fix to RoomMemberModerationViewTest and RoomListDeclineInviteMenuTest --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jorge Martín <jorgem@element.io> Co-authored-by: ElementBot <android@element.io> Co-authored-by: Benoit Marty <benoit@matrix.org>
270 lines
6.1 KiB
YAML
270 lines
6.1 KiB
YAML
# Default rules: https://github.com/detekt/detekt/blob/main/detekt-core/src/main/resources/default-detekt-config.yml
|
|
|
|
style:
|
|
AlsoCouldBeApply:
|
|
active: true
|
|
BracesOnWhenStatements:
|
|
active: false
|
|
CascadingCallWrapping:
|
|
active: true
|
|
includeElvis: true
|
|
DataClassShouldBeImmutable:
|
|
active: true
|
|
EqualsNullCall:
|
|
active: true
|
|
EqualsOnSignatureLine:
|
|
active: true
|
|
ExplicitCollectionElementAccessMethod:
|
|
active: true
|
|
ExplicitItLambdaParameter:
|
|
active: true
|
|
MaxLineLength:
|
|
# Default is 120
|
|
maxLineLength: 160
|
|
MagicNumber:
|
|
active: false
|
|
ReturnCount:
|
|
active: false
|
|
UnnecessaryAbstractClass:
|
|
active: true
|
|
FunctionOnlyReturningConstant:
|
|
active: false
|
|
UnusedPrivateMember:
|
|
active: true
|
|
DestructuringDeclarationWithTooManyEntries:
|
|
active: true
|
|
maxDestructuringEntries: 5
|
|
UnusedParameter:
|
|
active: true
|
|
UnnecessaryInnerClass:
|
|
active: true
|
|
UnnecessaryLet:
|
|
active: true
|
|
UnnecessaryParentheses:
|
|
active: true
|
|
allowForUnclearPrecedence: false
|
|
UntilInsteadOfRangeTo:
|
|
active: true
|
|
UnusedImports:
|
|
active: true
|
|
UnusedPrivateProperty:
|
|
active: true
|
|
ThrowsCount:
|
|
active: false
|
|
LoopWithTooManyJumpStatements:
|
|
active: true
|
|
SerialVersionUIDInSerializableClass:
|
|
active: false
|
|
ProtectedMemberInFinalClass:
|
|
active: true
|
|
UseCheckOrError:
|
|
active: true
|
|
OptionalUnit:
|
|
active: true
|
|
PreferToOverPairSyntax:
|
|
active: true
|
|
RedundantExplicitType:
|
|
active: true
|
|
TrailingWhitespace:
|
|
active: true
|
|
TrimMultilineRawString:
|
|
active: true
|
|
trimmingMethods:
|
|
- 'trimIndent'
|
|
- 'trimMargin'
|
|
UnderscoresInNumericLiterals:
|
|
active: true
|
|
acceptableLength: 4
|
|
allowNonStandardGrouping: false
|
|
UnnecessaryAnnotationUseSiteTarget:
|
|
active: true
|
|
UnnecessaryBackticks:
|
|
active: true
|
|
UnnecessaryBracesAroundTrailingLambda:
|
|
active: true
|
|
UseDataClass:
|
|
active: true
|
|
allowVars: false
|
|
UseEmptyCounterpart:
|
|
active: true
|
|
UseIfEmptyOrIfBlank:
|
|
active: true
|
|
UseLet:
|
|
active: true
|
|
UseSumOfInsteadOfFlatMapSize:
|
|
active: true
|
|
|
|
coroutines:
|
|
GlobalCoroutineUsage:
|
|
# Keep false for now.
|
|
active: false
|
|
SuspendFunSwallowedCancellation:
|
|
active: true
|
|
SuspendFunWithCoroutineScopeReceiver:
|
|
active: true
|
|
|
|
empty-blocks:
|
|
EmptyFunctionBlock:
|
|
active: false
|
|
EmptySecondaryConstructor:
|
|
active: true
|
|
|
|
potential-bugs:
|
|
ImplicitDefaultLocale:
|
|
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:
|
|
TooGenericExceptionCaught:
|
|
active: false
|
|
SwallowedException:
|
|
active: false
|
|
ThrowingExceptionsWithoutMessageOrCause:
|
|
active: true
|
|
TooGenericExceptionThrown:
|
|
active: true
|
|
InstanceOfCheckForException:
|
|
active: true
|
|
ObjectExtendsThrowable:
|
|
active: true
|
|
|
|
complexity:
|
|
TooManyFunctions:
|
|
active: false
|
|
LongMethod:
|
|
active: false
|
|
LongParameterList:
|
|
active: false
|
|
CyclomaticComplexMethod:
|
|
active: false
|
|
NestedBlockDepth:
|
|
active: false
|
|
ComplexCondition:
|
|
active: true
|
|
LargeClass:
|
|
active: true
|
|
|
|
naming:
|
|
VariableNaming:
|
|
active: true
|
|
TopLevelPropertyNaming:
|
|
active: true
|
|
FunctionNaming:
|
|
active: true
|
|
ignoreAnnotated: [ 'Composable' ]
|
|
LambdaParameterNaming:
|
|
active: true
|
|
NonBooleanPropertyPrefixedWithIs:
|
|
active: true
|
|
VariableMaxLength:
|
|
active: true
|
|
|
|
performance:
|
|
SpreadOperator:
|
|
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
|
|
comments:
|
|
AbsentOrWrongFileLicense:
|
|
active: false
|
|
CommentOverPrivateFunction:
|
|
active: false
|
|
CommentOverPrivateProperty:
|
|
active: false
|
|
DeprecatedBlockTag:
|
|
active: true
|
|
EndOfSentenceFormat:
|
|
active: true
|
|
OutdatedDocumentation:
|
|
active: true
|
|
allowParamOnConstructorProperties: true
|
|
UndocumentedPublicClass:
|
|
active: false
|
|
UndocumentedPublicFunction:
|
|
active: false
|
|
UndocumentedPublicProperty:
|
|
active: false
|
|
|
|
Compose:
|
|
CompositionLocalAllowlist:
|
|
active: true
|
|
# You can optionally define a list of CompositionLocals that are allowed here
|
|
allowedCompositionLocals:
|
|
- LocalCompoundColors
|
|
- LocalSnackbarDispatcher
|
|
- LocalCameraPositionState
|
|
- LocalMediaItemPresenterFactories
|
|
- LocalTimelineItemPresenterFactories
|
|
- LocalRoomMemberProfilesCache
|
|
- LocalMentionSpanUpdater
|
|
- LocalAnalyticsService
|
|
- LocalBuildMeta
|
|
- LocalUiTestMode
|
|
CompositionLocalNaming:
|
|
active: true
|
|
ContentEmitterReturningValues:
|
|
active: true
|
|
# You can optionally add your own composables here
|
|
# contentEmitters: MyComposable,MyOtherComposable
|
|
ModifierComposable:
|
|
active: true
|
|
ModifierMissing:
|
|
active: true
|
|
ModifierReused:
|
|
active: true
|
|
ModifierWithoutDefault:
|
|
active: true
|
|
MultipleEmitters:
|
|
active: true
|
|
# You can optionally add your own composables here
|
|
# contentEmitters: MyComposable,MyOtherComposable
|
|
MutableParams:
|
|
active: true
|
|
ComposableNaming:
|
|
active: true
|
|
# You can optionally disable the checks in this rule for regex matches against the composable name (e.g. molecule presenters)
|
|
# allowedComposableFunctionNames: .*Presenter,.*MoleculePresenter
|
|
ComposableParamOrder:
|
|
active: true
|
|
PreviewAnnotationNaming:
|
|
active: true
|
|
PreviewPublic:
|
|
active: true
|
|
# You can optionally disable that only previews with @PreviewParameter are flagged
|
|
previewPublicOnlyIfParams: false
|
|
RememberMissing:
|
|
active: true
|
|
UnstableCollections:
|
|
active: true
|