@callstack/react-native-brownfield 3.12.0 → 3.13.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.
Files changed (68) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/gradle-plugin/brownfield/build.gradle.kts +134 -0
  3. package/gradle-plugin/brownfield/config/detekt/detekt.yml +936 -0
  4. package/gradle-plugin/brownfield/gradle/libs.versions.toml +19 -0
  5. package/gradle-plugin/brownfield/gradle/wrapper/gradle-wrapper.jar +0 -0
  6. package/gradle-plugin/brownfield/gradle/wrapper/gradle-wrapper.properties +7 -0
  7. package/gradle-plugin/brownfield/gradle.properties +14 -0
  8. package/gradle-plugin/brownfield/gradlew +249 -0
  9. package/gradle-plugin/brownfield/gradlew.bat +92 -0
  10. package/gradle-plugin/brownfield/settings.gradle +7 -0
  11. package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/artifacts/ArtifactsResolver.kt +132 -0
  12. package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/exceptions/NameSpaceNotFound.kt +4 -0
  13. package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/exceptions/TaskNotFound.kt +4 -0
  14. package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/expo/ExpoPublishingHelper.kt +432 -0
  15. package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/expo/utils/BrownfieldPrimitives.kt +31 -0
  16. package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/expo/utils/ExpoProjectionPrimitives.kt +22 -0
  17. package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/expo/utils/LocalMavenUtils.kt +83 -0
  18. package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/expo/utils/ReflectionUtils.kt +79 -0
  19. package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/expo/utils/VersionMediatingDependencySet.kt +100 -0
  20. package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/plugin/CustomDependencyResolver.kt +50 -0
  21. package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/plugin/ProjectConfigurations.kt +107 -0
  22. package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/plugin/RClassTransformer.kt +131 -0
  23. package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/plugin/RNBrownfieldPlugin.kt +171 -0
  24. package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/plugin/RNSourceSets.kt +149 -0
  25. package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/processors/AssetTaskProcessor.kt +29 -0
  26. package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/processors/ExplodeTaskProvider.kt +63 -0
  27. package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/processors/JNILibsProcessor.kt +165 -0
  28. package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/processors/ManifestTaskProcessor.kt +74 -0
  29. package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/processors/MergeProcessor.kt +55 -0
  30. package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/processors/ProguardProcessor.kt +61 -0
  31. package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/processors/ResourceTaskProcessor.kt +26 -0
  32. package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/processors/VariantHelper.kt +61 -0
  33. package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/processors/VariantPackagesProperty.kt +21 -0
  34. package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/processors/VariantTaskProvider.kt +103 -0
  35. package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/shared/BaseProject.kt +17 -0
  36. package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/shared/BundleTaskProvider.kt +46 -0
  37. package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/shared/Constants.kt +58 -0
  38. package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/shared/ExplodeAarTask.kt +72 -0
  39. package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/shared/GradleILogger.kt +59 -0
  40. package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/shared/Logging.kt +24 -0
  41. package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/shared/ModuleInfo.kt +22 -0
  42. package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/utils/AndroidArchiveLibrary.kt +77 -0
  43. package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/utils/DirectoryManager.kt +20 -0
  44. package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/utils/Extension.kt +44 -0
  45. package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/utils/StringExtensions.kt +5 -0
  46. package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/utils/StringMatcher.kt +21 -0
  47. package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/utils/Utils.kt +59 -0
  48. package/ios/Expo/ExpoHostRuntime.swift +3 -2
  49. package/ios/ReactNativeBrownfield.swift +1 -1
  50. package/ios/Vanilla/ReactNativeHostRuntime.swift +5 -2
  51. package/ios/swiftpm/Sources/BrownfieldBundleSupport/BrownfieldBundleURLResolver.swift +11 -5
  52. package/ios/swiftpm/Tests/BrownfieldBundleSupportTests/BrownfieldBundleURLResolverTests.swift +17 -5
  53. package/lib/commonjs/expo-config-plugin/ios/xcodeHelpers.js +2 -1
  54. package/lib/commonjs/expo-config-plugin/ios/xcodeHelpers.js.map +1 -1
  55. package/lib/commonjs/index.js.map +1 -1
  56. package/lib/module/expo-config-plugin/ios/xcodeHelpers.js +2 -1
  57. package/lib/module/expo-config-plugin/ios/xcodeHelpers.js.map +1 -1
  58. package/lib/module/index.js.map +1 -1
  59. package/lib/typescript/commonjs/src/expo-config-plugin/ios/xcodeHelpers.d.ts.map +1 -1
  60. package/lib/typescript/commonjs/src/index.d.ts +1 -0
  61. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  62. package/lib/typescript/module/src/expo-config-plugin/ios/xcodeHelpers.d.ts.map +1 -1
  63. package/lib/typescript/module/src/index.d.ts +1 -0
  64. package/lib/typescript/module/src/index.d.ts.map +1 -1
  65. package/package.json +6 -4
  66. package/scripts/sync-gradle-plugin-source.js +58 -0
  67. package/src/expo-config-plugin/ios/xcodeHelpers.ts +14 -0
  68. package/src/index.ts +2 -0
