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

[PM-7541] Move Last Desktop Settings #9310

Merged
merged 14 commits into from
Jun 6, 2024

Remove LogService

38c6884
Select commit
Loading
Failed to load commit list.
Merged

[PM-7541] Move Last Desktop Settings #9310

Remove LogService
38c6884
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed May 29, 2024 in 50s

CodeScene PR Check

Code Health Quality Gates: FAILED

  • Declining Code Health: 3 findings(s) 🚩
  • Improving Code Health: 1 findings(s) ✅
  • Affected Hotspots: 1 files(s) 🔥

View detailed results in CodeScene

Details

🚩 Declining Code Health (highest to lowest):

  • Complex Method settings.component.ts: SettingsComponent.ngOnInit
  • Primitive Obsession desktop-settings.service.ts
  • Complex Method 66-move-final-desktop-settings.ts: MoveFinalDesktopSettingsMigrator.migrate

✅ Improving Code Health:

  • Code Duplication state.service.ts 🔥

Annotations

Check warning on line 294 in apps/desktop/src/app/accounts/settings.component.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ Getting worse: Complex Method

SettingsComponent.ngOnInit already has high cyclomatic complexity, and now it increases in Lines of Code from 135 to 138. 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 notice on line 180 in apps/desktop/src/main.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

ℹ Getting worse: Complex Method

Main.constructor increases in cyclomatic complexity from 9 to 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 1 in apps/desktop/src/platform/services/desktop-settings.service.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Primitive Obsession

In this module, 84.6% 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 libs/common/src/platform/services/state.service.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

✅ Getting better: Code Duplication

reduced similar code in: StateService.setEnableBrowserIntegration,StateService.setEnableBrowserIntegrationFingerprint,StateService.setMinimizeOnCopyToClipboard. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.

Check warning on line 75 in libs/common/src/state-migrations/migrations/66-move-final-desktop-settings.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Complex Method

MoveFinalDesktopSettingsMigrator.migrate has a cyclomatic complexity of 9, 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.