New CD-Rom code. #1129
New CD-Rom code. #1129
CodeScene PR Check
Quality Gate Failed
Code Health Improved
(2 files improve in Code Health)
Gates Failed
Prevent hotspot decline
(3 hotspots with Complex Method, Bumpy Road Ahead, Primitive Obsession)
New code is healthy
(1 new file with code health below 9.00)
Enforce critical code health rules
(3 files with Bumpy Road Ahead, Deep, Nested Complexity)
Enforce advisory code health rules
(5 files with Complex Method, Primitive Obsession, Code Duplication)
See analysis details in CodeScene
Reason for failure
Prevent hotspot decline | Violations | Code Health Impact | |
---|---|---|---|
cdrom.cc | 3 rules in this hotspot | 8.20 → 7.36 | Suppress |
recompiler.cc | 1 rule in this hotspot | 6.70 → 6.69 | Suppress |
recompiler.cc | 1 rule in this hotspot | 9.02 → 9.01 | Suppress |
New code is healthy | Violations | Code Health Impact | |
---|---|---|---|
cester-hw.c | 4 rules | 10.00 → 8.48 | Suppress |
Enforce critical code health rules | Violations | Code Health Impact | |
---|---|---|---|
cester-hw.c | 2 critical rules | 10.00 → 8.48 | Suppress |
cdrom.cc | 1 critical rule | 8.20 → 7.36 | Suppress |
cdriso.cc | 1 critical rule | 6.79 → 6.59 | Suppress |
Enforce advisory code health rules | Violations | Code Health Impact | |
---|---|---|---|
cester-hw.c | 2 advisory rules | 10.00 → 8.48 | Suppress |
cdrom.cc | 2 advisory rules | 8.20 → 7.36 | Suppress |
cueparser.c | 1 advisory rule | 5.34 → 5.31 | Suppress |
recompiler.cc | 1 advisory rule | 6.70 → 6.69 | Suppress |
recompiler.cc | 1 advisory rule | 9.02 → 9.01 | Suppress |
View Improvements
File | Code Health Impact | Categories Improved |
---|---|---|
cdrom.cc | 8.20 → 7.36 | Complex Method, Bumpy Road Ahead, Overall Code Complexity |
r3000a.cc | 6.79 → 6.84 | Complex Method, Bumpy Road Ahead, Overall Code Complexity |
sstate.cc | 9.25 → 9.52 | Large Method |
gui.cc | no change | Lines of Code in a Single File |
cueparser.c | 5.34 → 5.31 | Bumpy Road Ahead |
cdriso.cc | 6.79 → 6.59 | Primitive Obsession |
sio1.cc | no change | Bumpy Road Ahead |
Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.
Details
🚩 Declining Code Health (highest to lowest):
- Complex Method cueparser.c: parse
- Complex Method recompiler.cc: DynaRecCPU::recompile 🔥
- Code Duplication cester-hw.c
- Deep, Nested Complexity cester-hw.c: hexdump
- Complex Method cdrom.cc: PCSX::CDRom::parseIso 🔥
- Complex Method recompiler.cc: DynaRecCPU::recompile 🔥
- Primitive Obsession cdrom.cc 🔥
- Complex Method cester-hw.c: hexdump
- Complex Method cdrom.cc: maybeStartCommand 🔥
- Complex Method cdrom.cc: cdlSetMode 🔥
- Complex Method cdrom.cc: getStatus 🔥
- Bumpy Road Ahead cdrom.cc: maybeTriggerIRQ 🔥
- Bumpy Road Ahead cdriso.cc: PCSX::CDRIso::getLocP
- Bumpy Road Ahead cdriso.cc: PCSX::CDRIso::getTrack
- Bumpy Road Ahead cdrom.cc: maybeStartCommand 🔥
- Bumpy Road Ahead cdrom.cc: cdlSetMode 🔥
- Bumpy Road Ahead cdrom.cc: cdlSeekL 🔥
- Bumpy Road Ahead cdrom.cc: cdlSeekP 🔥
- Bumpy Road Ahead cdrom.cc: PCSX::CDRom::parseIso 🔥
- Bumpy Road Ahead cester-hw.c: hexdump
✅ Improving Code Health:
- Overall Code Complexity r3000a.cc
- Lines of Code in a Single File gui.cc 🔥
- Complex Method cdrom.cc: logCDROM 🔥
- Bumpy Road Ahead cueparser.c: parse
- Large Method sstate.cc: PCSX::SaveStates::constructSaveState
- Complex Method r3000a.cc: PCSX::R3000Acpu::branchTest
- Primitive Obsession cdriso.cc
- Complex Method cdrom.cc: PCSX::CDRom::check 🔥
- Bumpy Road Ahead r3000a.cc: PCSX::R3000Acpu::branchTest
- Bumpy Road Ahead sio1.cc: PCSX::SIO1::interrupt
- Bumpy Road Ahead cdrom.cc: readTrack 🔥
- Bumpy Road Ahead cdrom.cc: PCSX::CDRom::check 🔥
- Overall Code Complexity cdrom.cc 🔥
Annotations
Check notice on line 1275 in src/core/cdrom.cc
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ Getting better: Complex Method
logCDROM decreases in cyclomatic complexity from 22 to 21, 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 1344 in src/core/cdrom.cc
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Complex Method
PCSX::CDRom::check 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 warning on line 1286 in src/core/cdrom.cc
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
PCSX::CDRom::parseIso has a cyclomatic complexity of 15, 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 755 in src/core/cdrom.cc
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
maybeStartCommand 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.
Check warning on line 960 in src/core/cdrom.cc
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
cdlSetMode 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 331 in src/core/cdrom.cc
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
getStatus 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 notice on line 417 in src/core/cdrom.cc
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Bumpy Road Ahead
readTrack 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 1344 in src/core/cdrom.cc
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Bumpy Road Ahead
PCSX::CDRom::check 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 warning on line 312 in src/core/cdrom.cc
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
maybeTriggerIRQ 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 warning on line 755 in src/core/cdrom.cc
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
maybeStartCommand has 2 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 warning on line 960 in src/core/cdrom.cc
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
cdlSetMode has 2 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 warning on line 1057 in src/core/cdrom.cc
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
cdlSeekL has 2 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 warning on line 1090 in src/core/cdrom.cc
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
cdlSeekP has 2 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 warning on line 1286 in src/core/cdrom.cc
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
PCSX::CDRom::parseIso has 2 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 src/core/cdrom.cc
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Overall Code Complexity
The mean cyclomatic complexity in this module is no longer above the threshold
Check warning on line 1 in src/core/cdrom.cc
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Primitive Obsession
In this module, 34.5% 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.
Check notice on line 374 in src/core/r3000a.cc
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ Getting better: Complex Method
PCSX::R3000Acpu::branchTest decreases in cyclomatic complexity from 14 to 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.
Check notice on line 374 in src/core/r3000a.cc
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ Getting better: Bumpy Road Ahead
PCSX::R3000Acpu::branchTest decreases from 3 to 2 logical blocks with deeply nested code, threshold is one single 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 src/core/r3000a.cc
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ Getting better: Overall Code Complexity
The mean cyclomatic complexity decreases from 6.36 to 6.14, 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 117 in src/core/sstate.cc
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ Getting better: Large Method
PCSX::SaveStates::constructSaveState decreases from 138 to 86 lines of code, threshold = 70. Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function.
Check notice on line 1 in src/gui/gui.cc
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ Getting better: Lines of Code in a Single File
The lines of code decreases from 2464 to 2460, improve code health by reducing it to 1000. The number of Lines of Code in a single file. More Lines of Code lowers the code health.
Check warning on line 238 in src/mips/tests/cdrom/cester-hw.c
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Code Duplication
The module contains 2 functions with similar structure: seekLTo,seekPTo. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.
Check warning on line 56 in src/mips/tests/cdrom/cester-hw.c
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
hexdump 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.
Check warning on line 56 in src/mips/tests/cdrom/cester-hw.c
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
hexdump 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 warning on line 56 in src/mips/tests/cdrom/cester-hw.c
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Deep, Nested Complexity
hexdump 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.