@@ -0,0 +1,936 @@
1
+ build:
2
+ maxIssues: 0
3
+ excludeCorrectable: false
4
+ weights:
5
+ # complexity: 2
6
+ # LongParameterList: 1
7
+ # style: 1
8
+ # comments: 1
9
+
10
+ config:
11
+ validation: true
12
+ warningsAsErrors: false
13
+ checkExhaustiveness: false
14
+ # when writing own rules with new properties, exclude the property path e.g.: 'my_rule_set,.*>.*>[my_property]'
15
+ excludes: ''
16
+
17
+ processors:
18
+ active: true
19
+ exclude:
20
+ - 'DetektProgressListener'
21
+ # - 'KtFileCountProcessor'
22
+ # - 'PackageCountProcessor'
23
+ # - 'ClassCountProcessor'
24
+ # - 'FunctionCountProcessor'
25
+ # - 'PropertyCountProcessor'
26
+ # - 'ProjectComplexityProcessor'
27
+ # - 'ProjectCognitiveComplexityProcessor'
28
+ # - 'ProjectLLOCProcessor'
29
+ # - 'ProjectCLOCProcessor'
30
+ # - 'ProjectLOCProcessor'
31
+ # - 'ProjectSLOCProcessor'
32
+ # - 'LicenseHeaderLoaderExtension'
33
+
34
+ console-reports:
35
+ active: true
36
+ exclude:
37
+ - 'ProjectStatisticsReport'
38
+ - 'ComplexityReport'
39
+ - 'NotificationReport'
40
+ - 'FindingsReport'
41
+ - 'FileBasedFindingsReport'
42
+ # - 'LiteFindingsReport'
43
+
44
+ output-reports:
45
+ active: true
46
+ exclude:
47
+ # - 'TxtOutputReport'
48
+ # - 'XmlOutputReport'
49
+ # - 'HtmlOutputReport'
50
+ # - 'MdOutputReport'
51
+ # - 'SarifOutputReport'
52
+
53
+ comments:
54
+ active: true
55
+ AbsentOrWrongFileLicense:
56
+ active: false
57
+ licenseTemplateFile: 'license.template'
58
+ licenseTemplateIsRegex: false
59
+ CommentOverPrivateFunction:
60
+ active: false
61
+ CommentOverPrivateProperty:
62
+ active: false
63
+ DeprecatedBlockTag:
64
+ active: false
65
+ EndOfSentenceFormat:
66
+ active: false
67
+ endOfSentenceFormat: '([.?!][ \t\n\r\f<])|([.?!:]$)'
68
+ KDocReferencesNonPublicProperty:
69
+ active: false
70
+ excludes:
71
+ [
72
+ '**/test/**',
73
+ '**/androidTest/**',
74
+ '**/commonTest/**',
75
+ '**/jvmTest/**',
76
+ '**/androidUnitTest/**',
77
+ '**/androidInstrumentedTest/**',
78
+ '**/jsTest/**',
79
+ '**/iosTest/**',
80
+ ]
81
+ OutdatedDocumentation:
82
+ active: false
83
+ matchTypeParameters: true
84
+ matchDeclarationsOrder: true
85
+ allowParamOnConstructorProperties: false
86
+ UndocumentedPublicClass:
87
+ active: false
88
+ excludes:
89
+ [
90
+ '**/test/**',
91
+ '**/androidTest/**',
92
+ '**/commonTest/**',
93
+ '**/jvmTest/**',
94
+ '**/androidUnitTest/**',
95
+ '**/androidInstrumentedTest/**',
96
+ '**/jsTest/**',
97
+ '**/iosTest/**',
98
+ ]
99
+ searchInNestedClass: true
100
+ searchInInnerClass: true
101
+ searchInInnerObject: true
102
+ searchInInnerInterface: true
103
+ searchInProtectedClass: false
104
+ UndocumentedPublicFunction:
105
+ active: false
106
+ excludes:
107
+ [
108
+ '**/test/**',
109
+ '**/androidTest/**',
110
+ '**/commonTest/**',
111
+ '**/jvmTest/**',
112
+ '**/androidUnitTest/**',
113
+ '**/androidInstrumentedTest/**',
114
+ '**/jsTest/**',
115
+ '**/iosTest/**',
116
+ ]
117
+ searchProtectedFunction: false
118
+ UndocumentedPublicProperty:
119
+ active: false
120
+ excludes:
121
+ [
122
+ '**/test/**',
123
+ '**/androidTest/**',
124
+ '**/commonTest/**',
125
+ '**/jvmTest/**',
126
+ '**/androidUnitTest/**',
127
+ '**/androidInstrumentedTest/**',
128
+ '**/jsTest/**',
129
+ '**/iosTest/**',
130
+ ]
131
+ searchProtectedProperty: false
132
+
133
+ complexity:
134
+ active: true
135
+ CognitiveComplexMethod:
136
+ active: false
137
+ threshold: 15
138
+ ComplexCondition:
139
+ active: false # turning it off
140
+ threshold: 4
141
+ ComplexInterface:
142
+ active: false
143
+ threshold: 10
144
+ includeStaticDeclarations: false
145
+ includePrivateDeclarations: false
146
+ ignoreOverloaded: false
147
+ CyclomaticComplexMethod:
148
+ active: false # turning it off
149
+ threshold: 15
150
+ ignoreSingleWhenExpression: false
151
+ ignoreSimpleWhenEntries: false
152
+ ignoreNestingFunctions: false
153
+ nestingFunctions:
154
+ - 'also'
155
+ - 'apply'
156
+ - 'forEach'
157
+ - 'isNotNull'
158
+ - 'ifNull'
159
+ - 'let'
160
+ - 'run'
161
+ - 'use'
162
+ - 'with'
163
+ LabeledExpression:
164
+ active: false
165
+ ignoredLabels: []
166
+ LargeClass:
167
+ active: true
168
+ threshold: 600
169
+ LongMethod:
170
+ active: true
171
+ threshold: 60
172
+ LongParameterList:
173
+ active: false # turning it off
174
+ functionThreshold: 6
175
+ constructorThreshold: 7
176
+ ignoreDefaultParameters: false
177
+ ignoreDataClasses: true
178
+ ignoreAnnotatedParameter: []
179
+ MethodOverloading:
180
+ active: false
181
+ threshold: 6
182
+ NamedArguments:
183
+ active: false
184
+ threshold: 3
185
+ ignoreArgumentsMatchingNames: false
186
+ NestedBlockDepth:
187
+ active: true
188
+ threshold: 4
189
+ NestedScopeFunctions:
190
+ active: false
191
+ threshold: 1
192
+ functions:
193
+ - 'kotlin.apply'
194
+ - 'kotlin.run'
195
+ - 'kotlin.with'
196
+ - 'kotlin.let'
197
+ - 'kotlin.also'
198
+ ReplaceSafeCallChainWithRun:
199
+ active: false
200
+ StringLiteralDuplication:
201
+ active: false
202
+ excludes:
203
+ [
204
+ '**/test/**',
205
+ '**/androidTest/**',
206
+ '**/commonTest/**',
207
+ '**/jvmTest/**',
208
+ '**/androidUnitTest/**',
209
+ '**/androidInstrumentedTest/**',
210
+ '**/jsTest/**',
211
+ '**/iosTest/**',
212
+ ]
213
+ threshold: 3
214
+ ignoreAnnotation: true
215
+ excludeStringsWithLessThan5Characters: true
216
+ ignoreStringsRegex: '$^'
217
+ TooManyFunctions:
218
+ active: false # Turning it off
219
+ excludes:
220
+ [
221
+ '**/test/**',
222
+ '**/androidTest/**',
223
+ '**/commonTest/**',
224
+ '**/jvmTest/**',
225
+ '**/androidUnitTest/**',
226
+ '**/androidInstrumentedTest/**',
227
+ '**/jsTest/**',
228
+ '**/iosTest/**',
229
+ ]
230
+ thresholdInFiles: 11
231
+ thresholdInClasses: 11
232
+ thresholdInInterfaces: 11
233
+ thresholdInObjects: 11
234
+ thresholdInEnums: 11
235
+ ignoreDeprecated: false
236
+ ignorePrivate: false
237
+ ignoreOverridden: false
238
+ ignoreAnnotatedFunctions: []
239
+
240
+ coroutines:
241
+ active: true
242
+ GlobalCoroutineUsage:
243
+ active: false
244
+ InjectDispatcher:
245
+ active: true
246
+ dispatcherNames:
247
+ - 'IO'
248
+ - 'Default'
249
+ - 'Unconfined'
250
+ RedundantSuspendModifier:
251
+ active: true
252
+ SleepInsteadOfDelay:
253
+ active: true
254
+ SuspendFunSwallowedCancellation:
255
+ active: false
256
+ SuspendFunWithCoroutineScopeReceiver:
257
+ active: false
258
+ SuspendFunWithFlowReturnType:
259
+ active: true
260
+
261
+ empty-blocks:
262
+ active: true
263
+ EmptyCatchBlock:
264
+ active: true
265
+ allowedExceptionNameRegex: '_|(ignore|expected).*'
266
+ EmptyClassBlock:
267
+ active: true
268
+ EmptyDefaultConstructor:
269
+ active: true
270
+ EmptyDoWhileBlock:
271
+ active: true
272
+ EmptyElseBlock:
273
+ active: true
274
+ EmptyFinallyBlock:
275
+ active: true
276
+ EmptyForBlock:
277
+ active: true
278
+ EmptyFunctionBlock:
279
+ active: true
280
+ ignoreOverridden: false
281
+ EmptyIfBlock:
282
+ active: true
283
+ EmptyInitBlock:
284
+ active: true
285
+ EmptyKtFile:
286
+ active: true
287
+ EmptySecondaryConstructor:
288
+ active: true
289
+ EmptyTryBlock:
290
+ active: true
291
+ EmptyWhenBlock:
292
+ active: true
293
+ EmptyWhileBlock:
294
+ active: true
295
+
296
+ exceptions:
297
+ active: true
298
+ ExceptionRaisedInUnexpectedLocation:
299
+ active: true
300
+ methodNames:
301
+ - 'equals'
302
+ - 'finalize'
303
+ - 'hashCode'
304
+ - 'toString'
305
+ InstanceOfCheckForException:
306
+ active: true
307
+ excludes:
308
+ [
309
+ '**/test/**',
310
+ '**/androidTest/**',
311
+ '**/commonTest/**',
312
+ '**/jvmTest/**',
313
+ '**/androidUnitTest/**',
314
+ '**/androidInstrumentedTest/**',
315
+ '**/jsTest/**',
316
+ '**/iosTest/**',
317
+ ]
318
+ NotImplementedDeclaration:
319
+ active: false
320
+ ObjectExtendsThrowable:
321
+ active: false
322
+ PrintStackTrace:
323
+ active: true
324
+ RethrowCaughtException:
325
+ active: true
326
+ ReturnFromFinally:
327
+ active: true
328
+ ignoreLabeled: false
329
+ SwallowedException:
330
+ active: true
331
+ ignoredExceptionTypes:
332
+ - 'InterruptedException'
333
+ - 'MalformedURLException'
334
+ - 'NumberFormatException'
335
+ - 'ParseException'
336
+ allowedExceptionNameRegex: '_|(ignore|expected).*'
337
+ ThrowingExceptionFromFinally:
338
+ active: true
339
+ ThrowingExceptionInMain:
340
+ active: false
341
+ ThrowingExceptionsWithoutMessageOrCause:
342
+ active: true
343
+ excludes:
344
+ [
345
+ '**/test/**',
346
+ '**/androidTest/**',
347
+ '**/commonTest/**',
348
+ '**/jvmTest/**',
349
+ '**/androidUnitTest/**',
350
+ '**/androidInstrumentedTest/**',
351
+ '**/jsTest/**',
352
+ '**/iosTest/**',
353
+ ]
354
+ exceptions:
355
+ - 'ArrayIndexOutOfBoundsException'
356
+ - 'Exception'
357
+ - 'IllegalArgumentException'
358
+ - 'IllegalMonitorStateException'
359
+ - 'IllegalStateException'
360
+ - 'IndexOutOfBoundsException'
361
+ - 'NullPointerException'
362
+ - 'RuntimeException'
363
+ - 'Throwable'
364
+ ThrowingNewInstanceOfSameException:
365
+ active: true
366
+ TooGenericExceptionCaught:
367
+ active: true
368
+ excludes:
369
+ [
370
+ '**/test/**',
371
+ '**/androidTest/**',
372
+ '**/commonTest/**',
373
+ '**/jvmTest/**',
374
+ '**/androidUnitTest/**',
375
+ '**/androidInstrumentedTest/**',
376
+ '**/jsTest/**',
377
+ '**/iosTest/**',
378
+ ]
379
+ exceptionNames:
380
+ - 'ArrayIndexOutOfBoundsException'
381
+ - 'Error'
382
+ - 'Exception'
383
+ - 'IllegalMonitorStateException'
384
+ - 'IndexOutOfBoundsException'
385
+ - 'NullPointerException'
386
+ - 'RuntimeException'
387
+ - 'Throwable'
388
+ allowedExceptionNameRegex: '_|(ignore|expected).*'
389
+ TooGenericExceptionThrown:
390
+ active: true
391
+ exceptionNames:
392
+ - 'Error'
393
+ - 'Exception'
394
+ - 'RuntimeException'
395
+ - 'Throwable'
396
+
397
+ naming:
398
+ active: true
399
+ BooleanPropertyNaming:
400
+ active: false
401
+ allowedPattern: '^(is|has|are)'
402
+ ClassNaming:
403
+ active: true
404
+ classPattern: '[A-Z][a-zA-Z0-9]*'
405
+ ConstructorParameterNaming:
406
+ active: true
407
+ parameterPattern: '[a-z][A-Za-z0-9]*'
408
+ privateParameterPattern: '[a-z][A-Za-z0-9]*'
409
+ excludeClassPattern: '$^'
410
+ EnumNaming:
411
+ active: true
412
+ enumEntryPattern: '[A-Z][_a-zA-Z0-9]*'
413
+ ForbiddenClassName:
414
+ active: false
415
+ forbiddenName: []
416
+ FunctionMaxLength:
417
+ active: false
418
+ maximumFunctionNameLength: 30
419
+ FunctionMinLength:
420
+ active: false
421
+ minimumFunctionNameLength: 3
422
+ FunctionNaming:
423
+ active: true
424
+ excludes:
425
+ [
426
+ '**/test/**',
427
+ '**/androidTest/**',
428
+ '**/commonTest/**',
429
+ '**/jvmTest/**',
430
+ '**/androidUnitTest/**',
431
+ '**/androidInstrumentedTest/**',
432
+ '**/jsTest/**',
433
+ '**/iosTest/**',
434
+ ]
435
+ functionPattern: '[a-z][a-zA-Z0-9]*'
436
+ excludeClassPattern: '$^'
437
+ FunctionParameterNaming:
438
+ active: true
439
+ parameterPattern: '[a-z][A-Za-z0-9]*'
440
+ excludeClassPattern: '$^'
441
+ InvalidPackageDeclaration:
442
+ active: true
443
+ rootPackage: ''
444
+ requireRootInDeclaration: false
445
+ LambdaParameterNaming:
446
+ active: false
447
+ parameterPattern: '[a-z][A-Za-z0-9]*|_'
448
+ MatchingDeclarationName:
449
+ active: true
450
+ mustBeFirst: true
451
+ MemberNameEqualsClassName:
452
+ active: true
453
+ ignoreOverridden: true
454
+ NoNameShadowing:
455
+ active: true
456
+ NonBooleanPropertyPrefixedWithIs:
457
+ active: false
458
+ ObjectPropertyNaming:
459
+ active: true
460
+ constantPattern: '[A-Za-z][_A-Za-z0-9]*'
461
+ propertyPattern: '[A-Za-z][_A-Za-z0-9]*'
462
+ privatePropertyPattern: '(_)?[A-Za-z][_A-Za-z0-9]*'
463
+ PackageNaming:
464
+ active: true
465
+ packagePattern: '[a-z]+(\.[a-z][A-Za-z0-9]*)*'
466
+ TopLevelPropertyNaming:
467
+ active: true
468
+ constantPattern: '[A-Z][_A-Z0-9]*'
469
+ propertyPattern: '[A-Za-z][_A-Za-z0-9]*'
470
+ privatePropertyPattern: '_?[A-Za-z][_A-Za-z0-9]*'
471
+ VariableMaxLength:
472
+ active: false
473
+ maximumVariableNameLength: 64
474
+ VariableMinLength:
475
+ active: false
476
+ minimumVariableNameLength: 1
477
+ VariableNaming:
478
+ active: true
479
+ variablePattern: '[a-z][A-Za-z0-9]*'
480
+ privateVariablePattern: '(_)?[a-z][A-Za-z0-9]*'
481
+ excludeClassPattern: '$^'
482
+
483
+ performance:
484
+ active: true
485
+ ArrayPrimitive:
486
+ active: true
487
+ CouldBeSequence:
488
+ active: false
489
+ threshold: 3
490
+ ForEachOnRange:
491
+ active: true
492
+ excludes:
493
+ [
494
+ '**/test/**',
495
+ '**/androidTest/**',
496
+ '**/commonTest/**',
497
+ '**/jvmTest/**',
498
+ '**/androidUnitTest/**',
499
+ '**/androidInstrumentedTest/**',
500
+ '**/jsTest/**',
501
+ '**/iosTest/**',
502
+ ]
503
+ SpreadOperator:
504
+ active: true
505
+ excludes:
506
+ [
507
+ '**/test/**',
508
+ '**/androidTest/**',
509
+ '**/commonTest/**',
510
+ '**/jvmTest/**',
511
+ '**/androidUnitTest/**',
512
+ '**/androidInstrumentedTest/**',
513
+ '**/jsTest/**',
514
+ '**/iosTest/**',
515
+ ]
516
+ UnnecessaryPartOfBinaryExpression:
517
+ active: false
518
+ UnnecessaryTemporaryInstantiation:
519
+ active: true
520
+
521
+ potential-bugs:
522
+ active: true
523
+ AvoidReferentialEquality:
524
+ active: true
525
+ forbiddenTypePatterns:
526
+ - 'kotlin.String'
527
+ CastNullableToNonNullableType:
528
+ active: false
529
+ CastToNullableType:
530
+ active: false
531
+ Deprecation:
532
+ active: false
533
+ DontDowncastCollectionTypes:
534
+ active: false
535
+ DoubleMutabilityForCollection:
536
+ active: true
537
+ mutableTypes:
538
+ - 'kotlin.collections.MutableList'
539
+ - 'kotlin.collections.MutableMap'
540
+ - 'kotlin.collections.MutableSet'
541
+ - 'java.util.ArrayList'
542
+ - 'java.util.LinkedHashSet'
543
+ - 'java.util.HashSet'
544
+ - 'java.util.LinkedHashMap'
545
+ - 'java.util.HashMap'
546
+ ElseCaseInsteadOfExhaustiveWhen:
547
+ active: false
548
+ ignoredSubjectTypes: []
549
+ EqualsAlwaysReturnsTrueOrFalse:
550
+ active: true
551
+ EqualsWithHashCodeExist:
552
+ active: true
553
+ ExitOutsideMain:
554
+ active: false
555
+ ExplicitGarbageCollectionCall:
556
+ active: true
557
+ HasPlatformType:
558
+ active: true
559
+ IgnoredReturnValue:
560
+ active: true
561
+ restrictToConfig: true
562
+ returnValueAnnotations:
563
+ - 'CheckResult'
564
+ - '*.CheckResult'
565
+ - 'CheckReturnValue'
566
+ - '*.CheckReturnValue'
567
+ ignoreReturnValueAnnotations:
568
+ - 'CanIgnoreReturnValue'
569
+ - '*.CanIgnoreReturnValue'
570
+ returnValueTypes:
571
+ - 'kotlin.sequences.Sequence'
572
+ - 'kotlinx.coroutines.flow.*Flow'
573
+ - 'java.util.stream.*Stream'
574
+ ignoreFunctionCall: []
575
+ ImplicitDefaultLocale:
576
+ active: true
577
+ ImplicitUnitReturnType:
578
+ active: false
579
+ allowExplicitReturnType: true
580
+ InvalidRange:
581
+ active: true
582
+ IteratorHasNextCallsNextMethod:
583
+ active: true
584
+ IteratorNotThrowingNoSuchElementException:
585
+ active: true
586
+ LateinitUsage:
587
+ active: false
588
+ excludes:
589
+ [
590
+ '**/test/**',
591
+ '**/androidTest/**',
592
+ '**/commonTest/**',
593
+ '**/jvmTest/**',
594
+ '**/androidUnitTest/**',
595
+ '**/androidInstrumentedTest/**',
596
+ '**/jsTest/**',
597
+ '**/iosTest/**',
598
+ ]
599
+ ignoreOnClassesPattern: ''
600
+ MapGetWithNotNullAssertionOperator:
601
+ active: true
602
+ MissingPackageDeclaration:
603
+ active: false
604
+ excludes: ['**/*.kts']
605
+ NullCheckOnMutableProperty:
606
+ active: false
607
+ NullableToStringCall:
608
+ active: false
609
+ PropertyUsedBeforeDeclaration:
610
+ active: false
611
+ UnconditionalJumpStatementInLoop:
612
+ active: false
613
+ UnnecessaryNotNullCheck:
614
+ active: false
615
+ UnnecessaryNotNullOperator:
616
+ active: true
617
+ UnnecessarySafeCall:
618
+ active: true
619
+ UnreachableCatchBlock:
620
+ active: true
621
+ UnreachableCode:
622
+ active: true
623
+ UnsafeCallOnNullableType:
624
+ active: true
625
+ excludes:
626
+ [
627
+ '**/test/**',
628
+ '**/androidTest/**',
629
+ '**/commonTest/**',
630
+ '**/jvmTest/**',
631
+ '**/androidUnitTest/**',
632
+ '**/androidInstrumentedTest/**',
633
+ '**/jsTest/**',
634
+ '**/iosTest/**',
635
+ ]
636
+ UnsafeCast:
637
+ active: true
638
+ UnusedUnaryOperator:
639
+ active: true
640
+ UselessPostfixExpression:
641
+ active: true
642
+ WrongEqualsTypeParameter:
643
+ active: true
644
+
645
+ style:
646
+ active: true
647
+ AlsoCouldBeApply:
648
+ active: false
649
+ BracesOnIfStatements:
650
+ active: false
651
+ singleLine: 'never'
652
+ multiLine: 'always'
653
+ BracesOnWhenStatements:
654
+ active: false
655
+ singleLine: 'necessary'
656
+ multiLine: 'consistent'
657
+ CanBeNonNullable:
658
+ active: false
659
+ CascadingCallWrapping:
660
+ active: false
661
+ includeElvis: true
662
+ ClassOrdering:
663
+ active: false
664
+ CollapsibleIfStatements:
665
+ active: false
666
+ DataClassContainsFunctions:
667
+ active: false
668
+ conversionFunctionPrefix:
669
+ - 'to'
670
+ allowOperators: false
671
+ DataClassShouldBeImmutable:
672
+ active: false
673
+ DestructuringDeclarationWithTooManyEntries:
674
+ active: true
675
+ maxDestructuringEntries: 3
676
+ DoubleNegativeLambda:
677
+ active: false
678
+ negativeFunctions:
679
+ - reason: 'Use `takeIf` instead.'
680
+ value: 'takeUnless'
681
+ - reason: 'Use `all` instead.'
682
+ value: 'none'
683
+ negativeFunctionNameParts:
684
+ - 'not'
685
+ - 'non'
686
+ EqualsNullCall:
687
+ active: true
688
+ EqualsOnSignatureLine:
689
+ active: false
690
+ ExplicitCollectionElementAccessMethod:
691
+ active: false
692
+ ExplicitItLambdaParameter:
693
+ active: true
694
+ ExpressionBodySyntax:
695
+ active: false
696
+ includeLineWrapping: false
697
+ ForbiddenAnnotation:
698
+ active: false
699
+ annotations:
700
+ - reason: 'it is a java annotation. Use `Suppress` instead.'
701
+ value: 'java.lang.SuppressWarnings'
702
+ - reason: 'it is a java annotation. Use `kotlin.Deprecated` instead.'
703
+ value: 'java.lang.Deprecated'
704
+ - reason: 'it is a java annotation. Use `kotlin.annotation.MustBeDocumented` instead.'
705
+ value: 'java.lang.annotation.Documented'
706
+ - reason: 'it is a java annotation. Use `kotlin.annotation.Target` instead.'
707
+ value: 'java.lang.annotation.Target'
708
+ - reason: 'it is a java annotation. Use `kotlin.annotation.Retention` instead.'
709
+ value: 'java.lang.annotation.Retention'
710
+ - reason: 'it is a java annotation. Use `kotlin.annotation.Repeatable` instead.'
711
+ value: 'java.lang.annotation.Repeatable'
712
+ - reason: 'Kotlin does not support @Inherited annotation, see https://youtrack.jetbrains.com/issue/KT-22265'
713
+ value: 'java.lang.annotation.Inherited'
714
+ ForbiddenComment:
715
+ active: true
716
+ comments:
717
+ - reason: 'Forbidden FIXME todo marker in comment, please fix the problem.'
718
+ value: 'FIXME:'
719
+ - reason: 'Forbidden STOPSHIP todo marker in comment, please address the problem before shipping the code.'
720
+ value: 'STOPSHIP:'
721
+ - reason: 'Forbidden TODO todo marker in comment, please do the changes.'
722
+ value: 'TODO:'
723
+ allowedPatterns: ''
724
+ ForbiddenImport:
725
+ active: false
726
+ imports: []
727
+ forbiddenPatterns: ''
728
+ ForbiddenMethodCall:
729
+ active: false
730
+ methods:
731
+ - reason: 'print does not allow you to configure the output stream. Use a logger instead.'
732
+ value: 'kotlin.io.print'
733
+ - reason: 'println does not allow you to configure the output stream. Use a logger instead.'
734
+ value: 'kotlin.io.println'
735
+ ForbiddenSuppress:
736
+ active: false
737
+ rules: []
738
+ ForbiddenVoid:
739
+ active: true
740
+ ignoreOverridden: false
741
+ ignoreUsageInGenerics: false
742
+ FunctionOnlyReturningConstant:
743
+ active: true
744
+ ignoreOverridableFunction: true
745
+ ignoreActualFunction: true
746
+ excludedFunctions: []
747
+ LoopWithTooManyJumpStatements:
748
+ active: true
749
+ maxJumpCount: 1
750
+ MagicNumber:
751
+ active: true
752
+ excludes:
753
+ [
754
+ '**/test/**',
755
+ '**/androidTest/**',
756
+ '**/commonTest/**',
757
+ '**/jvmTest/**',
758
+ '**/androidUnitTest/**',
759
+ '**/androidInstrumentedTest/**',
760
+ '**/jsTest/**',
761
+ '**/iosTest/**',
762
+ '**/*.kts',
763
+ ]
764
+ ignoreNumbers:
765
+ - '-1'
766
+ - '0'
767
+ - '1'
768
+ - '2'
769
+ ignoreHashCodeFunction: true
770
+ ignorePropertyDeclaration: false
771
+ ignoreLocalVariableDeclaration: false
772
+ ignoreConstantDeclaration: true
773
+ ignoreCompanionObjectPropertyDeclaration: true
774
+ ignoreAnnotation: false
775
+ ignoreNamedArgument: true
776
+ ignoreEnums: false
777
+ ignoreRanges: false
778
+ ignoreExtensionFunctions: true
779
+ MandatoryBracesLoops:
780
+ active: false
781
+ MaxChainedCallsOnSameLine:
782
+ active: false
783
+ maxChainedCalls: 5
784
+ MaxLineLength:
785
+ active: false # turning it off
786
+ maxLineLength: 120
787
+ excludePackageStatements: true
788
+ excludeImportStatements: true
789
+ excludeCommentStatements: false
790
+ excludeRawStrings: true
791
+ MayBeConst:
792
+ active: true
793
+ ModifierOrder:
794
+ active: true
795
+ MultilineLambdaItParameter:
796
+ active: false
797
+ MultilineRawStringIndentation:
798
+ active: false
799
+ indentSize: 4
800
+ trimmingMethods:
801
+ - 'trimIndent'
802
+ - 'trimMargin'
803
+ NestedClassesVisibility:
804
+ active: true
805
+ NewLineAtEndOfFile:
806
+ active: true
807
+ NoTabs:
808
+ active: false
809
+ NullableBooleanCheck:
810
+ active: false
811
+ ObjectLiteralToLambda:
812
+ active: true
813
+ OptionalAbstractKeyword:
814
+ active: true
815
+ OptionalUnit:
816
+ active: false
817
+ PreferToOverPairSyntax:
818
+ active: false
819
+ ProtectedMemberInFinalClass:
820
+ active: true
821
+ RedundantExplicitType:
822
+ active: false
823
+ RedundantHigherOrderMapUsage:
824
+ active: true
825
+ RedundantVisibilityModifierRule:
826
+ active: false
827
+ ReturnCount:
828
+ active: false # turning it off
829
+ max: 2
830
+ excludedFunctions:
831
+ - 'equals'
832
+ excludeLabeled: false
833
+ excludeReturnFromLambda: true
834
+ excludeGuardClauses: false
835
+ SafeCast:
836
+ active: true
837
+ SerialVersionUIDInSerializableClass:
838
+ active: true
839
+ SpacingBetweenPackageAndImports:
840
+ active: false
841
+ StringShouldBeRawString:
842
+ active: false
843
+ maxEscapedCharacterCount: 2
844
+ ignoredCharacters: []
845
+ ThrowsCount:
846
+ active: true
847
+ max: 2
848
+ excludeGuardClauses: false
849
+ TrailingWhitespace:
850
+ active: false
851
+ TrimMultilineRawString:
852
+ active: false
853
+ trimmingMethods:
854
+ - 'trimIndent'
855
+ - 'trimMargin'
856
+ UnderscoresInNumericLiterals:
857
+ active: false
858
+ acceptableLength: 4
859
+ allowNonStandardGrouping: false
860
+ UnnecessaryAbstractClass:
861
+ active: true
862
+ UnnecessaryAnnotationUseSiteTarget:
863
+ active: false
864
+ UnnecessaryApply:
865
+ active: true
866
+ UnnecessaryBackticks:
867
+ active: false
868
+ UnnecessaryBracesAroundTrailingLambda:
869
+ active: false
870
+ UnnecessaryFilter:
871
+ active: true
872
+ UnnecessaryInheritance:
873
+ active: true
874
+ UnnecessaryInnerClass:
875
+ active: false
876
+ UnnecessaryLet:
877
+ active: false
878
+ UnnecessaryParentheses:
879
+ active: false
880
+ allowForUnclearPrecedence: false
881
+ UntilInsteadOfRangeTo:
882
+ active: false
883
+ UnusedImports:
884
+ active: false
885
+ UnusedParameter:
886
+ active: true
887
+ allowedNames: 'ignored|expected'
888
+ UnusedPrivateClass:
889
+ active: true
890
+ UnusedPrivateMember:
891
+ active: true
892
+ allowedNames: ''
893
+ UnusedPrivateProperty:
894
+ active: true
895
+ allowedNames: '_|ignored|expected|serialVersionUID'
896
+ UseAnyOrNoneInsteadOfFind:
897
+ active: true
898
+ UseArrayLiteralsInAnnotations:
899
+ active: true
900
+ UseCheckNotNull:
901
+ active: true
902
+ UseCheckOrError:
903
+ active: true
904
+ UseDataClass:
905
+ active: false
906
+ allowVars: false
907
+ UseEmptyCounterpart:
908
+ active: false
909
+ UseIfEmptyOrIfBlank:
910
+ active: false
911
+ UseIfInsteadOfWhen:
912
+ active: false
913
+ ignoreWhenContainingVariableDeclaration: false
914
+ UseIsNullOrEmpty:
915
+ active: true
916
+ UseLet:
917
+ active: false
918
+ UseOrEmpty:
919
+ active: true
920
+ UseRequire:
921
+ active: true
922
+ UseRequireNotNull:
923
+ active: true
924
+ UseSumOfInsteadOfFlatMapSize:
925
+ active: false
926
+ UselessCallOnNotNull:
927
+ active: true
928
+ UtilityClassWithPublicConstructor:
929
+ active: true
930
+ VarCouldBeVal:
931
+ active: true
932
+ ignoreLateinitVar: false
933
+ WildcardImport:
934
+ active: true
935
+ excludeImports:
936
+ - 'java.util.*'