New CD-Rom code. #1129
New CD-Rom code. #1129
CodeScene PR Check
❌ Code Health Quality Gates: FAILED
Change in average Code Health of affected files: -0.07 (6.25 -> 6.17)
- Declining Code Health: 20 findings(s) 🚩
- Improving Code Health: 13 findings(s) ✅
- Affected Hotspots: 4 files(s) 🔥
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 1251 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 1320 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 1262 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 754 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 959 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 1320 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 754 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 959 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 1056 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 1089 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 1262 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 372 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 372 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.92 to 6.67, 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 2382 to 2378, 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.