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

Delivery API: Fix numeric and date based filters #15286

Merged
merged 2 commits into from
Nov 27, 2023

Merge remote-tracking branch 'origin/release/13.0' into v13/fix/deliv…

296aa8b
Select commit
Loading
Failed to load commit list.
Merged

Delivery API: Fix numeric and date based filters #15286

Merge remote-tracking branch 'origin/release/13.0' into v13/fix/deliv…
296aa8b
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (release/13.0) succeeded Nov 27, 2023 in 40s

CodeScene PR Check

Code Health Quality Gates: OK

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

Recommended Review Level: Lightweight sanity check
View detailed results in CodeScene

Details

🚩 Declining Code Health (highest to lowest):

  • Code Duplication ApiContentQueryFilterBuilder.cs
  • Complex Method ApiContentQuerySortBuilder.cs: Append
  • Complex Method ApiContentQueryFilterBuilder.cs: Append
  • Excess Number of Function Arguments ApiContentQuerySelectorBuilder.cs: Build

✅ Improving Code Health:

  • Excess Number of Function Arguments ApiContentQueryProvider.cs: BuildSelectorOperation
  • Complex Method ApiContentQueryProvider.cs: ApplySorting
  • Complex Method ApiContentQueryProvider.cs: ApplyFiltering
  • Overall Code Complexity ApiContentQueryProvider.cs
  • Primitive Obsession ApiContentQueryProvider.cs

Annotations

Check notice on line 103 in src/Umbraco.Cms.Api.Delivery/Services/ApiContentQueryProvider.cs

See this annotation in the file changed.

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

✅ No longer an issue: Excess Number of Function Arguments

BuildSelectorOperation 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 103 in src/Umbraco.Cms.Api.Delivery/Services/ApiContentQueryProvider.cs

See this annotation in the file changed.

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

✅ No longer an issue: Complex Method

ApplySorting is no longer above the threshold for cyclomatic complexity

Check notice on line 103 in src/Umbraco.Cms.Api.Delivery/Services/ApiContentQueryProvider.cs

See this annotation in the file changed.

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

✅ No longer an issue: Complex Method

ApplyFiltering is no longer above the threshold for cyclomatic complexity

Check notice on line 1 in src/Umbraco.Cms.Api.Delivery/Services/ApiContentQueryProvider.cs

See this annotation in the file changed.

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

✅ No longer an issue: Overall Code Complexity

The mean cyclomatic complexity in this module is no longer above the threshold

Check notice on line 1 in src/Umbraco.Cms.Api.Delivery/Services/ApiContentQueryProvider.cs

See this annotation in the file changed.

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

✅ No longer an issue: Primitive Obsession

The ratio of primivite types in function arguments is no longer above the threshold

Check warning on line 94 in src/Umbraco.Cms.Api.Delivery/Services/QueryBuilders/ApiContentQueryFilterBuilder.cs

See this annotation in the file changed.

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

❌ New issue: Code Duplication

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

Check warning on line 57 in src/Umbraco.Cms.Api.Delivery/Services/QueryBuilders/ApiContentQueryFilterBuilder.cs

See this annotation in the file changed.

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

❌ New issue: Complex Method

Append has a cyclomatic complexity of 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 56 in src/Umbraco.Cms.Api.Delivery/Services/QueryBuilders/ApiContentQuerySelectorBuilder.cs

See this annotation in the file changed.

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

❌ New issue: Excess Number of Function Arguments

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

Check warning on line 48 in src/Umbraco.Cms.Api.Delivery/Services/QueryBuilders/ApiContentQuerySortBuilder.cs

See this annotation in the file changed.

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

❌ New issue: Complex Method

Append has a cyclomatic complexity of 15, 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.