Skip to content

Splitting cdrom-device.cpp up.

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Sep 30, 2024 in 34s

CodeScene PR Check

❌ Code Health Quality Gates: FAILED

Change in average Code Health of affected files: +0.24 (8.71 -> 8.94)

  • Declining Code Health: 9 findings(s) 🚩
  • Improving Code Health: 1 findings(s) βœ…

View detailed results in CodeScene

Details

🚩 Declining Code Health (highest to lowest):

  • Code Duplication cdrom-device-cdda.cpp
  • Code Duplication cdrom-device-muteunmute.cpp
  • Code Duplication cdrom-device-toc.cpp
  • Complex Method cdrom-device.cpp: psyqo::CDRomDevice::irq
  • Complex Conditional task-demo.cpp: TaskDemo::createScene
  • Excess Number of Function Arguments cdrom-device-readsectors.cpp: start
  • Complex Method kernel.cpp: psyqo::Kernel::Internal::prepare
  • Bumpy Road Ahead cdrom-device.cpp: psyqo::CDRomDevice::irq
  • Bumpy Road Ahead kernel.cpp: psyqo::Kernel::Internal::prepare

βœ… Improving Code Health:

  • Code Duplication kernel.cpp

Annotations

Check warning on line 166 in src/mips/psyqo/src/cdrom-device.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

psyqo::CDRomDevice::irq has a cyclomatic complexity of 17, 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 166 in src/mips/psyqo/src/cdrom-device.cpp

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

psyqo::CDRomDevice::irq has 4 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 124 in src/mips/psyqo/examples/task-demo/task-demo.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Conditional

TaskDemo::createScene has 1 complex conditionals with 2 branches, threshold = 2. A complex conditional is an expression inside a branch (e.g. if, for, while) which consists of multiple, logical operators such as AND/OR. The more logical operators in an expression, the more severe the code smell.

Check notice on line 1 in src/mips/psyqo/src/kernel.cpp

See this annotation in the file changed.

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

βœ… No longer an issue: Code Duplication

The module no longer contains too many functions with similar structure

Check warning on line 348 in src/mips/psyqo/src/kernel.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

psyqo::Kernel::Internal::prepare 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 348 in src/mips/psyqo/src/kernel.cpp

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

psyqo::Kernel::Internal::prepare 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 65 in src/mips/psyqo/src/cdrom-device-cdda.cpp

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 3 functions with similar structure: start,start,start. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.

Check warning on line 52 in src/mips/psyqo/src/cdrom-device-muteunmute.cpp

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: start,start. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.

Check warning on line 67 in src/mips/psyqo/src/cdrom-device-readsectors.cpp

See this annotation in the file changed.

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

❌ New issue: Excess Number of Function Arguments

start has 5 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.

Check warning on line 56 in src/mips/psyqo/src/cdrom-device-toc.cpp

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: start,start. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.