Skip to content

Commit

Permalink
detekt rule
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredvu committed Apr 30, 2024
1 parent 157d951 commit 59ec66f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions detekt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ naming:
# /exchange -> /dydx -> /abacus
# didn't seem worth the potential thrash in PRs to fix (feel free to fix if you feel differently)
active: false
MatchingDeclarationName:
# Affects a lot of the TradingStateMachine+_.kt files
active: false

complexity:
CognitiveComplexMethod:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1206,7 +1206,7 @@ open class TradingStateMachine(
val subaccountHistoricalPnlData =
(subaccountHistoricalPnl(subaccountNumber) as? IList<Map<String, Any>>)?.mutable()
?: mutableListOf()
val equity = parser.asDouble(parser.value(subaccount, "equity.current"))

if (subaccountHistoricalPnl?.size == 1) {
// Check if the PNL was generated from equity
val first = subaccountHistoricalPnl.firstOrNull()
Expand Down

0 comments on commit 59ec66f

Please sign in to comment.