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-3169] Login decryption options in extension popup #5909

PM-3169 - Add some additional context to new redirect guard scenario

62a0b5e
Select commit
Loading
Failed to load commit list.
Merged

[PM-3169] Login decryption options in extension popup #5909

PM-3169 - Add some additional context to new redirect guard scenario
62a0b5e
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (feature/trusted-device-encryption) failed Aug 2, 2023 in 1m 0s

CodeScene PR Check

Quality Gates: FAILED

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

Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene

Details

🚩 Negative Code Health Impact (highest to lowest):

  • Large Method sso.component.spec.ts: beforeEach
  • Complex Conditional lock.guard.ts: lockGuard
  • Complex Conditional tde-decryption-required.guard.ts
  • Complex Method account.ts: Account.constructor 🔥
  • Complex Method account.ts: Account.fromJSON 🔥

✅ Positive Code Health Impact (highest to lowest):

  • Code Duplication sso.component.spec.ts
  • Overall Code Complexity account.ts 🔥

Annotations

Check warning on line 44 in libs/angular/src/auth/guards/lock.guard.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (feature/trusted-device-encryption)

❌ New issue: Complex Conditional

lockGuard has 1 complex conditionals with 2 branches, threshold = 2. A complex conditional is an expression inside a branch (e.g. if, for, while) which consists of multiple, logical operators such as AND/OR. The more logical operators in an expression, the more severe the code smell.

Check warning on line 425 in libs/common/src/platform/models/domain/account.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (feature/trusted-device-encryption)

❌ Getting worse: Complex Method

Account.constructor increases in cyclomatic complexity from 10 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 443 in libs/common/src/platform/models/domain/account.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (feature/trusted-device-encryption)

❌ New issue: Complex Method

Account.fromJSON 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.

Check notice on line 1 in libs/common/src/platform/models/domain/account.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (feature/trusted-device-encryption)

✅ Getting better: Overall Code Complexity

The mean cyclomatic complexity decreases from 4.58 to 4.36, threshold = 4. This file has many conditional statements (e.g. if, for, while) across its implementation, leading to lower code health. Avoid adding more conditionals.

Check notice on line 1 in libs/common/src/platform/services/crypto.service.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (feature/trusted-device-encryption)

ℹ Getting worse: Primitive Obsession

The ratio of primitive types in function arguments increases from 48.08% to 48.57%, 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/crypto.service.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (feature/trusted-device-encryption)

ℹ Getting worse: String Heavy Function Arguments

The ratio of strings in function arguments increases from 43.27% to 43.81%, threshold = 39.0%. The functions in this file have a high ratio of strings as arguments. Avoid adding more.

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 (feature/trusted-device-encryption)

ℹ Getting worse: Lines of Code in a Single File

The lines of code increases from 2713 to 2752, improve code health by reducing it to 1000. The number of Lines of Code in a single file. More Lines of Code lowers the code health.

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 (feature/trusted-device-encryption)

ℹ Getting worse: Number of Functions in a Single Module

The number of functions increases from 312 to 316, threshold = 75. This file contains too many functions. Beyond a certain threshold, more functions lower the code health.

Check notice on line 1 in libs/angular/src/auth/components/sso.component.spec.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (feature/trusted-device-encryption)

ℹ Getting worse: Code Duplication

introduced similar code in: "calls onSuccessfulLoginTdeNavigate instead of router.navigate when the callback is defined". Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.

Check notice on line 1 in libs/angular/src/auth/components/sso.component.spec.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (feature/trusted-device-encryption)

✅ Getting better: Code Duplication

reduced similar code in: "calls authService.logIn and navigates to the component's defined 2FA route when the auth result requires 2FA and onSuccessfulLoginTwoFactorNavigate is not defined","navigates to the component's defined trusted device encryption route when login is successful". Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.

Check warning on line 122 in libs/angular/src/auth/components/sso.component.spec.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (feature/trusted-device-encryption)

❌ Getting worse: Large Method

beforeEach increases from 87 to 88 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 1 in libs/angular/src/auth/guards/tde-decryption-required.guard.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (feature/trusted-device-encryption)

❌ New issue: Complex Conditional

tdeDecryptionRequiredGuard has 1 complex conditionals with 2 branches, threshold = 2. A complex conditional is an expression inside a branch (e.g. if, for, while) which consists of multiple, logical operators such as AND/OR. The more logical operators in an expression, the more severe the code smell.