@datadog/mobile-react-native 1.2.0-beta1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DatadogSDKReactNative.podspec +2 -2
- package/android/build.gradle +28 -3
- package/android/detekt.yml +572 -0
- package/android/src/main/kotlin/com/datadog/reactnative/DatadogSDKWrapper.kt +4 -0
- package/android/src/main/kotlin/com/datadog/reactnative/DatadogWrapper.kt +7 -2
- package/android/src/main/kotlin/com/datadog/reactnative/DdSdk.kt +118 -8
- package/android/src/main/kotlin/com/datadog/reactnative/DdSdkConfiguration.kt +23 -1
- package/android/src/main/kotlin/com/datadog/reactnative/DdSdkConfigurationExt.kt +29 -1
- package/android/src/main/kotlin/com/datadog/reactnative/VitalFrameCallback.kt +41 -0
- package/android/src/test/kotlin/com/datadog/reactnative/DdRumTest.kt +7 -2
- package/android/src/test/kotlin/com/datadog/reactnative/DdSdkTest.kt +377 -27
- package/android/src/test/kotlin/com/datadog/reactnative/DdTraceTest.kt +5 -1
- package/android/src/test/kotlin/com/datadog/tools/unit/DdSdkConfigurationExt.kt +33 -1
- package/android/src/test/kotlin/com/datadog/tools/unit/GenericAssert.kt +21 -1
- package/android/src/test/kotlin/com/datadog/tools/unit/MapExt.kt +1 -1
- package/android/src/test/kotlin/com/datadog/tools/unit/forge/BaseConfigurator.kt +1 -0
- package/android/src/test/kotlin/com/datadog/tools/unit/forge/DdSdkConfigurationForgeryFactory.kt +21 -2
- package/android/src/test/kotlin/com/datadog/tools/unit/forge/PackageInfoForgeryFactory.kt +2 -3
- package/android/src/test/kotlin/com/datadog/tools/unit/forge/TelemetryConfigurationEventForgeryFactory.kt +94 -0
- package/datadog-sourcemaps.gradle +85 -28
- package/ios/Sources/Attributes.swift +0 -4
- package/ios/Sources/DdSdk.swift +99 -13
- package/ios/Sources/DdSdkConfiguration.swift +34 -1
- package/ios/Sources/JSRefreshRateListener.swift +86 -0
- package/ios/Sources/QueueHolder.swift +7 -0
- package/ios/Sources/RNDdSdkConfiguration.swift +23 -1
- package/lib/commonjs/DdSdkReactNative.js +24 -25
- package/lib/commonjs/DdSdkReactNative.js.map +1 -1
- package/lib/commonjs/DdSdkReactNativeConfiguration.js +66 -2
- package/lib/commonjs/DdSdkReactNativeConfiguration.js.map +1 -1
- package/lib/commonjs/errorUtils.js +12 -3
- package/lib/commonjs/errorUtils.js.map +1 -1
- package/lib/commonjs/longTasksUtils.js +40 -0
- package/lib/commonjs/longTasksUtils.js.map +1 -0
- package/lib/commonjs/rum/instrumentation/getJsxRuntime.js +11 -8
- package/lib/commonjs/rum/instrumentation/getJsxRuntime.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/domain/distributedTracing.js +2 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/domain/distributedTracing.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/implementation/DatadogRumResource/ResourceReporter.js +2 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/implementation/DatadogRumResource/ResourceReporter.js.map +1 -1
- package/lib/commonjs/types.js +5 -1
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/commonjs/version.js.map +1 -1
- package/lib/module/DdSdkReactNative.js +23 -24
- package/lib/module/DdSdkReactNative.js.map +1 -1
- package/lib/module/DdSdkReactNativeConfiguration.js +64 -1
- package/lib/module/DdSdkReactNativeConfiguration.js.map +1 -1
- package/lib/module/errorUtils.js +12 -3
- package/lib/module/errorUtils.js.map +1 -1
- package/lib/module/longTasksUtils.js +31 -0
- package/lib/module/longTasksUtils.js.map +1 -0
- package/lib/module/rum/instrumentation/getJsxRuntime.js +11 -8
- package/lib/module/rum/instrumentation/getJsxRuntime.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/domain/distributedTracing.js +2 -1
- package/lib/module/rum/instrumentation/resourceTracking/domain/distributedTracing.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/implementation/DatadogRumResource/ResourceReporter.js +2 -1
- package/lib/module/rum/instrumentation/resourceTracking/implementation/DatadogRumResource/ResourceReporter.js.map +1 -1
- package/lib/module/types.js +5 -1
- package/lib/module/types.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/module/version.js.map +1 -1
- package/lib/typescript/DdSdkReactNative.d.ts +0 -7
- package/lib/typescript/DdSdkReactNativeConfiguration.d.ts +51 -0
- package/lib/typescript/errorUtils.d.ts +8 -0
- package/lib/typescript/longTasksUtils.d.ts +6 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/domain/distributedTracing.d.ts +1 -0
- package/lib/typescript/rum/instrumentation/resourceTracking/domain/interfaces/RumResource.d.ts +1 -1
- package/lib/typescript/types.d.ts +15 -1
- package/lib/typescript/version.d.ts +1 -1
- package/package.json +6 -3
- package/scripts/replace-react-require.js +78 -0
- package/src/DatadogProvider/__tests__/initialization.test.tsx +9 -1
- package/src/DdSdkReactNative.tsx +31 -34
- package/src/DdSdkReactNativeConfiguration.tsx +66 -1
- package/src/__tests__/DdSdkReactNative.test.tsx +56 -13
- package/src/__tests__/DdSdkReactNativeConfiguration.test.ts +15 -2
- package/src/__tests__/longTasksUtils.ts +23 -0
- package/src/errorUtils.ts +11 -3
- package/src/longTasksUtils.ts +30 -0
- package/src/rum/instrumentation/getJsxRuntime.ts +11 -11
- package/src/rum/instrumentation/resourceTracking/domain/distributedTracing.tsx +3 -1
- package/src/rum/instrumentation/resourceTracking/domain/interfaces/RumResource.ts +1 -1
- package/src/rum/instrumentation/resourceTracking/implementation/DatadogRumResource/ResourceReporter.ts +2 -1
- package/src/rum/instrumentation/resourceTracking/implementation/__tests__/XHRProxy.test.ts +9 -47
- package/src/types.tsx +10 -1
- package/src/version.ts +1 -1
|
@@ -17,8 +17,8 @@ Pod::Spec.new do |s|
|
|
|
17
17
|
s.source_files = "ios/Sources/*.{h,m,mm,swift}"
|
|
18
18
|
|
|
19
19
|
s.dependency "React-Core"
|
|
20
|
-
s.dependency 'DatadogSDK', '~> 1.
|
|
21
|
-
s.dependency 'DatadogSDKCrashReporting', '~> 1.
|
|
20
|
+
s.dependency 'DatadogSDK', '~> 1.14.0'
|
|
21
|
+
s.dependency 'DatadogSDKCrashReporting', '~> 1.14.0'
|
|
22
22
|
|
|
23
23
|
s.test_spec 'Tests' do |test_spec|
|
|
24
24
|
test_spec.source_files = 'ios/Tests/*.swift'
|
package/android/build.gradle
CHANGED
|
@@ -14,9 +14,12 @@ buildscript {
|
|
|
14
14
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
15
15
|
classpath "org.jlleitschuh.gradle:ktlint-gradle:10.2.1"
|
|
16
16
|
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.18.0"
|
|
17
|
+
classpath 'com.github.bjoernq:unmockplugin:0.7.9'
|
|
17
18
|
}
|
|
18
19
|
}
|
|
19
20
|
|
|
21
|
+
|
|
22
|
+
apply plugin: 'de.mobilej.unmock'
|
|
20
23
|
apply plugin: 'com.android.library'
|
|
21
24
|
apply plugin: 'kotlin-android'
|
|
22
25
|
apply plugin: 'org.jlleitschuh.gradle.ktlint'
|
|
@@ -149,7 +152,7 @@ dependencies {
|
|
|
149
152
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
150
153
|
compileOnly "com.squareup.okhttp3:okhttp:3.12.13"
|
|
151
154
|
|
|
152
|
-
implementation "com.datadoghq:dd-sdk-android:1.
|
|
155
|
+
implementation "com.datadoghq:dd-sdk-android:1.16.+"
|
|
153
156
|
testImplementation "org.junit.platform:junit-platform-launcher:1.6.2"
|
|
154
157
|
testImplementation "org.junit.jupiter:junit-jupiter-api:5.6.2"
|
|
155
158
|
testImplementation "org.junit.jupiter:junit-jupiter-engine:5.6.2"
|
|
@@ -161,6 +164,15 @@ dependencies {
|
|
|
161
164
|
testImplementation "com.github.xgouchet.Elmyr:jvm:1.3.1"
|
|
162
165
|
testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0"
|
|
163
166
|
testImplementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
|
|
167
|
+
unmock 'org.robolectric:android-all:4.4_r1-robolectric-r2'
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
unMock {
|
|
171
|
+
keep("android.os.Looper")
|
|
172
|
+
keep("android.os.MessageQueue")
|
|
173
|
+
keep("android.os.SystemProperties")
|
|
174
|
+
keep("android.view.Choreographer")
|
|
175
|
+
keep("android.view.DisplayEventReceiver")
|
|
164
176
|
}
|
|
165
177
|
|
|
166
178
|
tasks.withType(Test) {
|
|
@@ -193,8 +205,7 @@ ktlint {
|
|
|
193
205
|
|
|
194
206
|
detekt {
|
|
195
207
|
input = files("$projectDir/src/main/kotlin")
|
|
196
|
-
config = files("$
|
|
197
|
-
|
|
208
|
+
config = files("$projectDir/detekt.yml")
|
|
198
209
|
reports {
|
|
199
210
|
xml {
|
|
200
211
|
enabled = true
|
|
@@ -202,3 +213,17 @@ detekt {
|
|
|
202
213
|
}
|
|
203
214
|
}
|
|
204
215
|
}
|
|
216
|
+
|
|
217
|
+
// This is needed to make unmock work. Choreographer class was loaded from android.jar of Android SDK
|
|
218
|
+
// (which contains only public API and no internals), which with unmock plugin it should be loaded from the special jar provided by unmock.
|
|
219
|
+
// The code below is from the unmock plugin. It seems like something (from RN tooling maybe?) overwrites the location of Choreographer
|
|
220
|
+
// to the default one, so we apply the unmock code once again
|
|
221
|
+
project.afterEvaluate {
|
|
222
|
+
def outputJarPath = "${project.buildDir}/intermediates/unmocked-android${project.name}.jar"
|
|
223
|
+
def unMockTask = project.tasks.findByName("unMock")
|
|
224
|
+
def outputJarDependency = project.files(outputJarPath).builtBy(unMockTask)
|
|
225
|
+
|
|
226
|
+
project.android.unitTestVariants.all { variant ->
|
|
227
|
+
variant.registerPreJavacGeneratedBytecode(outputJarDependency)
|
|
228
|
+
}
|
|
229
|
+
}
|
|
@@ -0,0 +1,572 @@
|
|
|
1
|
+
build:
|
|
2
|
+
maxIssues: 0
|
|
3
|
+
weights:
|
|
4
|
+
# complexity: 2
|
|
5
|
+
# LongParameterList: 1
|
|
6
|
+
# style: 1
|
|
7
|
+
# comments: 1
|
|
8
|
+
|
|
9
|
+
processors:
|
|
10
|
+
active: true
|
|
11
|
+
exclude:
|
|
12
|
+
# - 'DetektProgressListener'
|
|
13
|
+
# - 'FunctionCountProcessor'
|
|
14
|
+
# - 'PropertyCountProcessor'
|
|
15
|
+
# - 'ClassCountProcessor'
|
|
16
|
+
# - 'PackageCountProcessor'
|
|
17
|
+
# - 'KtFileCountProcessor'
|
|
18
|
+
|
|
19
|
+
console-reports:
|
|
20
|
+
active: true
|
|
21
|
+
exclude:
|
|
22
|
+
# - 'ProjectStatisticsReport'
|
|
23
|
+
# - 'ComplexityReport'
|
|
24
|
+
# - 'NotificationReport'
|
|
25
|
+
# - 'FindingsReport'
|
|
26
|
+
- 'FileBasedFindingsReport'
|
|
27
|
+
# - 'BuildFailureReport'
|
|
28
|
+
|
|
29
|
+
comments:
|
|
30
|
+
active: true
|
|
31
|
+
CommentOverPrivateFunction:
|
|
32
|
+
active: true
|
|
33
|
+
CommentOverPrivateProperty:
|
|
34
|
+
active: true
|
|
35
|
+
EndOfSentenceFormat:
|
|
36
|
+
active: true
|
|
37
|
+
endOfSentenceFormat: ([.?!][ \t\n\r\f<])|([.?!:]$)
|
|
38
|
+
UndocumentedPublicClass:
|
|
39
|
+
active: true
|
|
40
|
+
excludes: [ "**/test/**","**/androidTest/**","**/*.Test.kt","**/*.Spec.kt","**/*.Spek.kt" ]
|
|
41
|
+
searchInNestedClass: true
|
|
42
|
+
searchInInnerClass: true
|
|
43
|
+
searchInInnerObject: true
|
|
44
|
+
searchInInnerInterface: true
|
|
45
|
+
UndocumentedPublicFunction:
|
|
46
|
+
active: true
|
|
47
|
+
excludes: [ "**/test/**","**/androidTest/**","**/*.Test.kt","**/*.Spec.kt","**/*.Spek.kt" ]
|
|
48
|
+
UndocumentedPublicProperty:
|
|
49
|
+
active: true
|
|
50
|
+
excludes: [ "**/test/**","**/androidTest/**","**/*.Test.kt","**/*.Spec.kt","**/*.Spek.kt" ]
|
|
51
|
+
|
|
52
|
+
complexity:
|
|
53
|
+
active: true
|
|
54
|
+
ComplexCondition:
|
|
55
|
+
active: true
|
|
56
|
+
threshold: 4
|
|
57
|
+
ComplexInterface:
|
|
58
|
+
active: true
|
|
59
|
+
threshold: 10
|
|
60
|
+
includeStaticDeclarations: false
|
|
61
|
+
ComplexMethod:
|
|
62
|
+
active: true
|
|
63
|
+
threshold: 10
|
|
64
|
+
ignoreSingleWhenExpression: true
|
|
65
|
+
ignoreSimpleWhenEntries: true
|
|
66
|
+
LabeledExpression:
|
|
67
|
+
active: true
|
|
68
|
+
ignoredLabels: ""
|
|
69
|
+
LargeClass:
|
|
70
|
+
active: true
|
|
71
|
+
threshold: 600
|
|
72
|
+
LongMethod:
|
|
73
|
+
active: true
|
|
74
|
+
threshold: 60
|
|
75
|
+
LongParameterList:
|
|
76
|
+
active: true
|
|
77
|
+
threshold: 6
|
|
78
|
+
ignoreDefaultParameters: true
|
|
79
|
+
MethodOverloading:
|
|
80
|
+
active: true
|
|
81
|
+
threshold: 6
|
|
82
|
+
NestedBlockDepth:
|
|
83
|
+
active: true
|
|
84
|
+
threshold: 4
|
|
85
|
+
StringLiteralDuplication:
|
|
86
|
+
active: true
|
|
87
|
+
excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
|
|
88
|
+
threshold: 3
|
|
89
|
+
ignoreAnnotation: true
|
|
90
|
+
excludeStringsWithLessThan5Characters: true
|
|
91
|
+
ignoreStringsRegex: '$^'
|
|
92
|
+
TooManyFunctions:
|
|
93
|
+
active: true
|
|
94
|
+
excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
|
|
95
|
+
thresholdInFiles: 11
|
|
96
|
+
thresholdInClasses: 11
|
|
97
|
+
thresholdInInterfaces: 11
|
|
98
|
+
thresholdInObjects: 11
|
|
99
|
+
thresholdInEnums: 11
|
|
100
|
+
ignoreDeprecated: true
|
|
101
|
+
ignorePrivate: true
|
|
102
|
+
ignoreOverridden: true
|
|
103
|
+
|
|
104
|
+
empty-blocks:
|
|
105
|
+
active: true
|
|
106
|
+
EmptyCatchBlock:
|
|
107
|
+
active: true
|
|
108
|
+
allowedExceptionNameRegex: "^(_|(ignore|expected).*)"
|
|
109
|
+
EmptyClassBlock:
|
|
110
|
+
active: true
|
|
111
|
+
EmptyDefaultConstructor:
|
|
112
|
+
active: true
|
|
113
|
+
EmptyDoWhileBlock:
|
|
114
|
+
active: true
|
|
115
|
+
EmptyElseBlock:
|
|
116
|
+
active: true
|
|
117
|
+
EmptyFinallyBlock:
|
|
118
|
+
active: true
|
|
119
|
+
EmptyForBlock:
|
|
120
|
+
active: true
|
|
121
|
+
EmptyFunctionBlock:
|
|
122
|
+
active: true
|
|
123
|
+
ignoreOverridden: true
|
|
124
|
+
EmptyIfBlock:
|
|
125
|
+
active: true
|
|
126
|
+
EmptyInitBlock:
|
|
127
|
+
active: true
|
|
128
|
+
EmptyKtFile:
|
|
129
|
+
active: true
|
|
130
|
+
EmptySecondaryConstructor:
|
|
131
|
+
active: true
|
|
132
|
+
EmptyWhenBlock:
|
|
133
|
+
active: true
|
|
134
|
+
EmptyWhileBlock:
|
|
135
|
+
active: true
|
|
136
|
+
|
|
137
|
+
exceptions:
|
|
138
|
+
active: true
|
|
139
|
+
ExceptionRaisedInUnexpectedLocation:
|
|
140
|
+
active: true
|
|
141
|
+
methodNames: 'toString,hashCode,equals,finalize'
|
|
142
|
+
InstanceOfCheckForException:
|
|
143
|
+
active: true
|
|
144
|
+
excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
|
|
145
|
+
NotImplementedDeclaration:
|
|
146
|
+
active: true
|
|
147
|
+
PrintStackTrace:
|
|
148
|
+
active: true
|
|
149
|
+
RethrowCaughtException:
|
|
150
|
+
active: true
|
|
151
|
+
ReturnFromFinally:
|
|
152
|
+
active: true
|
|
153
|
+
ignoreLabeled: true
|
|
154
|
+
SwallowedException:
|
|
155
|
+
active: true
|
|
156
|
+
ignoredExceptionTypes: 'InterruptedException,NumberFormatException,ParseException,MalformedURLException'
|
|
157
|
+
allowedExceptionNameRegex: "^(_|(ignore|expected).*)"
|
|
158
|
+
ThrowingExceptionFromFinally:
|
|
159
|
+
active: true
|
|
160
|
+
ThrowingExceptionInMain:
|
|
161
|
+
active: true
|
|
162
|
+
ThrowingExceptionsWithoutMessageOrCause:
|
|
163
|
+
active: true
|
|
164
|
+
exceptions: 'IllegalArgumentException,IllegalStateException,IOException'
|
|
165
|
+
ThrowingNewInstanceOfSameException:
|
|
166
|
+
active: true
|
|
167
|
+
TooGenericExceptionCaught:
|
|
168
|
+
active: true
|
|
169
|
+
excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
|
|
170
|
+
exceptionNames:
|
|
171
|
+
- ArrayIndexOutOfBoundsException
|
|
172
|
+
- Error
|
|
173
|
+
- Exception
|
|
174
|
+
- IllegalMonitorStateException
|
|
175
|
+
- NullPointerException
|
|
176
|
+
- IndexOutOfBoundsException
|
|
177
|
+
- RuntimeException
|
|
178
|
+
- Throwable
|
|
179
|
+
allowedExceptionNameRegex: "^(_|(ignore|expected).*)"
|
|
180
|
+
TooGenericExceptionThrown:
|
|
181
|
+
active: true
|
|
182
|
+
exceptionNames:
|
|
183
|
+
- Error
|
|
184
|
+
- Exception
|
|
185
|
+
- Throwable
|
|
186
|
+
- RuntimeException
|
|
187
|
+
|
|
188
|
+
formatting:
|
|
189
|
+
active: false
|
|
190
|
+
android: false
|
|
191
|
+
autoCorrect: true
|
|
192
|
+
AnnotationOnSeparateLine:
|
|
193
|
+
active: true
|
|
194
|
+
autoCorrect: true
|
|
195
|
+
ChainWrapping:
|
|
196
|
+
active: true
|
|
197
|
+
autoCorrect: true
|
|
198
|
+
CommentSpacing:
|
|
199
|
+
active: true
|
|
200
|
+
autoCorrect: true
|
|
201
|
+
Filename:
|
|
202
|
+
active: true
|
|
203
|
+
FinalNewline:
|
|
204
|
+
active: true
|
|
205
|
+
autoCorrect: true
|
|
206
|
+
ImportOrdering:
|
|
207
|
+
active: true
|
|
208
|
+
autoCorrect: true
|
|
209
|
+
Indentation:
|
|
210
|
+
active: true
|
|
211
|
+
autoCorrect: true
|
|
212
|
+
indentSize: 4
|
|
213
|
+
continuationIndentSize: 4
|
|
214
|
+
MaximumLineLength:
|
|
215
|
+
active: true
|
|
216
|
+
maxLineLength: 120
|
|
217
|
+
ModifierOrdering:
|
|
218
|
+
active: true
|
|
219
|
+
autoCorrect: true
|
|
220
|
+
MultiLineIfElse:
|
|
221
|
+
active: true
|
|
222
|
+
autoCorrect: true
|
|
223
|
+
NoBlankLineBeforeRbrace:
|
|
224
|
+
active: true
|
|
225
|
+
autoCorrect: true
|
|
226
|
+
NoConsecutiveBlankLines:
|
|
227
|
+
active: true
|
|
228
|
+
autoCorrect: true
|
|
229
|
+
NoEmptyClassBody:
|
|
230
|
+
active: true
|
|
231
|
+
autoCorrect: true
|
|
232
|
+
NoLineBreakAfterElse:
|
|
233
|
+
active: true
|
|
234
|
+
autoCorrect: true
|
|
235
|
+
NoLineBreakBeforeAssignment:
|
|
236
|
+
active: true
|
|
237
|
+
autoCorrect: true
|
|
238
|
+
NoMultipleSpaces:
|
|
239
|
+
active: true
|
|
240
|
+
autoCorrect: true
|
|
241
|
+
NoSemicolons:
|
|
242
|
+
active: true
|
|
243
|
+
autoCorrect: true
|
|
244
|
+
NoTrailingSpaces:
|
|
245
|
+
active: true
|
|
246
|
+
autoCorrect: true
|
|
247
|
+
NoUnitReturn:
|
|
248
|
+
active: true
|
|
249
|
+
autoCorrect: true
|
|
250
|
+
NoUnusedImports:
|
|
251
|
+
active: true
|
|
252
|
+
autoCorrect: true
|
|
253
|
+
NoWildcardImports:
|
|
254
|
+
active: true
|
|
255
|
+
autoCorrect: true
|
|
256
|
+
PackageName:
|
|
257
|
+
active: true
|
|
258
|
+
autoCorrect: true
|
|
259
|
+
ParameterListWrapping:
|
|
260
|
+
active: true
|
|
261
|
+
autoCorrect: true
|
|
262
|
+
indentSize: 4
|
|
263
|
+
SpacingAroundColon:
|
|
264
|
+
active: true
|
|
265
|
+
autoCorrect: true
|
|
266
|
+
SpacingAroundComma:
|
|
267
|
+
active: true
|
|
268
|
+
autoCorrect: true
|
|
269
|
+
SpacingAroundCurly:
|
|
270
|
+
active: true
|
|
271
|
+
autoCorrect: true
|
|
272
|
+
SpacingAroundDot:
|
|
273
|
+
active: true
|
|
274
|
+
autoCorrect: true
|
|
275
|
+
SpacingAroundKeyword:
|
|
276
|
+
active: true
|
|
277
|
+
autoCorrect: true
|
|
278
|
+
SpacingAroundOperators:
|
|
279
|
+
active: true
|
|
280
|
+
autoCorrect: true
|
|
281
|
+
SpacingAroundParens:
|
|
282
|
+
active: true
|
|
283
|
+
autoCorrect: true
|
|
284
|
+
SpacingAroundRangeOperator:
|
|
285
|
+
active: true
|
|
286
|
+
autoCorrect: true
|
|
287
|
+
StringTemplate:
|
|
288
|
+
active: true
|
|
289
|
+
autoCorrect: true
|
|
290
|
+
|
|
291
|
+
naming:
|
|
292
|
+
active: true
|
|
293
|
+
ClassNaming:
|
|
294
|
+
active: true
|
|
295
|
+
excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
|
|
296
|
+
classPattern: '[A-Z$][a-zA-Z0-9$]*'
|
|
297
|
+
ConstructorParameterNaming:
|
|
298
|
+
active: true
|
|
299
|
+
excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
|
|
300
|
+
parameterPattern: '[a-z][A-Za-z0-9]*'
|
|
301
|
+
privateParameterPattern: '[a-z][A-Za-z0-9]*'
|
|
302
|
+
excludeClassPattern: '$^'
|
|
303
|
+
EnumNaming:
|
|
304
|
+
active: true
|
|
305
|
+
excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
|
|
306
|
+
enumEntryPattern: '^[A-Z][_a-zA-Z0-9]*'
|
|
307
|
+
ForbiddenClassName:
|
|
308
|
+
active: true
|
|
309
|
+
excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
|
|
310
|
+
forbiddenName: ''
|
|
311
|
+
FunctionMaxLength:
|
|
312
|
+
active: true
|
|
313
|
+
excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
|
|
314
|
+
maximumFunctionNameLength: 30
|
|
315
|
+
FunctionMinLength:
|
|
316
|
+
active: true
|
|
317
|
+
excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
|
|
318
|
+
minimumFunctionNameLength: 3
|
|
319
|
+
FunctionNaming:
|
|
320
|
+
active: true
|
|
321
|
+
excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
|
|
322
|
+
functionPattern: '^([a-z$][a-zA-Z$0-9]*)|(`.*`)$'
|
|
323
|
+
excludeClassPattern: '$^'
|
|
324
|
+
ignoreOverridden: true
|
|
325
|
+
FunctionParameterNaming:
|
|
326
|
+
active: true
|
|
327
|
+
excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
|
|
328
|
+
parameterPattern: '[a-z][A-Za-z0-9]*'
|
|
329
|
+
excludeClassPattern: '$^'
|
|
330
|
+
ignoreOverridden: true
|
|
331
|
+
InvalidPackageDeclaration:
|
|
332
|
+
active: true
|
|
333
|
+
rootPackage: ''
|
|
334
|
+
MatchingDeclarationName:
|
|
335
|
+
active: true
|
|
336
|
+
MemberNameEqualsClassName:
|
|
337
|
+
active: true
|
|
338
|
+
ignoreOverridden: true
|
|
339
|
+
ObjectPropertyNaming:
|
|
340
|
+
active: true
|
|
341
|
+
excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
|
|
342
|
+
constantPattern: '[A-Za-z][_A-Za-z0-9]*'
|
|
343
|
+
propertyPattern: '[A-Za-z][_A-Za-z0-9]*'
|
|
344
|
+
privatePropertyPattern: '(_)?[A-Za-z][_A-Za-z0-9]*'
|
|
345
|
+
PackageNaming:
|
|
346
|
+
active: true
|
|
347
|
+
excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
|
|
348
|
+
packagePattern: '^[a-z]+(\.[a-z][A-Za-z0-9]*)*$'
|
|
349
|
+
TopLevelPropertyNaming:
|
|
350
|
+
active: true
|
|
351
|
+
excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
|
|
352
|
+
constantPattern: '[A-Z][_A-Z0-9]*'
|
|
353
|
+
propertyPattern: '[A-Za-z][_A-Za-z0-9]*'
|
|
354
|
+
privatePropertyPattern: '_?[A-Za-z][_A-Za-z0-9]*'
|
|
355
|
+
VariableMaxLength:
|
|
356
|
+
active: true
|
|
357
|
+
excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
|
|
358
|
+
maximumVariableNameLength: 64
|
|
359
|
+
VariableMinLength:
|
|
360
|
+
active: true
|
|
361
|
+
excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
|
|
362
|
+
minimumVariableNameLength: 1
|
|
363
|
+
VariableNaming:
|
|
364
|
+
active: true
|
|
365
|
+
excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
|
|
366
|
+
variablePattern: '[a-z][A-Za-z0-9]*'
|
|
367
|
+
privateVariablePattern: '(_)?[a-z][A-Za-z0-9]*'
|
|
368
|
+
excludeClassPattern: '$^'
|
|
369
|
+
ignoreOverridden: true
|
|
370
|
+
|
|
371
|
+
performance:
|
|
372
|
+
active: true
|
|
373
|
+
ArrayPrimitive:
|
|
374
|
+
active: true
|
|
375
|
+
ForEachOnRange:
|
|
376
|
+
active: true
|
|
377
|
+
excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
|
|
378
|
+
SpreadOperator:
|
|
379
|
+
active: true
|
|
380
|
+
excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
|
|
381
|
+
UnnecessaryTemporaryInstantiation:
|
|
382
|
+
active: true
|
|
383
|
+
|
|
384
|
+
potential-bugs:
|
|
385
|
+
active: true
|
|
386
|
+
Deprecation:
|
|
387
|
+
active: true
|
|
388
|
+
DuplicateCaseInWhenExpression:
|
|
389
|
+
active: true
|
|
390
|
+
EqualsAlwaysReturnsTrueOrFalse:
|
|
391
|
+
active: true
|
|
392
|
+
EqualsWithHashCodeExist:
|
|
393
|
+
active: true
|
|
394
|
+
ExplicitGarbageCollectionCall:
|
|
395
|
+
active: true
|
|
396
|
+
HasPlatformType:
|
|
397
|
+
active: true
|
|
398
|
+
InvalidRange:
|
|
399
|
+
active: true
|
|
400
|
+
IteratorHasNextCallsNextMethod:
|
|
401
|
+
active: true
|
|
402
|
+
IteratorNotThrowingNoSuchElementException:
|
|
403
|
+
active: true
|
|
404
|
+
LateinitUsage:
|
|
405
|
+
active: false
|
|
406
|
+
excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
|
|
407
|
+
excludeAnnotatedProperties: ""
|
|
408
|
+
ignoreOnClassesPattern: ""
|
|
409
|
+
MissingWhenCase:
|
|
410
|
+
active: true
|
|
411
|
+
RedundantElseInWhen:
|
|
412
|
+
active: true
|
|
413
|
+
UnconditionalJumpStatementInLoop:
|
|
414
|
+
active: true
|
|
415
|
+
UnreachableCode:
|
|
416
|
+
active: true
|
|
417
|
+
UnsafeCallOnNullableType:
|
|
418
|
+
active: true
|
|
419
|
+
UnsafeCast:
|
|
420
|
+
active: true
|
|
421
|
+
UselessPostfixExpression:
|
|
422
|
+
active: true
|
|
423
|
+
WrongEqualsTypeParameter:
|
|
424
|
+
active: true
|
|
425
|
+
|
|
426
|
+
style:
|
|
427
|
+
active: false
|
|
428
|
+
CollapsibleIfStatements:
|
|
429
|
+
active: true
|
|
430
|
+
DataClassContainsFunctions:
|
|
431
|
+
active: true
|
|
432
|
+
conversionFunctionPrefix: 'to'
|
|
433
|
+
DataClassShouldBeImmutable:
|
|
434
|
+
active: true
|
|
435
|
+
EqualsNullCall:
|
|
436
|
+
active: true
|
|
437
|
+
EqualsOnSignatureLine:
|
|
438
|
+
active: true
|
|
439
|
+
ExplicitItLambdaParameter:
|
|
440
|
+
active: true
|
|
441
|
+
ExpressionBodySyntax:
|
|
442
|
+
active: false
|
|
443
|
+
includeLineWrapping: false
|
|
444
|
+
ForbiddenComment:
|
|
445
|
+
active: true
|
|
446
|
+
values: 'TODO:,FIXME:,STOPSHIP:'
|
|
447
|
+
allowedPatterns: ""
|
|
448
|
+
ForbiddenImport:
|
|
449
|
+
active: true
|
|
450
|
+
imports: ''
|
|
451
|
+
forbiddenPatterns: ""
|
|
452
|
+
ForbiddenVoid:
|
|
453
|
+
active: true
|
|
454
|
+
ignoreOverridden: false
|
|
455
|
+
ignoreUsageInGenerics: true
|
|
456
|
+
FunctionOnlyReturningConstant:
|
|
457
|
+
active: true
|
|
458
|
+
ignoreOverridableFunction: true
|
|
459
|
+
excludedFunctions: 'describeContents'
|
|
460
|
+
excludeAnnotatedFunction: "dagger.Provides"
|
|
461
|
+
LibraryCodeMustSpecifyReturnType:
|
|
462
|
+
active: true
|
|
463
|
+
LoopWithTooManyJumpStatements:
|
|
464
|
+
active: true
|
|
465
|
+
maxJumpCount: 1
|
|
466
|
+
MagicNumber:
|
|
467
|
+
active: true
|
|
468
|
+
excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
|
|
469
|
+
ignoreNumbers: '-1,0,1,2'
|
|
470
|
+
ignoreHashCodeFunction: true
|
|
471
|
+
ignorePropertyDeclaration: false
|
|
472
|
+
ignoreConstantDeclaration: true
|
|
473
|
+
ignoreCompanionObjectPropertyDeclaration: true
|
|
474
|
+
ignoreAnnotation: false
|
|
475
|
+
ignoreNamedArgument: true
|
|
476
|
+
ignoreEnums: false
|
|
477
|
+
ignoreRanges: false
|
|
478
|
+
MandatoryBracesIfStatements:
|
|
479
|
+
active: true
|
|
480
|
+
MaxLineLength:
|
|
481
|
+
active: true
|
|
482
|
+
maxLineLength: 120
|
|
483
|
+
excludePackageStatements: true
|
|
484
|
+
excludeImportStatements: true
|
|
485
|
+
excludeCommentStatements: false
|
|
486
|
+
MayBeConst:
|
|
487
|
+
active: true
|
|
488
|
+
ModifierOrder:
|
|
489
|
+
active: true
|
|
490
|
+
NestedClassesVisibility:
|
|
491
|
+
active: true
|
|
492
|
+
NewLineAtEndOfFile:
|
|
493
|
+
active: false
|
|
494
|
+
NoTabs:
|
|
495
|
+
active: true
|
|
496
|
+
OptionalAbstractKeyword:
|
|
497
|
+
active: true
|
|
498
|
+
OptionalUnit:
|
|
499
|
+
active: true
|
|
500
|
+
OptionalWhenBraces:
|
|
501
|
+
active: true
|
|
502
|
+
PreferToOverPairSyntax:
|
|
503
|
+
active: true
|
|
504
|
+
ProtectedMemberInFinalClass:
|
|
505
|
+
active: true
|
|
506
|
+
RedundantExplicitType:
|
|
507
|
+
active: true
|
|
508
|
+
RedundantVisibilityModifierRule:
|
|
509
|
+
active: true
|
|
510
|
+
ReturnCount:
|
|
511
|
+
active: true
|
|
512
|
+
max: 2
|
|
513
|
+
excludedFunctions: "equals"
|
|
514
|
+
excludeLabeled: false
|
|
515
|
+
excludeReturnFromLambda: true
|
|
516
|
+
excludeGuardClauses: true
|
|
517
|
+
SafeCast:
|
|
518
|
+
active: true
|
|
519
|
+
SerialVersionUIDInSerializableClass:
|
|
520
|
+
active: true
|
|
521
|
+
SpacingBetweenPackageAndImports:
|
|
522
|
+
active: true
|
|
523
|
+
ThrowsCount:
|
|
524
|
+
active: true
|
|
525
|
+
max: 2
|
|
526
|
+
TrailingWhitespace:
|
|
527
|
+
active: true
|
|
528
|
+
UnderscoresInNumericLiterals:
|
|
529
|
+
active: true
|
|
530
|
+
acceptableDecimalLength: 5
|
|
531
|
+
UnnecessaryAbstractClass:
|
|
532
|
+
active: true
|
|
533
|
+
excludeAnnotatedClasses: "dagger.Module"
|
|
534
|
+
UnnecessaryApply:
|
|
535
|
+
active: true
|
|
536
|
+
UnnecessaryInheritance:
|
|
537
|
+
active: true
|
|
538
|
+
UnnecessaryLet:
|
|
539
|
+
active: true
|
|
540
|
+
UnnecessaryParentheses:
|
|
541
|
+
active: true
|
|
542
|
+
UntilInsteadOfRangeTo:
|
|
543
|
+
active: true
|
|
544
|
+
UnusedImports:
|
|
545
|
+
active: true
|
|
546
|
+
UnusedPrivateClass:
|
|
547
|
+
active: true
|
|
548
|
+
UnusedPrivateMember:
|
|
549
|
+
active: true
|
|
550
|
+
allowedNames: "(_|ignored|expected|serialVersionUID)"
|
|
551
|
+
UseArrayLiteralsInAnnotations:
|
|
552
|
+
active: true
|
|
553
|
+
UseCheckOrError:
|
|
554
|
+
active: true
|
|
555
|
+
UseDataClass:
|
|
556
|
+
active: true
|
|
557
|
+
excludeAnnotatedClasses: ""
|
|
558
|
+
allowVars: true
|
|
559
|
+
UseIfInsteadOfWhen:
|
|
560
|
+
active: true
|
|
561
|
+
UseRequire:
|
|
562
|
+
active: true
|
|
563
|
+
UselessCallOnNotNull:
|
|
564
|
+
active: true
|
|
565
|
+
UtilityClassWithPublicConstructor:
|
|
566
|
+
active: true
|
|
567
|
+
VarCouldBeVal:
|
|
568
|
+
active: true
|
|
569
|
+
WildcardImport:
|
|
570
|
+
active: true
|
|
571
|
+
excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
|
|
572
|
+
excludeImports: 'java.util.*,kotlinx.android.synthetic.*'
|
|
@@ -59,4 +59,8 @@ internal class DatadogSDKWrapper : DatadogWrapper {
|
|
|
59
59
|
override fun telemetryError(message: String, stack: String?, kind: String?) {
|
|
60
60
|
Datadog._internal._telemetry.error(message, stack, kind)
|
|
61
61
|
}
|
|
62
|
+
|
|
63
|
+
override fun telemetryError(message: String, throwable: Throwable?) {
|
|
64
|
+
Datadog._internal._telemetry.error(message, throwable)
|
|
65
|
+
}
|
|
62
66
|
}
|
|
@@ -85,12 +85,17 @@ interface DatadogWrapper {
|
|
|
85
85
|
fun setTrackingConsent(trackingConsent: TrackingConsent)
|
|
86
86
|
|
|
87
87
|
/**
|
|
88
|
-
* Sends telemetry debug event
|
|
88
|
+
* Sends telemetry debug event.
|
|
89
89
|
*/
|
|
90
90
|
fun telemetryDebug(message: String)
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
|
-
* Sends telemetry error
|
|
93
|
+
* Sends telemetry error.
|
|
94
94
|
*/
|
|
95
95
|
fun telemetryError(message: String, stack: String?, kind: String?)
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Sends telemetry error.
|
|
99
|
+
*/
|
|
100
|
+
fun telemetryError(message: String, throwable: Throwable?)
|
|
96
101
|
}
|