{"results":{"result":{"added-files":{"code-health":0.0,"old-code-health":0.0,"files":[]},"external-review-url":"https://github.com/BrighterCommand/Brighter/pull/3669","old-code-health":8.969223191255654,"modified-files":{"code-health":8.944747369563505,"old-code-health":8.969223191255654,"files":[{"file":"src/Paramore.Brighter.MessagingGateway.RMQ.Async/RmqSubscription.cs","loc":78,"old-loc":77,"code-health":9.6882083290695,"old-code-health":9.6882083290695},{"file":"src/Paramore.Brighter.ServiceActivator/ConsumerFactory.cs","loc":104,"old-loc":101,"code-health":9.6882083290695,"old-code-health":9.6882083290695},{"file":"src/Paramore.Brighter.ServiceActivator/ControlBus/ControlBusReceiverBuilder.cs","loc":184,"old-loc":184,"code-health":8.720298221085535,"old-code-health":8.720298221085535},{"file":"src/Paramore.Brighter.ServiceActivator/Dispatcher.cs","loc":280,"old-loc":303,"code-health":8.545379580978913,"old-code-health":8.679575849015766},{"file":"src/Paramore.Brighter.ServiceActivator/MessagePump.cs","loc":62,"old-loc":62,"code-health":10.0,"old-code-health":10.0},{"file":"src/Paramore.Brighter.ServiceActivator/Proactor.cs","loc":339,"old-loc":318,"code-health":8.246582079748485,"old-code-health":8.246582079748485},{"file":"src/Paramore.Brighter.ServiceActivator/Reactor.cs","loc":334,"old-loc":312,"code-health":8.246582079748485,"old-code-health":8.246582079748485},{"file":"src/Paramore.Brighter/Subscription.cs","loc":106,"old-loc":103,"code-health":9.387218218812514,"old-code-health":9.387218218812514},{"file":"src/Paramore.Brighter.MessagingGateway.AWSSQS/SqsSubscription.cs","loc":75,"old-loc":75,"code-health":9.387218218812514,"old-code-health":9.387218218812514},{"file":"src/Paramore.Brighter.MessagingGateway.AzureServiceBus/AzureServiceBusSubscription.cs","loc":58,"old-loc":56,"code-health":9.6882083290695,"old-code-health":9.6882083290695},{"file":"src/Paramore.Brighter.MessagingGateway.Redis/RedisSubscription.cs","loc":53,"old-loc":52,"code-health":9.6882083290695,"old-code-health":9.6882083290695},{"file":"src/Paramore.Brighter.MessagingGateway.Kafka/KafkaSubscription.cs","loc":105,"old-loc":105,"code-health":9.6882083290695,"old-code-health":9.6882083290695},{"file":"src/Paramore.Brighter.MessagingGateway.MsSql/MsSqlSubscription.cs","loc":53,"old-loc":52,"code-health":9.6882083290695,"old-code-health":9.6882083290695},{"file":"src/Paramore.Brighter.MessagingGateway.AWS.V4/SqsSubscription.cs","loc":76,"old-loc":75,"code-health":9.387218218812514,"old-code-health":9.387218218812514},{"file":"src/Paramore.Brighter.MessagingGateway.Postgres/PostgresSubscription.cs","loc":71,"old-loc":67,"code-health":9.6882083290695,"old-code-health":9.6882083290695},{"file":"src/Paramore.Brighter.MessagingGateway.RMQ.Sync/RmqSubscription.cs","loc":75,"old-loc":73,"code-health":9.6882083290695,"old-code-health":9.6882083290695}]},"removed-files":{"code-health":0.0,"old-code-health":0.0,"files":[]},"external-review-id":"3669","analysis-time":"2025-07-16T15:55:47Z","negative-impact-count":1,"suppressions":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"affected-hotspots":0,"commits":["b3ee6c573f0c514cf6355999b81de019102ef126","beb22582751ab162948a1f1fb8b03d6c223bf71e","96cfcdc2987ea4a2ad6a7d39fcf2bbf4b2752345","960106d4d69889f7be33e8386e6745bc13d8e293","58b55d2324b10a54827d8d8c44f2ce5fe384947d","6e1c870ef8820c4f2f1d781b7e7a74d3bbf7532b","173a134b18c1b481ac91b3646d813aa5ef5edd2c","dd08fe20863044380c2212051d75c68cab1105e9","cabf1c50f1b06fcc937f75dcac4de3fb17e5aacf"],"is-negative-review":true,"negative-findings":{"number-of-types":1,"number-of-files-touched":1,"findings":[{"method":"CreateConsumer","why-it-occurs":"A Bumpy Road is a function that contains multiple chunks of nested conditional logic inside the same function. The deeper the nesting and the more bumps, the lower the code health.\n\nA bumpy code road represents a lack of encapsulation which becomes an obstacle to comprehension. In imperative languages there’s also an increased risk for feature entanglement, which leads to complex state management. CodeScene considers the following rules for the code health impact: 1) The deeper the nested conditional logic of each bump, the higher the tax on our working memory. 2) The more bumps inside a function, the more expensive it is to refactor as each bump represents a missing abstraction. 3) The larger each bump – that is, the more lines of code it spans – the harder it is to build up a mental model of the function. The nesting depth for what is considered a bump is  levels of conditionals.","name":"Bumpy Road Ahead","file":"src/Paramore.Brighter.ServiceActivator/Dispatcher.cs","refactoring-examples":null,"change-level":"warning","is-hotspot?":false,"line":361,"what-changed":"CreateConsumer has 2 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is one single, nested block per function","how-to-fix":"Bumpy Road implementations indicate a lack of encapsulation. Check out the detailed description of the [Bumpy Road code health issue](https://codescene.com/blog/bumpy-road-code-complexity-in-context/).\n\nA Bumpy Road often suggests that the function/method does too many things. The first refactoring step is to identify the different possible responsibilities of the function. Consider extracting those responsibilities into smaller, cohesive, and well-named functions. The [EXTRACT FUNCTION](https://refactoring.com/catalog/extractFunction.html) refactoring is the primary response.","change-type":"introduced"}]},"positive-impact-count":1,"repo":"Brighter","code-health":8.944747369563505,"version":"3.0","authors":["Ian Cooper"],"directives":{"added":[],"removed":[]},"positive-findings":{"number-of-types":1,"number-of-files-touched":1,"findings":[{"name":"Overall Code Complexity","file":"src/Paramore.Brighter.ServiceActivator/Reactor.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 5.44 to 5.20, threshold = 4"}]},"notices":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"external-review-provider":"GitHub"},"analysistime":"2025-07-16T15:55:47.000Z","project-name":"Brighter","repository":"https://github.com/BrighterCommand/Brighter.git"}}