{"results":{"result":{"added-files":{"code-health":0.0,"old-code-health":0.0,"files":[]},"external-review-url":"https://github.com/BrighterCommand/Brighter/pull/3525","old-code-health":8.116061623276881,"modified-files":{"code-health":8.030210576245004,"old-code-health":8.116061623276881,"files":[{"file":"src/Paramore.Brighter/CommandProcessor.cs","loc":1046,"old-loc":852,"code-health":7.325861446783724,"old-code-health":7.325861446783724},{"file":"src/Paramore.Brighter.Extensions.DependencyInjection/ServiceCollectionExtensions.cs","loc":359,"old-loc":355,"code-health":9.23194447551745,"old-code-health":9.23194447551745},{"file":"src/Paramore.Brighter/CommandProcessorBuilder.cs","loc":225,"old-loc":218,"code-health":9.387218218812514,"old-code-health":9.387218218812514}]},"removed-files":{"code-health":0.0,"old-code-health":0.0,"files":[]},"external-review-id":"3525","analysis-time":"2025-02-27T15:43:32Z","negative-impact-count":0,"suppressions":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"affected-hotspots":3,"commits":["6260bbcdefee0fc3fb27e110124e8c65ea63ddf3","acd973521512d7594768050d61e5ade8c9e430ec","ae390e1c2dc3b56d608b7aa28d16f60b27b74f21","0b9557ec1976f07d1980081db43b64645c86b3ac","038a7fc03d64c738019c12b37e27cc853e5d6fa8","7d26df80562afe6e8a76746ce7c1b5c25044bbbf","b66f31a1d48ee8b2303ec480276ea0c2bde538f3","f3221311274b0cfd9e94ec39cfdf429b8b30dbe5","020d4fef9d70ebd428fb41d87d981e8d4008a8d3"],"is-negative-review":false,"negative-findings":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"positive-impact-count":4,"repo":"Brighter","code-health":8.030210576245004,"version":"3.0","authors":["Dominic Hickie"],"directives":{"added":[],"removed":[]},"positive-findings":{"number-of-types":3,"number-of-files-touched":1,"findings":[{"name":"Code Duplication","file":"src/Paramore.Brighter/CommandProcessor.cs","change-type":"improved","change-level":"improvement","is-hotspot?":true,"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.","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.","what-changed":"reduced similar code in: DepositPost.CallDepositPost,DepositPostAsync.CallDepositPostAsync"},{"name":"Missing Arguments Abstractions","file":"src/Paramore.Brighter/CommandProcessor.cs","change-type":"improved","change-level":"improvement","is-hotspot?":true,"why-it-occurs":"This code health issue is measured as the average number of function arguments across the whole file. A function with many arguments can be simplified either by a) splitting the function if it has too many responsibilities, or b) by introducing an abstraction (class, record, struct, etc.) which encapsulates the arguments. ","how-to-fix":"Start by investigating the responsibilities of the function. Make sure it doesn't do too many things, in which case it should be split into smaller and more cohesive functions. Consider the refactoring [INTRODUCE PARAMETER OBJECT](https://refactoring.com/catalog/introduceParameterObject.html) to encapsulate arguments that refer to the same logical concept.","what-changed":"The average number of function arguments decreases from 4.29 to 4.20, threshold = 4.00"},{"method":"DepositPost.CallDepositPost","why-it-occurs":"Functions with many arguments indicate either a) low cohesion where the function has too many responsibilities, or b) a missing abstraction that encapsulates those arguments.\n\nThe threshold for the C# language is 4 function arguments.","name":"Excess Number of Function Arguments","file":"src/Paramore.Brighter/CommandProcessor.cs","change-level":"improvement","is-hotspot?":true,"line":868,"what-changed":"DepositPost.CallDepositPost is no longer above the threshold for number of arguments","how-to-fix":"Start by investigating the responsibilities of the function. Make sure it doesn't do too many things, in which case it should be split into smaller and more cohesive functions. Consider the refactoring [INTRODUCE PARAMETER OBJECT](https://refactoring.com/catalog/introduceParameterObject.html) to encapsulate arguments that refer to the same logical concept.","change-type":"fixed"},{"method":"DepositPostAsync.CallDepositPostAsync","why-it-occurs":"Functions with many arguments indicate either a) low cohesion where the function has too many responsibilities, or b) a missing abstraction that encapsulates those arguments.\n\nThe threshold for the C# language is 4 function arguments.","name":"Excess Number of Function Arguments","file":"src/Paramore.Brighter/CommandProcessor.cs","change-level":"improvement","is-hotspot?":true,"line":1080,"what-changed":"DepositPostAsync.CallDepositPostAsync is no longer above the threshold for number of arguments","how-to-fix":"Start by investigating the responsibilities of the function. Make sure it doesn't do too many things, in which case it should be split into smaller and more cohesive functions. Consider the refactoring [INTRODUCE PARAMETER OBJECT](https://refactoring.com/catalog/introduceParameterObject.html) to encapsulate arguments that refer to the same logical concept.","change-type":"fixed"}]},"notices":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"external-review-provider":"GitHub"},"analysistime":"2025-02-27T15:43:32.000Z","project-name":"Brighter","repository":"https://github.com/BrighterCommand/Brighter.git"}}