{"results":{"result":{"added-files":{"code-health":10.0,"old-code-health":0.0,"files":[{"file":"src/Umbraco.Infrastructure/Persistence/DefaultDatabaseAvailabilityCheck.cs","loc":28,"code-health":10.0},{"file":"tests/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Persistence/DefaultDatabaseAvailabilityCheckTests.cs","loc":60,"code-health":10.0}]},"external-review-url":"https://github.com/umbraco/Umbraco-CMS/pull/19848","old-code-health":8.7241519375158,"modified-files":{"code-health":8.718739676205324,"old-code-health":8.7241519375158,"files":[{"file":"src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.CoreServices.cs","loc":372,"old-loc":371,"code-health":8.847084903546339,"old-code-health":8.852066566277504},{"file":"src/Umbraco.Infrastructure/Runtime/RuntimeState.cs","loc":244,"old-loc":236,"code-health":8.523065805013285,"old-code-health":8.523065805013285}]},"removed-files":{"code-health":0.0,"old-code-health":0.0,"files":[]},"external-review-id":"19848","analysis-time":"2025-08-04T06:54:13Z","negative-impact-count":1,"suppressions":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"affected-hotspots":0,"commits":["18f1318f44e90e56749aed8665ca84fd572a4398","106154430a55174ff16a9a422d5e1698a8dbaf38"],"is-negative-review":true,"negative-findings":{"number-of-types":1,"number-of-files-touched":1,"findings":[{"method":"AddCoreInitialServices","why-it-occurs":"Overly long functions make the code harder to read. The recommended maximum function length for the C# language is 70 lines of code. Severity: Brain Method - Complex Method - Long Method.","name":"Large Method","file":"src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.CoreServices.cs","refactoring-examples":null,"change-level":"warning","is-hotspot?":false,"line":74,"what-changed":"AddCoreInitialServices increases from 119 to 120 lines of code, threshold = 70","how-to-fix":"We recommend to be careful here -- just splitting long functions don't necessarily make the code easier to read. Instead, look for natural chunks inside the functions that expresses a specific task or concern. Often, such concerns are indicated by a Code Comment followed by an if-statement. Use the [EXTRACT FUNCTION](https://refactoring.com/catalog/extractFunction.html) refactoring to encapsulate that concern.","change-type":"degraded"}]},"positive-impact-count":1,"repo":"Umbraco-CMS","code-health":8.87889721667966,"version":"3.0","authors":["Andy Butland"],"directives":{"added":[],"removed":[]},"positive-findings":{"number-of-types":1,"number-of-files-touched":1,"findings":[{"name":"Overall Code Complexity","file":"src/Umbraco.Infrastructure/Runtime/RuntimeState.cs","change-type":"improved","change-level":"improvement","is-hotspot?":false,"why-it-occurs":"Overall Code Complexity is measured by the mean cyclomatic complexity across all functions in the file. The lower the number, the better.\n\nCyclomatic complexity is a function level metric that measures the number of logical branches (if-else, loops, etc.). Cyclomatic complexity is a rough complexity measure, but useful as a way of estimating the minimum number of unit tests you would need. As such, prefer functions with low cyclomatic complexity (2-3 branches).","how-to-fix":"You address the overall cyclomatic complexity by a) modularizing the code, and b) abstract away the complexity. Let's look at some examples:\n\nModularizing the Code: Do an X-Ray and inspect the local hotspots. Are there any complex conditional expressions? If yes, then do a [DECOMPOSE CONDITIONAL](https://refactoring.com/catalog/decomposeConditional.html) refactoring. Extract the conditional logic into a separate function and put a good name on that function. This clarifies the intent and makes the original function easier to read. Repeat until all complex conditional expressions have been simplified.\n\n","what-changed":"The mean cyclomatic complexity decreases from 4.75 to 4.25, threshold = 4"}]},"notices":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"external-review-provider":"GitHub"},"analysistime":"2025-08-04T06:54:13.000Z","project-name":"Umbraco-CMS","repository":"https://github.com/umbraco/Umbraco-CMS.git"}}