V15/task/cleanup obsolete #17433
V15/task/cleanup obsolete #17433
CodeScene PR Check
❌ Code Health Quality Gates: FAILED
Change in average Code Health of affected files: -0.05 (6.19 -> 6.14)
- Declining Code Health: 4 findings(s) 🚩
- Improving Code Health: 17 findings(s) ✅
- Affected Hotspots: 5 files(s) 🔥
Details
🚩 Declining Code Health (highest to lowest):
- Overall Code Complexity ContentCacheRefresher.cs
- Code Duplication TypeLoader.cs
- Excess Number of Function Arguments OEmbedProviderBase.cs: GetXmlBasedMarkupAsync
- String Heavy Function Arguments UserGroupServiceTests.cs
✅ Improving Code Health:
- Lines of Code in a Single File DatabaseDataCreator.cs 🔥
- Overall Code Complexity InMemoryModelFactory.cs
- Large Method UmbracoBuilder.CoreServices.cs: AddCoreNotifications 🔥
- Primitive Obsession OEmbedProviderBase.cs
- Complex Method ContentFinderByIdPath.cs: TryFindContent
- Primitive Obsession DataTypeService.cs 🔥
- Primitive Obsession InMemoryModelFactory.cs
- Code Duplication UmbracoEFCoreServiceCollectionExtensions.cs
- Constructor Over-Injection TypeLoader.cs: TypeLoader
- Constructor Over-Injection TypeLoader.cs: TypeLoader
- Large Method UmbracoBuilder.Configuration.cs: AddConfiguration
- Excess Number of Function Arguments IValueConnector.cs: ToArtifactAsync
- Excess Number of Function Arguments IValueConnector.cs: FromArtifactAsync
- Code Duplication OEmbedProviderBase.cs
- String Heavy Function Arguments OEmbedProviderBase.cs
- Complex Conditional ContentFinderByIdPath.cs: TryFindContent
- Complex Method ComponentTests.cs: Initialize
Annotations
Check notice on line 1 in src/Umbraco.Core/Services/UserService.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (release/15.0)
ℹ Getting worse: Lines of Code in a Single File
The lines of code increases from 1784 to 1785, 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 src/Umbraco.Core/Media/EmbedProviders/OEmbedProviderBase.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (release/15.0)
✅ No longer an issue: Code Duplication
The module no longer contains too many functions with similar structure
Check notice on line 1 in src/Umbraco.Core/Media/EmbedProviders/OEmbedProviderBase.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (release/15.0)
✅ Getting better: Primitive Obsession
The ratio of primitive types in function arguments decreases from 72.73% to 71.43%, 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 117 in src/Umbraco.Core/Media/EmbedProviders/OEmbedProviderBase.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (release/15.0)
❌ New issue: Excess Number of Function Arguments
GetXmlBasedMarkupAsync has 5 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.
Check notice on line 1 in src/Umbraco.Core/Media/EmbedProviders/OEmbedProviderBase.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (release/15.0)
✅ No longer an issue: String Heavy Function Arguments
The ratio of strings in function arguments is no longer above the threshold
codescene-delta-analysis / CodeScene Cloud Delta Analysis (release/15.0)
❌ New issue: String Heavy Function Arguments
In this module, 58.3% of all arguments to its 9 functions are strings. The threshold for string arguments is 39.0%. The functions in this file have a high ratio of strings as arguments. Avoid adding more.
Check notice on line 1 in src/Umbraco.Core/Services/DataTypeService.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (release/15.0)
✅ Getting better: Primitive Obsession
The ratio of primitive types in function arguments decreases from 65.43% to 65.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 1 in src/Umbraco.Web.Common/ModelsBuilder/InMemoryAuto/InMemoryModelFactory.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (release/15.0)
✅ Getting better: Overall Code Complexity
The mean cyclomatic complexity decreases from 5.19 to 5.09, 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 src/Umbraco.Web.Common/ModelsBuilder/InMemoryAuto/InMemoryModelFactory.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (release/15.0)
✅ Getting better: Primitive Obsession
The ratio of primitive types in function arguments decreases from 44.44% to 32.43%, 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (release/15.0)
ℹ New issue: Constructor Over-Injection
InMemoryModelFactory has 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (release/15.0)
✅ No longer an issue: Code Duplication
The module no longer contains too many functions with similar structure
Check warning on line 1 in src/Umbraco.Core/Cache/Refreshers/Implement/ContentCacheRefresher.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (release/15.0)
❌ New issue: Overall Code Complexity
This module has a mean cyclomatic complexity of 4.40 across 15 functions. The mean complexity threshold is 4. This file has many conditional statements (e.g. if, for, while) across its implementation, leading to lower code health. Avoid adding more conditionals.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (release/15.0)
✅ Getting better: Large Method
AddCoreNotifications decreases from 91 to 90 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 notice on line 1 in src/Umbraco.Infrastructure/Migrations/Install/DatabaseDataCreator.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (release/15.0)
✅ Getting better: Lines of Code in a Single File
The lines of code decreases from 2101 to 2100, 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 314 in tests/Umbraco.Tests.UnitTests/Umbraco.Core/Components/ComponentTests.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (release/15.0)
✅ No longer an issue: Complex Method
Initialize is no longer above the threshold for cyclomatic complexity
Check warning on line 1 in src/Umbraco.Core/Composing/TypeLoader.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (release/15.0)
❌ New issue: Code Duplication
The module contains 2 functions with similar structure: GetTypes,GetTypesWithAttribute. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.
Check notice on line 29 in src/Umbraco.Core/Composing/TypeLoader.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (release/15.0)
✅ No longer an issue: Constructor Over-Injection
TypeLoader is no longer above the threshold for number of arguments
Check notice on line 29 in src/Umbraco.Core/Composing/TypeLoader.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (release/15.0)
✅ No longer an issue: Constructor Over-Injection
TypeLoader is no longer above the threshold for number of arguments
Check notice on line 111 in src/Umbraco.Core/DependencyInjection/UmbracoBuilder.Configuration.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (release/15.0)
✅ No longer an issue: Large Method
AddConfiguration is no longer above the threshold for lines of code
Check notice on line 123 in src/Umbraco.Core/DependencyInjection/UmbracoBuilder.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (release/15.0)
ℹ New issue: Constructor Over-Injection
UmbracoBuilder has 6 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 56 in src/Umbraco.Core/Routing/ContentFinderByIdPath.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (release/15.0)
✅ Getting better: Complex Method
TryFindContent decreases in cyclomatic complexity from 11 to 10, 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 56 in src/Umbraco.Core/Routing/ContentFinderByIdPath.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (release/15.0)
✅ No longer an issue: Complex Conditional
TryFindContent no longer has a complex conditional
Check notice on line 34 in src/Umbraco.Core/Deploy/IValueConnector.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (release/15.0)
✅ No longer an issue: Excess Number of Function Arguments
ToArtifactAsync is no longer above the threshold for number of arguments
Check notice on line 54 in src/Umbraco.Core/Deploy/IValueConnector.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (release/15.0)
✅ No longer an issue: Excess Number of Function Arguments
FromArtifactAsync is no longer above the threshold for number of arguments