Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MPDX-8479 HI Report Page & key #1228

Open
wants to merge 24 commits into
base: health-indicator
Choose a base branch
from

Cleaning up PR and simplifying code

bef08f2
Select commit
Loading
Failed to load commit list.
Open

MPDX-8479 HI Report Page & key #1228

Cleaning up PR and simplifying code
bef08f2
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (health-indicator) succeeded Dec 19, 2024 in 3m 6s

CodeScene PR Check

Code Health Quality Gates: OK

Change in average Code Health of affected files: +0.18 (9.30 -> 9.48)

  • Declining Code Health: 2 findings(s) 🚩
  • Improving Code Health: 3 findings(s) ✅

View detailed results in CodeScene

Details

🚩 Declining Code Health (highest to lowest):

  • 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 82 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 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.