Add hardware register viewer debug widget #2009
CodeScene PR Check
Quality Gate Failed
Code Health Improved
(1 files improve in Code Health)
Gates Failed
New code is healthy
(1 new file with code health below 9.00)
Enforce critical code health rules
(1 file with Bumpy Road Ahead)
Enforce advisory code health rules
(1 file with Complex Method)
Gates Passed
1 Quality Gates Passed
See analysis details in CodeScene
Reason for failure
| New code is healthy | Violations | Code Health Impact | |
|---|---|---|---|
| hwregs.cc | 2 rules | 7.63 | Suppress |
| Enforce critical code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| hwregs.cc | 1 critical rule | 7.63 | Suppress |
| Enforce advisory code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| hwregs.cc | 1 advisory rule | 7.63 | Suppress |
View Improvements
| File | Code Health Impact | Categories Improved |
|---|---|---|
| registers.cc | 6.49 → 7.50 | Complex Method, Bumpy Road Ahead |
Quality Gate Profile: Clean Code Collective
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 hwregs.cc: PCSX::Widgets::HWRegs::draw
- Bumpy Road Ahead hwregs.cc: PCSX::Widgets::HWRegs::draw
- Complex Method hwregs.cc: irqName
- Bumpy Road Ahead hwregs.cc: timerClockSource
- Complex Method hwregs.cc: timerClockSource
- Complex Method hwregs.cc: dmaName
✅ Improving Code Health:
- Complex Method registers.cc: PCSX::Widgets::Registers::draw
- Bumpy Road Ahead registers.cc: PCSX::Widgets::Registers::draw
- Complex Method registers.cc: irqName
- Complex Method registers.cc: dmaName
Annotations
Check warning on line 328 in src/gui/widgets/hwregs.cc
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Complex Method
PCSX::Widgets::HWRegs::draw has a cyclomatic complexity of 37, 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 warning on line 55 in src/gui/widgets/hwregs.cc
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Complex Method
irqName has a cyclomatic complexity of 13, 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 warning on line 117 in src/gui/widgets/hwregs.cc
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Complex Method
timerClockSource has a cyclomatic complexity of 9, 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 warning on line 76 in src/gui/widgets/hwregs.cc
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Complex Method
dmaName has a cyclomatic complexity of 9, 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 warning on line 328 in src/gui/widgets/hwregs.cc
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Bumpy Road Ahead
PCSX::Widgets::HWRegs::draw has 6 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 117 in src/gui/widgets/hwregs.cc
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Bumpy Road Ahead
timerClockSource 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 notice on line 296 in src/gui/widgets/registers.cc
codescene-delta-analysis / CodeScene Code Health Review (main)
✅ Getting better: Complex Method
PCSX::Widgets::Registers::draw decreases in cyclomatic complexity from 60 to 42, 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 57 in src/gui/widgets/registers.cc
codescene-delta-analysis / CodeScene Code Health Review (main)
✅ No longer an issue: Complex Method
irqName 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 57 in src/gui/widgets/registers.cc
codescene-delta-analysis / CodeScene Code Health Review (main)
✅ No longer an issue: Complex Method
dmaName 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 296 in src/gui/widgets/registers.cc
codescene-delta-analysis / CodeScene Code Health Review (main)
✅ Getting better: Bumpy Road Ahead
PCSX::Widgets::Registers::draw decreases from 10 to 6 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.