[WIP] Initial multiple queues support #865
CodeScene PR Check
Quality Gate Failed
Code Health Improved
(1 files improve in Code Health)
Gates Failed
Prevent hotspot decline
(2 hotspots with Primitive Obsession, Complex Method)
Enforce critical code health rules
(1 file with Bumpy Road Ahead)
Gates Passed
1 Quality Gates Passed
See analysis details in CodeScene
Reason for failure
| Prevent hotspot decline | Violations | Code Health Impact | |
|---|---|---|---|
| GramophoneExtensions.kt | 1 rule in this hotspot | 8.28 → 8.03 | Suppress |
| GramophonePlaybackService.kt | 1 rule in this hotspot | 4.83 → 4.69 | Suppress |
| Enforce critical code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| QueueBoard.kt | 1 critical rule | 9.02 | Suppress |
View Improvements
| File | Code Health Impact | Categories Improved |
|---|---|---|
| BaseDecorAdapter.kt | 8.61 → 8.98 | Complex Method, Bumpy Road Ahead |
Quality Gate Profile: The Bare Minimum
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.
Details
🚩 Declining Code Health (highest to lowest):
- Complex Method GramophonePlaybackService.kt: GramophonePlaybackService.onCreate 🔥
- Complex Method GramophonePlaybackService.kt: GramophonePlaybackService.onCustomCommand 🔥
- Primitive Obsession GramophoneExtensions.kt 🔥
- Bumpy Road Ahead QueueBoard.kt: QueueBoard.renameQueue
- Bumpy Road Ahead QueueBoard.kt: QueueBoard.setCurrQueue
✅ Improving Code Health:
- Complex Method BaseDecorAdapter.kt: BaseDecorAdapter.onBindViewHolder
- Bumpy Road Ahead BaseDecorAdapter.kt: BaseDecorAdapter.onBindViewHolder
- Large Method GramophonePlaybackService.kt: GramophonePlaybackService.onCustomCommand 🔥
Annotations
Check warning on line 1 in app/src/main/java/org/akanework/gramophone/logic/GramophoneExtensions.kt
codescene-delta-analysis / CodeScene Code Health Review (beta)
❌ New issue: Primitive Obsession
In this module, 53.8% of all function arguments are primitive types, threshold = 30.0%. The functions in this file have too many primitive types (e.g. int, double, float) in their function argument lists. Using many primitive types lead to the code smell Primitive Obsession. Avoid adding more primitive arguments.
codescene-delta-analysis / CodeScene Code Health Review (beta)
❌ Getting worse: Complex Method
GramophonePlaybackService.onCreate already has high cyclomatic complexity, and now it increases in Lines of Code from 312 to 313. 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.
codescene-delta-analysis / CodeScene Code Health Review (beta)
❌ New issue: Complex Method
GramophonePlaybackService.onCustomCommand has a cyclomatic complexity of 11, 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.
codescene-delta-analysis / CodeScene Code Health Review (beta)
✅ No longer an issue: Large Method
GramophonePlaybackService.onCustomCommand is no longer above the threshold for lines of code
Check warning on line 336 in app/src/main/java/org/akanework/gramophone/logic/QueueBoard.kt
codescene-delta-analysis / CodeScene Code Health Review (beta)
❌ New issue: Bumpy Road Ahead
QueueBoard.renameQueue has 3 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is 2 blocks 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 warning on line 424 in app/src/main/java/org/akanework/gramophone/logic/QueueBoard.kt
codescene-delta-analysis / CodeScene Code Health Review (beta)
❌ New issue: Bumpy Road Ahead
QueueBoard.setCurrQueue has 3 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is 2 blocks 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.
codescene-delta-analysis / CodeScene Code Health Review (beta)
✅ Getting better: Complex Method
BaseDecorAdapter.onBindViewHolder decreases in cyclomatic complexity from 26 to 24, 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.
codescene-delta-analysis / CodeScene Code Health Review (beta)
✅ Getting better: Bumpy Road Ahead
BaseDecorAdapter.onBindViewHolder decreases from 5 to 3 logical blocks with deeply nested code, threshold is 2 blocks 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.