Resolved more warnings, and marked more warning types as errors #16991
CodeScene PR Check
❌ Code Health Quality Gates: FAILED
Change in average Code Health of affected files: -0.00 (6.61 -> 6.61)
- Declining Code Health: 7 findings(s) 🚩
- Improving Code Health: 4 findings(s) ✅
- Affected Hotspots: 2 files(s) 🔥
Details
🚩 Declining Code Health (highest to lowest):
- Complex Method DocumentRepository.cs: MapDtosToContent
- Large Method BackOfficeAuthPolicyBuilderExtensions.cs: CreatePolicies
- Large Method TrackedReferencesRepository.cs: GetPagedDescendantsInReferences
- Complex Method DocumentRepository.cs: PersistNewItem
- Large Method ManagementApiTest.cs: AuthenticateClientAsync
- String Heavy Function Arguments ViewHelper.cs
- Complex Method MemberUserStore.cs: CreateAsync
✅ Improving Code Health:
- Lines of Code in a Single File ContentService.cs 🔥
- Lines of Code in a Single File ContentTypeRepositoryBase.cs
- Lines of Code in a Single File ContentStore.cs
- Large Method ContentServicePublishBranchTests.cs: Can_Publish_Variant_Branch
Annotations
Check notice on line 1 in src/Umbraco.Core/Services/ContentService.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (contrib)
✅ Getting better: Lines of Code in a Single File
The lines of code decreases from 2173 to 2164, 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (contrib)
ℹ Getting worse: Complex Method
PersistUpdatedItem already has high cyclomatic complexity, and now it increases in Lines of Code from 93 to 95. 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 71 in tests/Umbraco.Tests.Integration/ManagementApi/ManagementApiTest.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (contrib)
❌ Getting worse: Large Method
AuthenticateClientAsync increases from 70 to 71 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (contrib)
ℹ Getting worse: Lines of Code in a Single File
The lines of code increases from 2506 to 2507, 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (contrib)
✅ Getting better: Large Method
Can_Publish_Variant_Branch decreases from 80 to 79 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (contrib)
ℹ Getting worse: Lines of Code in a Single File
The lines of code increases from 1624 to 1626, 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (contrib)
❌ Getting worse: Large Method
CreatePolicies increases from 87 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 warning on line 1 in src/Umbraco.Core/IO/ViewHelper.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (contrib)
❌ New issue: String Heavy Function Arguments
In this module, 40.0% 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.Infrastructure/Packaging/PackageDataInstallation.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (contrib)
ℹ Getting worse: Lines of Code in a Single File
The lines of code increases from 1263 to 1278, 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 1129 in src/Umbraco.Infrastructure/Packaging/PackageDataInstallation.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (contrib)
ℹ Getting worse: Complex Method
UpdateContentTypesProperties already has high cyclomatic complexity, and now it increases in Lines of Code from 90 to 91. 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (contrib)
✅ Getting better: Lines of Code in a Single File
The lines of code decreases from 1013 to 1009, 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (contrib)
ℹ Getting worse: Lines of Code in a Single File
The lines of code increases from 1131 to 1158, 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (contrib)
❌ Getting worse: Complex Method
MapDtosToContent already has high cyclomatic complexity, and now it increases in Lines of Code from 112 to 113. 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (contrib)
❌ Getting worse: Complex Method
PersistNewItem already has high cyclomatic complexity, and now it increases in Lines of Code from 116 to 121. 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (contrib)
ℹ Getting worse: Overall Function Size
The median function size increase from 54.0 to 54.5 LOC, threshold = 50.0. This file contains overly long functions, measured by their lines of code.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (contrib)
❌ New issue: Large Method
GetPagedDescendantsInReferences has 75 lines, 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 137 in src/Umbraco.Infrastructure/Security/MemberUserStore.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (contrib)
❌ Getting worse: Complex Method
CreateAsync already has high cyclomatic complexity, and now it increases in Lines of Code from 81 to 82. 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 src/Umbraco.PublishedCache.NuCache/ContentStore.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (contrib)
✅ Getting better: Lines of Code in a Single File
The lines of code decreases from 1187 to 1182, 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.