Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New CD-Rom code. #1129

Open
wants to merge 227 commits into
base: main
Choose a base branch
from

Merge remote-tracking branch 'upstream/main' into fuckit

a6dd75e
Select commit
Loading
Failed to load commit list.
Open

New CD-Rom code. #1129

Merge remote-tracking branch 'upstream/main' into fuckit
a6dd75e
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Aug 12, 2024 in 44s

CodeScene PR Check

Code Health Quality Gates: FAILED

Change in average Code Health of affected files: +1.10 (6.43 -> 7.52)

  • Declining Code Health: 20 findings(s) 🚩
  • Improving Code Health: 12 findings(s) ✅
  • Affected Hotspots: 4 files(s) 🔥

View detailed results in CodeScene

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 🔥

Annotations

Check notice on line 1246 in src/core/cdrom.cc

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

✅ Getting better: Complex Method

logCDROM decreases in cyclomatic complexity from 21 to 20, 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 1315 in src/core/cdrom.cc

See this annotation in the file changed.

@codescene-delta-analysis 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 1257 in src/core/cdrom.cc

See this annotation in the file changed.

@codescene-delta-analysis 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

See this annotation in the file changed.

@codescene-delta-analysis 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

See this annotation in the file changed.

@codescene-delta-analysis 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

See this annotation in the file changed.

@codescene-delta-analysis 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 411 in src/core/cdrom.cc

See this annotation in the file changed.

@codescene-delta-analysis 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 1315 in src/core/cdrom.cc

See this annotation in the file changed.

@codescene-delta-analysis 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 311 in src/core/cdrom.cc

See this annotation in the file changed.

@codescene-delta-analysis 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

See this annotation in the file changed.

@codescene-delta-analysis 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

See this annotation in the file changed.

@codescene-delta-analysis 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

See this annotation in the file changed.

@codescene-delta-analysis 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

See this annotation in the file changed.

@codescene-delta-analysis 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 1257 in src/core/cdrom.cc

See this annotation in the file changed.

@codescene-delta-analysis 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 warning on line 1 in src/core/cdrom.cc

See this annotation in the file changed.

@codescene-delta-analysis 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

See this annotation in the file changed.

@codescene-delta-analysis 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

See this annotation in the file changed.

@codescene-delta-analysis 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

See this annotation in the file changed.

@codescene-delta-analysis 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

See this annotation in the file changed.

@codescene-delta-analysis 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

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

✅ Getting better: Lines of Code in a Single File

The lines of code decreases from 2337 to 2333, 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

See this annotation in the file changed.

@codescene-delta-analysis 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

See this annotation in the file changed.

@codescene-delta-analysis 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

See this annotation in the file changed.

@codescene-delta-analysis 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

See this annotation in the file changed.

@codescene-delta-analysis 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.

Check warning on line 500 in third_party/cueparser/cueparser.c

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ Getting worse: Complex Method

parse increases in cyclomatic complexity from 117 to 119, 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.