CoinJoiClient.CreateRegisterAndConfirmCoinsAsync refactor #12947
CodeScene PR Check
✅ Code Health Quality Gates: OK
- Improving Code Health: 4 findings(s) ✅
- Affected Hotspots: 1 files(s) 🔥
Details
✅ Improving Code Health:
- Overall Code Complexity CoinJoinClient.cs 🔥
- Complex Method CoinJoinClient.cs: CreateRegisterAndConfirmCoinsAsync 🔥
- Deep, Nested Complexity CoinJoinClient.cs: CreateRegisterAndConfirmCoinsAsync 🔥
- Bumpy Road Ahead CoinJoinClient.cs: CreateRegisterAndConfirmCoinsAsync 🔥
Annotations
Check notice on line 420 in WalletWasabi/WabiSabi/Client/CoinJoin/Client/CoinJoinClient.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (master)
✅ No longer an issue: Complex Method
CreateRegisterAndConfirmCoinsAsync is no longer above the threshold for cyclomatic complexity. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.
Check notice on line 563 in WalletWasabi/WabiSabi/Client/CoinJoin/Client/CoinJoinClient.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (master)
ℹ New issue: Complex Method
RegisterInputAsync has a cyclomatic complexity of 23, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.
Check notice on line 420 in WalletWasabi/WabiSabi/Client/CoinJoin/Client/CoinJoinClient.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (master)
✅ No longer an issue: Bumpy Road Ahead
CreateRegisterAndConfirmCoinsAsync is no longer above the threshold for logical blocks with deeply nested code. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.
Check notice on line 563 in WalletWasabi/WabiSabi/Client/CoinJoin/Client/CoinJoinClient.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (master)
ℹ New issue: Bumpy Road Ahead
RegisterInputAsync has 3 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is one single, nested block per function. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.
Check notice on line 1 in WalletWasabi/WabiSabi/Client/CoinJoin/Client/CoinJoinClient.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (master)
✅ Getting better: Overall Code Complexity
The mean cyclomatic complexity decreases from 6.41 to 6.11, threshold = 4. This file has many conditional statements (e.g. if, for, while) across its implementation, leading to lower code health. Avoid adding more conditionals.
Check notice on line 420 in WalletWasabi/WabiSabi/Client/CoinJoin/Client/CoinJoinClient.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (master)
✅ No longer an issue: Deep, Nested Complexity
CreateRegisterAndConfirmCoinsAsync is no longer above the threshold for nested complexity depth. This function contains deeply nested logic such as if statements and/or loops. The deeper the nesting, the lower the code health.
Check notice on line 563 in WalletWasabi/WabiSabi/Client/CoinJoin/Client/CoinJoinClient.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (master)
ℹ New issue: Deep, Nested Complexity
RegisterInputAsync has a nested complexity depth of 4, threshold = 4. This function contains deeply nested logic such as if statements and/or loops. The deeper the nesting, the lower the code health.