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

Resolved more warnings, and marked more warning types as errors #16991

Merged
merged 18 commits into from
Sep 24, 2024

Comment tweak

2bb6c17
Select commit
Loading
Failed to load commit list.
Merged

Resolved more warnings, and marked more warning types as errors #16991

Comment tweak
2bb6c17
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (contrib) failed Sep 12, 2024 in 2m 50s

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) 🔥

View detailed results in CodeScene

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

See this annotation in the file changed.

@codescene-delta-analysis 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.

Check notice on line 859 in src/Umbraco.Infrastructure/Persistence/Repositories/Implement/UserRepository.cs

See this annotation in the file changed.

@codescene-delta-analysis 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

See this annotation in the file changed.

@codescene-delta-analysis 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.

Check notice on line 1 in tests/Umbraco.Tests.Integration/Umbraco.Core/Services/ContentServiceTests.cs

See this annotation in the file changed.

@codescene-delta-analysis 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.

Check notice on line 331 in tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServicePublishBranchTests.cs

See this annotation in the file changed.

@codescene-delta-analysis 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.

Check notice on line 1 in tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentTypeServiceTests.cs

See this annotation in the file changed.

@codescene-delta-analysis 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.

Check warning on line 69 in src/Umbraco.Cms.Api.Management/DependencyInjection/BackOfficeAuthPolicyBuilderExtensions.cs

See this annotation in the file changed.

@codescene-delta-analysis 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

See this annotation in the file changed.

@codescene-delta-analysis 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

See this annotation in the file changed.

@codescene-delta-analysis 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

See this annotation in the file changed.

@codescene-delta-analysis 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.

Check notice on line 1 in src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs

See this annotation in the file changed.

@codescene-delta-analysis 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.

Check notice on line 1 in src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DocumentRepository.cs

See this annotation in the file changed.

@codescene-delta-analysis 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.

Check warning on line 200 in src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DocumentRepository.cs

See this annotation in the file changed.

@codescene-delta-analysis 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.

Check warning on line 992 in src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DocumentRepository.cs

See this annotation in the file changed.

@codescene-delta-analysis 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.

Check notice on line 1 in src/Umbraco.Infrastructure/Persistence/Repositories/Implement/TrackedReferencesRepository.cs

See this annotation in the file changed.

@codescene-delta-analysis 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.

Check warning on line 568 in src/Umbraco.Infrastructure/Persistence/Repositories/Implement/TrackedReferencesRepository.cs

See this annotation in the file changed.

@codescene-delta-analysis 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

See this annotation in the file changed.

@codescene-delta-analysis 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

See this annotation in the file changed.

@codescene-delta-analysis 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.