CodeScene PR Check
β Code Health Quality Gates: OK
Change in average Code Health of affected files: +0.19 (9.30 -> 9.49)
- Declining Code Health: 4 findings(s) π©
- Improving Code Health: 3 findings(s) β
Details
π© Declining Code Health (highest to lowest):
- Complex Method CoachingDetail.tsx: CoachingDetail:React.FC<CoachingDetailProps>
- Large Method theme.ts: theme
- 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
Check warning on line 156 in src/theme.ts
codescene-delta-analysis / CodeScene Cloud Delta Analysis (health-indicator)
β Getting worse: Large Method
theme increases from 147 to 159 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (health-indicator)
β New issue: Complex Method
HealthIndicatorFormula:React.FC<HealthIndicatorFormulaProps> has a cyclomatic complexity of 10, 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 219 in src/components/Coaching/CoachingDetail/CoachingDetail.tsx
codescene-delta-analysis / CodeScene Cloud Delta Analysis (health-indicator)
β Getting worse: Complex Method
CoachingDetail:React.FC<CoachingDetailProps> already has high cyclomatic complexity, and now it increases in Lines of Code from 160 to 161. 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.