Adding memory card support to psyqo#2042
CodeScene PR Check
Quality Gate Failed
Gates Failed
New code is healthy
(3 new files 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
(4 files with Complex Method, Complex Conditional, Overall Code Complexity, Excess Number of Function Arguments)
Gates Passed
1 Quality Gates Passed
See analysis details in CodeScene
Reason for failure
| New code is healthy | Violations | Code Health Impact | |
|---|---|---|---|
| memory-card-filesystem.cpp | 6 rules | 5.12 | Suppress |
| memory-card.cpp | 5 rules | 6.22 | Suppress |
| memorycard.cpp | 5 rules | 7.08 | Suppress |
| Enforce critical code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| memory-card-filesystem.cpp | 2 critical rules | 5.12 | Suppress |
| memory-card.cpp | 1 critical rule | 6.22 | Suppress |
| memorycard.cpp | 2 critical rules | 7.08 | Suppress |
| Enforce advisory code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| memory-card-filesystem.cpp | 4 advisory rules | 5.12 | Suppress |
| memory-card.cpp | 4 advisory rules | 6.22 | Suppress |
| memorycard.cpp | 3 advisory rules | 7.08 | Suppress |
| advancedpad.cpp | 1 advisory rule | 7.20 → 7.18 | Suppress |
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 memory-card-filesystem.cpp: psyqo::MemoryCardFileSystem::afterReadDir
- Complex Method memory-card-filesystem.cpp: psyqo::MemoryCardFileSystem::onSectorDone
- Complex Method advancedpad.cpp: psyqo::AdvancedPad::readPad
- Complex Method memorycard.cpp: runStep
- Complex Method memory-card.cpp: psyqo::MemoryCard::readStep
- Complex Method memory-card.cpp: psyqo::MemoryCard::writeStep
- Bumpy Road Ahead memory-card-filesystem.cpp: psyqo::MemoryCardFileSystem::afterReadDir
- Overall Code Complexity memorycard.cpp
- Deep, Nested Complexity memorycard.cpp: runStep
- Overall Code Complexity memory-card-filesystem.cpp
- Overall Code Complexity memory-card.cpp
- Complex Method memory-card-filesystem.cpp: psyqo::MemoryCardFileSystem::issueOrFinish
- Bumpy Road Ahead memory-card-filesystem.cpp: psyqo::MemoryCardFileSystem::onSectorDone
- Complex Method memory-card.cpp: psyqo::MemoryCard::doReadSector
- Complex Method memory-card.cpp: psyqo::MemoryCard::doWriteSector
- Complex Method memory-card.cpp: psyqo::MemoryCard::errorMessage
- Complex Conditional memorycard.cpp: check
- Complex Conditional memorycard.cpp: MemoryCardScene::frame
- Complex Conditional memory-card-filesystem.cpp: psyqo::MemoryCardFileSystem::issueOrFinish
- Complex Conditional memory-card-filesystem.cpp: psyqo::MemoryCardFileSystem::afterReadDir
- Deep, Nested Complexity memory-card-filesystem.cpp: psyqo::MemoryCardFileSystem::issueOrFinish
- Deep, Nested Complexity memory-card-filesystem.cpp: psyqo::MemoryCardFileSystem::onSectorDone
- Deep, Nested Complexity memory-card-filesystem.cpp: psyqo::MemoryCardFileSystem::afterReadDir
- Complex Conditional memory-card.cpp: psyqo::MemoryCard::probeBlocking
- Complex Conditional memory-card.cpp: psyqo::MemoryCard::onAsyncAttemptDone
- Complex Method memorycard.cpp: MemoryCardScene::frame
- Complex Method memory-card-filesystem.cpp: psyqo::MemoryCardFileSystem::begin
- Complex Method memorycard.cpp: buildIcon
- Bumpy Road Ahead memory-card.cpp: psyqo::MemoryCard::writeStep
- Bumpy Road Ahead memory-card-filesystem.cpp: psyqo::MemoryCardFileSystem::reachableBlocks
- Bumpy Road Ahead memory-card-filesystem.cpp: psyqo::MemoryCardFileSystem::issueOrFinish
- Bumpy Road Ahead memorycard.cpp: runStep
- Bumpy Road Ahead memorycard.cpp: MemoryCardScene::frame
- Bumpy Road Ahead memory-card.cpp: psyqo::MemoryCard::readStep
- Excess Number of Function Arguments memory-card.cpp: psyqo::MemoryCard::startTransfer
- Excess Number of Function Arguments memory-card.cpp: psyqo::MemoryCard::irqTransferBlocking
- Excess Number of Function Arguments memory-card.cpp: psyqo::MemoryCard::startAsyncAttempt
- Excess Number of Function Arguments memory-card-filesystem.cpp: psyqo::MemoryCardFileSystem::writeFile
- Excess Number of Function Arguments memory-card-filesystem.cpp: psyqo::MemoryCardFileSystem::writeFileBlocking
- Excess Number of Function Arguments memory-card-filesystem.cpp: psyqo::MemoryCardFileSystem::readFile
- Excess Number of Function Arguments memory-card-filesystem.cpp: psyqo::MemoryCardFileSystem::readFileBlocking
- Excess Number of Function Arguments memory-card-filesystem.cpp: psyqo::MemoryCardFileSystem::listFiles
- Excess Number of Function Arguments memory-card-filesystem.cpp: psyqo::MemoryCardFileSystem::listFilesBlocking
Annotations
Check warning on line 232 in src/mips/psyqo/examples/memorycard/memorycard.cpp
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Complex Method
runStep has a cyclomatic complexity of 35, 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 302 in src/mips/psyqo/examples/memorycard/memorycard.cpp
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Complex Method
MemoryCardScene::frame 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 122 in src/mips/psyqo/examples/memorycard/memorycard.cpp
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Complex Method
buildIcon 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 90 in src/mips/psyqo/examples/memorycard/memorycard.cpp
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Complex Conditional
check 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 warning on line 292 in src/mips/psyqo/examples/memorycard/memorycard.cpp
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Complex Conditional
MemoryCardScene::frame 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 warning on line 232 in src/mips/psyqo/examples/memorycard/memorycard.cpp
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Bumpy Road Ahead
runStep has 2 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 302 in src/mips/psyqo/examples/memorycard/memorycard.cpp
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Bumpy Road Ahead
MemoryCardScene::frame has 2 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 1 in src/mips/psyqo/examples/memorycard/memorycard.cpp
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Overall Code Complexity
This module has a mean cyclomatic complexity of 7.67 across 9 functions. The mean complexity threshold
is 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 warning on line 232 in src/mips/psyqo/examples/memorycard/memorycard.cpp
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Deep, Nested Complexity
runStep 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 171 in src/mips/psyqo/src/advancedpad.cpp
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ Getting worse: Complex Method
psyqo::AdvancedPad::readPad increases in cyclomatic complexity from 29 to 30, 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 577 in src/mips/psyqo/src/memory-card-filesystem.cpp
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Complex Method
psyqo::MemoryCardFileSystem::afterReadDir has a cyclomatic complexity of 44, 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 430 in src/mips/psyqo/src/memory-card-filesystem.cpp
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Complex Method
psyqo::MemoryCardFileSystem::onSectorDone has a cyclomatic complexity of 41, 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 288 in src/mips/psyqo/src/memory-card-filesystem.cpp
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Complex Method
psyqo::MemoryCardFileSystem::issueOrFinish has a cyclomatic complexity of 24, 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 164 in src/mips/psyqo/src/memory-card-filesystem.cpp
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Complex Method
psyqo::MemoryCardFileSystem::begin has a cyclomatic complexity of 12, 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 232 in src/mips/psyqo/src/memory-card-filesystem.cpp
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Complex Conditional
psyqo::MemoryCardFileSystem::issueOrFinish 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 warning on line 481 in src/mips/psyqo/src/memory-card-filesystem.cpp
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Complex Conditional
psyqo::MemoryCardFileSystem::afterReadDir 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 warning on line 577 in src/mips/psyqo/src/memory-card-filesystem.cpp
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Bumpy Road Ahead
psyqo::MemoryCardFileSystem::afterReadDir has 7 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 430 in src/mips/psyqo/src/memory-card-filesystem.cpp
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Bumpy Road Ahead
psyqo::MemoryCardFileSystem::onSectorDone 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 114 in src/mips/psyqo/src/memory-card-filesystem.cpp
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Bumpy Road Ahead
psyqo::MemoryCardFileSystem::reachableBlocks has 2 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 288 in src/mips/psyqo/src/memory-card-filesystem.cpp
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Bumpy Road Ahead
psyqo::MemoryCardFileSystem::issueOrFinish has 2 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 1 in src/mips/psyqo/src/memory-card-filesystem.cpp
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Overall Code Complexity
This module has a mean cyclomatic complexity of 5.69 across 32 functions. The mean complexity threshold
is 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 warning on line 288 in src/mips/psyqo/src/memory-card-filesystem.cpp
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Deep, Nested Complexity
psyqo::MemoryCardFileSystem::issueOrFinish 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 430 in src/mips/psyqo/src/memory-card-filesystem.cpp
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Deep, Nested Complexity
psyqo::MemoryCardFileSystem::onSectorDone 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 577 in src/mips/psyqo/src/memory-card-filesystem.cpp
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Deep, Nested Complexity
psyqo::MemoryCardFileSystem::afterReadDir 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 607 in src/mips/psyqo/src/memory-card-filesystem.cpp
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Excess Number of Function Arguments
psyqo::MemoryCardFileSystem::listFiles has 5 arguments, max arguments = 4
This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.