{"results":{"result":{"added-files":{"code-health":10.0,"old-code-health":0.0,"files":[{"file":"src/Umbraco.Infrastructure/PropertyEditors/Validators/RichTextRegexValidator.cs","loc":25,"code-health":10.0}]},"external-review-url":"https://github.com/umbraco/Umbraco-CMS/pull/19045","old-code-health":8.971531001361747,"modified-files":{"code-health":8.831319834332811,"old-code-health":8.971531001361747,"files":[{"file":"src/Umbraco.Core/PropertyEditors/Validators/RegexValidator.cs","loc":66,"old-loc":66,"code-health":10.0,"old-code-health":10.0},{"file":"src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.CoreServices.cs","loc":372,"old-loc":371,"code-health":8.932204647937326,"old-code-health":8.937240348296928},{"file":"src/Umbraco.Infrastructure/PropertyEditors/RichTextPropertyEditor.cs","loc":401,"old-loc":355,"code-health":8.545379580978913,"old-code-health":8.816158827775617}]},"removed-files":{"code-health":0.0,"old-code-health":0.0,"files":[]},"external-review-id":"19045","analysis-time":"2025-05-05T17:41:46Z","negative-impact-count":2,"suppressions":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"affected-hotspots":0,"commits":["0414c91dae51e3f50e60f09a6f1299b3fd30b581","a77bea24d687267fafee92e93e4d0ef5df6681f5"],"is-negative-review":true,"negative-findings":{"number-of-types":2,"number-of-files-touched":2,"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 107 to 108 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"},{"why-it-occurs":"Duplicated code often leads to code that's harder to change since the same logical change has to be done in multiple functions. More duplication gives lower code health.","name":"Code Duplication","file":"src/Umbraco.Infrastructure/PropertyEditors/RichTextPropertyEditor.cs","refactoring-examples":null,"change-level":"warning","is-hotspot?":false,"line":183,"what-changed":"introduced similar code in: RichTextPropertyValueEditor,RichTextPropertyValueEditor","how-to-fix":"A certain degree of duplicated code might be acceptable. The problems start when it is the same behavior that is duplicated across the functions in the module, ie. a violation of the Don't Repeat Yourself (DRY) principle. DRY violations lead to code that is changed together in predictable patterns, which is both expensive and risky. DRY violations can be identified using CodeScene's X-Ray analysis to detect clusters of change coupled functions with high code similarity. [Read More](https://codescene.com/blog/software-revolution-part3/)\n\nOnce you have identified the similarities across functions, look to extract and encapsulate the concept that varies into its own function(s). These shared abstractions can then be re-used, which minimizes the amount of duplication and simplifies change.","change-type":"degraded"}]},"positive-impact-count":0,"repo":"Umbraco-CMS","code-health":8.865135811348646,"version":"3.0","authors":["Tom van Enckevort","Migaroez"],"directives":{"added":[],"removed":[]},"positive-findings":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"notices":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"external-review-provider":"GitHub"},"analysistime":"2025-05-05T17:41:46.000Z","project-name":"Umbraco-CMS","repository":"https://github.com/umbraco/Umbraco-CMS.git"}}