Add snitch-based unit tests for PSYQo #2008
CodeScene PR Check
Quality Gate Failed
Gates Failed
New code is healthy
(1 new file with code health below 9.00)
Enforce critical code health rules
(1 file with Bumpy Road Ahead)
Enforce advisory code health rules
(2 files with Code Duplication, Complex Method)
Gates Passed
1 Quality Gates Passed
See analysis details in CodeScene
Reason for failure
| New code is healthy | Violations | Code Health Impact | |
|---|---|---|---|
| arith64.c | 3 rules | 8.75 | Suppress |
| Enforce critical code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| arith64.c | 1 critical rule | 8.75 | Suppress |
| Enforce advisory code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| arith64.c | 2 advisory rules | 8.75 | Suppress |
| test-vector.cpp | 1 advisory rule | 9.39 | 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):
- Code Duplication arith64.c
- Code Duplication test-vector.cpp
- Complex Method arith64.c: __divmoddi4
- Bumpy Road Ahead arith64.c: __divmoddi4
Annotations
Check warning on line 107 in src/mips/tests/psyqo/test-vector.cpp
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Code Duplication
The module contains 2 functions with similar structure: TEST_CASE,TEST_CASE. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.
Check warning on line 79 in third_party/arith64/arith64.c
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Code Duplication
The module contains 5 functions with similar structure: __ashldi3,__ashrdi3,__clzdi2,__ctzdi2 and 1 more functions. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.
Check warning on line 189 in third_party/arith64/arith64.c
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Complex Method
__divmoddi4 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 189 in third_party/arith64/arith64.c
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Bumpy Road Ahead
__divmoddi4 has 4 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.