Skip to content

Commit 29548cc

Browse files
committed
RUM-8349: Add support for detekt checks for session replay compose module
1 parent 85637ab commit 29548cc

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

.gitlab-ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ analysis:detekt-custom:
125125
- ./gradlew :features:dd-sdk-android-rum:customDetektRules
126126
- ./gradlew :features:dd-sdk-android-session-replay:customDetektRules
127127
- ./gradlew :features:dd-sdk-android-session-replay-material:customDetektRules
128+
- ./gradlew :features:dd-sdk-android-session-replay-compose:customDetektRules
128129
- ./gradlew :features:dd-sdk-android-trace:customDetektRules
129130
- ./gradlew :features:dd-sdk-android-trace-otel:customDetektRules
130131
- ./gradlew :features:dd-sdk-android-webview:customDetektRules

detekt_custom.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,12 +509,14 @@ datadog:
509509
- "android.graphics.RectF.constructor()"
510510
- "android.graphics.RectF.width()"
511511
- "android.graphics.RectF.height()"
512+
- "android.graphics.RectF.toRect()"
512513
# endregion
513514
# region Androidx APIs
514515
- "androidx.appcompat.widget.DatadogActionBarContainerAccessor.constructor(androidx.appcompat.widget.ActionBarContainer)"
515516
- "androidx.appcompat.widget.DatadogActionBarContainerAccessor.getBackgroundDrawable()"
516517
- "androidx.compose.foundation.interaction.DragInteraction.Start.constructor()"
517518
- "androidx.compose.foundation.shape.CornerSize.toPx(androidx.compose.ui.geometry.Size, androidx.compose.ui.unit.Density)"
519+
- "androidx.compose.runtime.Composition.takeIf(kotlin.Function1)"
518520
- "androidx.compose.runtime.DisposableEffect(kotlin.Any?, kotlin.Any?, kotlin.Function1)"
519521
- "androidx.compose.runtime.DisposableEffectScope.onDispose(kotlin.Function0)"
520522
- "androidx.compose.runtime.LaunchedEffect(kotlin.Any?, kotlin.Any?, kotlin.Any?, kotlin.coroutines.SuspendFunction1)"
@@ -535,10 +537,14 @@ datadog:
535537
- "androidx.compose.ui.layout.LayoutCoordinates.positionInWindow()"
536538
- "androidx.compose.ui.layout.LayoutInfo.getModifierInfo()"
537539
- "androidx.compose.ui.unit.Density(kotlin.Float, kotlin.Float)"
540+
- "androidx.compose.ui.geometry.Rect.toAndroidRectF()"
538541
- "androidx.compose.ui.geometry.Size(kotlin.Float, kotlin.Float)"
539542
- "androidx.compose.ui.geometry.Size.copy(kotlin.Float, kotlin.Float)"
540543
- "androidx.compose.ui.semantics.SemanticsConfiguration.firstOrNull(kotlin.Function1)"
544+
- "androidx.compose.ui.Modifier.semantics(kotlin.Boolean, kotlin.Function1)"
545+
- "androidx.compose.ui.semantics.SemanticsConfiguration.contains(androidx.compose.ui.semantics.SemanticsPropertyKey)"
541546
- "androidx.compose.ui.semantics.SemanticsConfiguration.getOrNull(androidx.compose.ui.semantics.SemanticsPropertyKey)"
547+
- "androidx.compose.ui.semantics.SemanticsPropertyKey.constructor(kotlin.String, kotlin.Function2)"
542548
- "androidx.compose.ui.text.AnnotatedString.getStringAnnotations(kotlin.Int, kotlin.Int)"
543549
- "androidx.core.view.GestureDetectorCompat.constructor(android.content.Context, android.view.GestureDetector.OnGestureListener)"
544550
- "androidx.core.view.GestureDetectorCompat.onTouchEvent(android.view.MotionEvent)"
@@ -895,6 +901,7 @@ datadog:
895901
- "kotlin.collections.List.findFirstForType(java.lang.Class)"
896902
- "kotlin.collections.List.firstOrNull()"
897903
- "kotlin.collections.List.firstOrNull(kotlin.Function1)"
904+
- "kotlin.collections.List.firstNotNullOfOrNull(kotlin.Function1)"
898905
- "kotlin.collections.List.flatMap(kotlin.Function1)"
899906
- "kotlin.collections.List.flatMap(kotlin.Function1)"
900907
- "kotlin.collections.List.fold(com.google.gson.JsonArray, kotlin.Function2)"
@@ -914,6 +921,7 @@ datadog:
914921
- "kotlin.collections.List.lastOrNull()"
915922
- "kotlin.collections.List.lastOrNull(kotlin.Function1)"
916923
- "kotlin.collections.List.map(kotlin.Function1)"
924+
- "kotlin.collections.List.mapIndexed(kotlin.Function2)"
917925
- "kotlin.collections.List.mapNotNull(kotlin.Function1)"
918926
- "kotlin.collections.List.maxOrNull()"
919927
- "kotlin.collections.List.orEmpty()"
@@ -1145,6 +1153,7 @@ datadog:
11451153
# region Kotlin Primitives
11461154
- "kotlin.Any.constructor()"
11471155
- "kotlin.Any.hashCode()"
1156+
- "kotlin.Any.takeIf(kotlin.Function1)"
11481157
- "kotlin.Any.toString()"
11491158
- "kotlin.Boolean.hashCode()"
11501159
- "kotlin.Boolean.not()"
@@ -1158,6 +1167,7 @@ datadog:
11581167
- "kotlin.Double.coerceAtMost(kotlin.Double)"
11591168
- "kotlin.Double.isNaN()"
11601169
- "kotlin.Double.pow(kotlin.Int)"
1170+
- "kotlin.Double.pow(kotlin.Double)"
11611171
- "kotlin.Double.rangeTo(kotlin.Double)"
11621172
- "kotlin.Double.toFloat()"
11631173
- "kotlin.Double.toInt()"
@@ -1194,6 +1204,7 @@ datadog:
11941204
- "kotlin.Number.toLong()"
11951205
- "kotlin.Short.toUShort()"
11961206
- "kotlin.ULong.toLong()"
1207+
- "kotlin.String.takeIf(kotlin.Function1)"
11971208
- "kotlin.String.toBigIntegerOrNull()"
11981209
- "kotlin.String.trim(kotlin.Function1)"
11991210
- "kotlin.ULong.toDouble()"

features/dd-sdk-android-session-replay-compose/build.gradle.kts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
import com.datadog.gradle.config.androidLibraryConfig
88
import com.datadog.gradle.config.dependencyUpdateConfig
9+
import com.datadog.gradle.config.detektCustomConfig
910
import com.datadog.gradle.config.javadocConfig
1011
import com.datadog.gradle.config.junitConfig
1112
import com.datadog.gradle.config.kotlinConfig
@@ -91,3 +92,8 @@ dependencyUpdateConfig()
9192
publishingConfig(
9293
"Session Replay Extension Support for Jetpack Compose."
9394
)
95+
detektCustomConfig(
96+
":dd-sdk-android-core",
97+
":dd-sdk-android-internal",
98+
":features:dd-sdk-android-session-replay"
99+
)

0 commit comments

Comments
 (0)