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

Introduce methods on new service to have alternative to obsoleted methods #17208

Introduced methods on the IEntityTypeContainerService, so have altern…

0216b8d
Select commit
Loading
Failed to load commit list.
Merged

Introduce methods on new service to have alternative to obsoleted methods #17208

Introduced methods on the IEntityTypeContainerService, so have altern…
0216b8d
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (contrib) failed Oct 8, 2024 in 1m 2s

CodeScene PR Check

Code Health Quality Gates: FAILED

Change in average Code Health of affected files: +0.13 (8.72 -> 8.85)

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

View detailed results in CodeScene

Details

🚩 Declining Code Health (highest to lowest):

  • Code Duplication CacheRefreshingNotificationHandler.cs
  • Complex Method UmbracoIntegrationTestWithMediaEditing.cs: CreateTestData
  • Excess Number of Function Arguments MediaEditingBuilder.cs: CreateMediaWithAProperty

✅ Improving Code Health:

  • Code Duplication MediaHybridCacheTests.cs
  • Excess Number of Function Arguments ContentTypeEditingBuilder.cs: CreateSimpleContentType

Annotations

Check warning on line 131 in src/Umbraco.PublishedCache.HybridCache/NotificationHandlers/CacheRefreshingNotificationHandler.cs

See this annotation in the file changed.

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

❌ New issue: Code Duplication

The module contains 2 functions with similar structure: HandleAsync,HandleAsync. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.

Check notice on line 69 in src/Umbraco.PublishedCache.HybridCache/Services/DocumentCacheService.cs

See this annotation in the file changed.

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

ℹ Getting worse: Constructor Over-Injection

DocumentCacheService increases from 9 to 10 arguments, threshold = 5. This constructor has too many arguments, indicating an object with low cohesion or missing function argument abstraction. Avoid adding more arguments.

Check notice on line 1 in tests/Umbraco.Tests.Common/Builders/ContentEditingBuilder.cs

See this annotation in the file changed.

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

ℹ Getting worse: Primitive Obsession

The ratio of primitive types in function arguments increases from 95.45% to 100.00%, 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 77 in tests/Umbraco.Tests.Common/Builders/ContentEditingBuilder.cs

See this annotation in the file changed.

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

ℹ New issue: Excess Number of Function Arguments

CreateContentWithTwoInvariantProperties has 7 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.

Check notice on line 1 in tests/Umbraco.Tests.Common/Builders/ContentEditingBuilder.cs

See this annotation in the file changed.

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

ℹ Getting worse: String Heavy Function Arguments

The ratio of strings in function arguments increases from 50.00% to 54.17%, 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 tests/Umbraco.Tests.Common/Builders/ContentTypeEditingBuilder.cs

See this annotation in the file changed.

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

ℹ Getting worse: Primitive Obsession

The ratio of primitive types in function arguments increases from 82.61% to 95.83%, 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 65 in tests/Umbraco.Tests.Common/Builders/ContentTypeEditingBuilder.cs

See this annotation in the file changed.

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

✅ No longer an issue: Excess Number of Function Arguments

CreateSimpleContentType is no longer above the threshold for number of arguments. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.

Check notice on line 220 in tests/Umbraco.Tests.Common/Builders/ContentTypeEditingBuilder.cs

See this annotation in the file changed.

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

ℹ New issue: Excess Number of Function Arguments

CreateContentTypeWithTwoPropertiesOneVariantAndOneInvariant has 6 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.

Check notice on line 1 in tests/Umbraco.Tests.Common/Builders/ContentTypeEditingBuilder.cs

See this annotation in the file changed.

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

ℹ Getting worse: String Heavy Function Arguments

The ratio of strings in function arguments increases from 47.83% to 79.17%, 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 tests/Umbraco.Tests.Common/Builders/Extensions/BuilderExtensions.cs

See this annotation in the file changed.

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

ℹ Getting worse: Primitive Obsession

The ratio of primitive types in function arguments increases from 39.13% to 42.27%, 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 warning on line 31 in tests/Umbraco.Tests.Common/Builders/MediaEditingBuilder.cs

See this annotation in the file changed.

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

❌ New issue: Excess Number of Function Arguments

CreateMediaWithAProperty has 5 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.

Check warning on line 154 in tests/Umbraco.Tests.Integration/Testing/UmbracoIntegrationTestWithMediaEditing.cs

See this annotation in the file changed.

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

❌ New issue: Complex Method

CreateTestData 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 119 in tests/Umbraco.Tests.Integration/Umbraco.PublishedCache.HybridCache/MediaHybridCacheTests.cs

See this annotation in the file changed.

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

ℹ Getting worse: Code Duplication

introduced similar code in: Can_Get_Updated_Media_By_Id,Can_Get_Updated_Media_By_Key. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.

Check notice on line 1 in tests/Umbraco.Tests.Integration/Umbraco.PublishedCache.HybridCache/MediaHybridCacheTests.cs

See this annotation in the file changed.

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

✅ Getting better: Code Duplication

reduced similar code in: Can_Get_Media_By_Id,Can_Get_Media_By_Key,Cannot_Get_Deleted_Media_By_Id,Cannot_Get_Deleted_Media_By_Key. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.

Check notice on line 34 in src/Umbraco.Core/Cache/Refreshers/Implement/ContentTypeCacheRefresher.cs

See this annotation in the file changed.

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

ℹ Getting worse: Constructor Over-Injection

ContentTypeCacheRefresher increases from 7 to 8 arguments, threshold = 5. This constructor has too many arguments, indicating an object with low cohesion or missing function argument abstraction. Avoid adding more arguments.

Check notice on line 30 in src/Umbraco.Core/Cache/Refreshers/Implement/DataTypeCacheRefresher.cs

See this annotation in the file changed.

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

ℹ Getting worse: Constructor Over-Injection

DataTypeCacheRefresher increases from 6 to 7 arguments, threshold = 5. This constructor has too many arguments, indicating an object with low cohesion or missing function argument abstraction. Avoid adding more arguments.

Check notice on line 1 in src/Umbraco.Core/Services/EntityTypeContainerService.cs

See this annotation in the file changed.

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

ℹ Getting worse: Primitive Obsession

The ratio of primitive types in function arguments increases from 44.83% to 48.39%, 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.