MPDX-8479 HI Report Page & key #1228
CodeScene PR Check
✅ Code Health Quality Gates: OK
Change in average Code Health of affected files: +0.16 (9.27 -> 9.43)
- Declining Code Health: 4 findings(s) 🚩
- Improving Code Health: 3 findings(s) ✅
Details
🚩 Declining Code Health (highest to lowest):
- Complex Method MonthlyGoal.tsx: MonthlyGoal
- Complex Method HealthIndicatorWidget.tsx: HealthIndicatorWidget:React.FC<HealthIndicatorWidgetProps>
- Complex Method HealthIndicatorFormula.tsx: HealthIndicatorFormula:React.FC<HealthIndicatorFormulaProps>
- Primitive Obsession intlFormat.ts
✅ Improving Code Health:
- Complex Method AccountSummary.tsx: AccountSummary:React.FC<AccountSummaryProps>
- Code Duplication DonationsGraph.test.tsx
- Code Duplication DonationsReport.test.tsx
Annotations
codescene-delta-analysis / CodeScene Cloud Delta Analysis (health-indicator)
✅ Getting better: Complex Method
AccountSummary:React.FC<AccountSummaryProps> decreases in cyclomatic complexity from 27 to 25, threshold = 10. 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 1 in src/lib/intlFormat.ts
codescene-delta-analysis / CodeScene Cloud Delta Analysis (health-indicator)
❌ New issue: Primitive Obsession
In this module, 50.0% 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 1 in src/components/Reports/DonationsReport/DonationsReport.test.tsx
codescene-delta-analysis / CodeScene Cloud Delta Analysis (health-indicator)
✅ No longer an issue: Code Duplication
The module no longer contains too many functions with similar structure
codescene-delta-analysis / CodeScene Cloud Delta Analysis (health-indicator)
✅ No longer an issue: Code Duplication
The module no longer contains too many functions with similar structure
codescene-delta-analysis / CodeScene Cloud Delta Analysis (health-indicator)
❌ New issue: Complex Method
HealthIndicatorFormula:React.FC<HealthIndicatorFormulaProps> has a cyclomatic complexity of 11, threshold = 10. 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 291 in src/components/Dashboard/MonthlyGoal/MonthlyGoal.tsx
codescene-delta-analysis / CodeScene Cloud Delta Analysis (health-indicator)
❌ Getting worse: Complex Method
MonthlyGoal already has high cyclomatic complexity, and now it increases in Lines of Code from 234 to 236. 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (health-indicator)
❌ Getting worse: Complex Method
HealthIndicatorWidget:React.FC<HealthIndicatorWidgetProps> increases in cyclomatic complexity from 14 to 15, threshold = 10. 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.