Skip to content

Adding codceScene rules json to see if it changes how codeScene revie…

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (health-indicator) succeeded Dec 17, 2024 in 2m 32s

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) βœ…

View detailed results in CodeScene

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

Check notice on line 169 in src/components/Reports/FinancialAccountsReport/AccountSummary/AccountSummary.tsx

See this annotation in the file changed.

@codescene-delta-analysis 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

See this annotation in the file changed.

@codescene-delta-analysis 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

See this annotation in the file changed.

@codescene-delta-analysis 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 notice on line 1 in src/components/Contacts/ContactDetails/ContactDonationsTab/DonationsGraph/DonationsGraph.test.tsx

See this annotation in the file changed.

@codescene-delta-analysis 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

See this annotation in the file changed.

@codescene-delta-analysis 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.

Check warning on line 75 in src/components/Reports/HealthIndicatorReport/HealthIndicatorFormula/HealthIndicatorFormula.tsx

See this annotation in the file changed.

@codescene-delta-analysis 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

See this annotation in the file changed.

@codescene-delta-analysis 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.