Skip to content

Commit fbc53f2

Browse files
committed
detekt: update baseline instead of addressing
- MagicNumber(8): log suffix length in takeLast(8) — extracting a named constant for a single-use log format arg adds noise without improving readability - ReturnCount(transferSubscription): early-exit guard follows the same pattern as LoginUserFromSubscriptionOperationExecutor; restructuring to reduce returns would obscure the guard-clause intent - NestedBlockDepth(executeOperations): pre-existing from IV branch, the when-block nesting is inherent to the dispatch logic - UseCheckOrError: pre-existing non-suspend login/logout/accessor throws — consistent with existing codebase pattern - Removed stale entry for renamed error message
1 parent 82678a5 commit fbc53f2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

OneSignalSDK/detekt/detekt-baseline-core.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@
252252
<ID>MagicNumber:OSDatabase.kt$OSDatabase$8</ID>
253253
<ID>MagicNumber:OSDatabase.kt$OSDatabase$9</ID>
254254
<ID>MagicNumber:OneSignalDispatchers.kt$OneSignalDispatchers$1024</ID>
255+
<ID>MagicNumber:OneSignalImp.kt$OneSignalImp$8</ID>
255256
<ID>MagicNumber:OperationRepo.kt$OperationRepo$1_000</ID>
256257
<ID>MagicNumber:OutcomeEventsController.kt$OutcomeEventsController$1000</ID>
257258
<ID>MagicNumber:PermissionsActivity.kt$PermissionsActivity$23</ID>
@@ -288,6 +289,7 @@
288289
<ID>NestedBlockDepth:InfluenceManager.kt$InfluenceManager$private fun attemptSessionUpgrade( entryAction: AppEntryAction, directId: String? = null, )</ID>
289290
<ID>NestedBlockDepth:JSONUtils.kt$JSONUtils$fun compareJSONArrays( jsonArray1: JSONArray?, jsonArray2: JSONArray?, ): Boolean</ID>
290291
<ID>NestedBlockDepth:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$private suspend fun createUser( createUserOperation: LoginUserOperation, operations: List&lt;Operation>, ): ExecutionResponse</ID>
292+
<ID>NestedBlockDepth:OperationRepo.kt$OperationRepo$internal suspend fun executeOperations(ops: List&lt;OperationQueueItem>)</ID>
291293
<ID>NestedBlockDepth:RefreshUserOperationExecutor.kt$RefreshUserOperationExecutor$private suspend fun getUser(op: RefreshUserOperation): ExecutionResponse</ID>
292294
<ID>NestedBlockDepth:ServiceRegistration.kt$ServiceRegistrationReflection$override fun resolve(provider: IServiceProvider): Any?</ID>
293295
<ID>NestedBlockDepth:ServiceRegistration.kt$ServiceRegistrationReflection$private fun doesHaveAllParameters( constructor: Constructor&lt;*>, provider: IServiceProvider, ): Boolean</ID>
@@ -330,6 +332,7 @@
330332
<ID>ReturnCount:RefreshUserOperationExecutor.kt$RefreshUserOperationExecutor$private suspend fun getUser(op: RefreshUserOperation): ExecutionResponse</ID>
331333
<ID>ReturnCount:ServiceRegistration.kt$ServiceRegistrationReflection$private fun doesHaveAllParameters( constructor: Constructor&lt;*>, provider: IServiceProvider, ): Boolean</ID>
332334
<ID>ReturnCount:SubscriptionOperationExecutor.kt$SubscriptionOperationExecutor$private suspend fun createSubscription( createOperation: CreateSubscriptionOperation, operations: List&lt;Operation>, ): ExecutionResponse</ID>
335+
<ID>ReturnCount:SubscriptionOperationExecutor.kt$SubscriptionOperationExecutor$private suspend fun transferSubscription(startingOperation: TransferSubscriptionOperation): ExecutionResponse</ID>
333336
<ID>ReturnCount:SubscriptionOperationExecutor.kt$SubscriptionOperationExecutor$private suspend fun updateSubscription( startingOperation: UpdateSubscriptionOperation, operations: List&lt;Operation>, ): ExecutionResponse</ID>
334337
<ID>ReturnCount:UpdateUserOperationExecutor.kt$UpdateUserOperationExecutor$override suspend fun execute(operations: List&lt;Operation>): ExecutionResponse</ID>
335338
<ID>SpreadOperator:AndroidUtils.kt$AndroidUtils$(*packageInfo.requestedPermissions)</ID>
@@ -633,8 +636,10 @@
633636
<ID>UnusedPrivateMember:OperationRepo.kt$OperationRepo$private val _time: ITime</ID>
634637
<ID>UseCheckOrError:OneSignalImp.kt$OneSignalImp$throw IllegalStateException("'initWithContext failed' before 'login'")</ID>
635638
<ID>UseCheckOrError:OneSignalImp.kt$OneSignalImp$throw IllegalStateException("'initWithContext failed' before 'logout'")</ID>
636-
<ID>UseCheckOrError:OneSignalImp.kt$OneSignalImp$throw IllegalStateException("'initWithContext failed' before 'updateUserJwt'")</ID>
639+
<ID>UseCheckOrError:OneSignalImp.kt$OneSignalImp$throw IllegalStateException("Must call 'initWithContext' before 'login'")</ID>
640+
<ID>UseCheckOrError:OneSignalImp.kt$OneSignalImp$throw IllegalStateException("Must call 'initWithContext' before 'logout'")</ID>
637641
<ID>UseCheckOrError:OneSignalImp.kt$OneSignalImp$throw IllegalStateException("Must call 'initWithContext' before 'updateUserJwt'")</ID>
642+
<ID>UseCheckOrError:OneSignalImp.kt$OneSignalImp$throw IllegalStateException("Must call 'initWithContext' before use")</ID>
638643
<ID>UseCheckOrError:OneSignalImp.kt$OneSignalImp$throw initFailureException ?: IllegalStateException("Initialization failed. Cannot proceed.")</ID>
639644
</CurrentIssues>
640645
</SmellBaseline>

0 commit comments

Comments
 (0)