{"results":{"result":{"added-files":{"code-health":10.0,"old-code-health":0.0,"files":[{"file":"lib/features/labels/presentation/delegates/add_list_label_to_list_emails_delegate.dart","loc":82,"code-health":10.0},{"file":"lib/features/labels/domain/model/add_list_labels_to_list_emails_params.dart","loc":20,"code-health":10.0}]},"external-review-url":"https://github.com/linagora/tmail-flutter/pull/4431","old-code-health":7.5392311782947266,"modified-files":{"code-health":7.605425452786387,"old-code-health":7.5172355732934815,"files":[{"file":"lib/features/mailbox_dashboard/presentation/bindings/email_action_interactor_bindings.dart","loc":15,"old-loc":13,"code-health":10.0,"old-code-health":10.0},{"file":"lib/features/mailbox_dashboard/presentation/extensions/labels/handle_logic_label_extension.dart","loc":93,"old-loc":74,"code-health":10.0,"old-code-health":10.0},{"file":"lib/features/mailbox_dashboard/presentation/mailbox_dashboard_view_web.dart","loc":869,"old-loc":867,"code-health":6.773788371221836,"old-code-health":6.773788371221836},{"file":"lib/features/search/email/presentation/search_email_bindings.dart","loc":47,"old-loc":40,"code-health":10.0,"old-code-health":10.0},{"file":"lib/features/search/email/presentation/search_email_controller.dart","loc":1064,"old-loc":1054,"code-health":8.545379580978913,"old-code-health":8.545379580978913},{"file":"lib/features/search/email/presentation/search_email_view.dart","loc":769,"old-loc":766,"code-health":8.82332721481164,"old-code-health":8.83823641682602},{"file":"lib/features/thread/presentation/thread_bindings.dart","loc":97,"old-loc":90,"code-health":10.0,"old-code-health":10.0},{"file":"lib/features/thread/presentation/thread_controller.dart","loc":1477,"old-loc":1464,"code-health":7.165122474719682,"old-code-health":6.897232245067055},{"file":"lib/features/thread/presentation/thread_view.dart","loc":800,"old-loc":797,"code-health":5.422203763744295,"old-code-health":5.430631319878926},{"file":"lib/features/thread_detail/presentation/extension/labels/add_label_to_thread_extension.dart","loc":198,"old-loc":198,"code-health":10.0,"old-code-health":10.0},{"file":"lib/features/email/domain/state/labels/add_list_label_to_list_email_state.dart","loc":44,"old-loc":36,"code-health":10.0,"old-code-health":10.0}]},"removed-files":{"code-health":0.0,"old-code-health":8.816158827775617,"files":[{"file":"lib/features/mailbox_dashboard/presentation/extensions/update_current_emails_flags_extension.dart","loc":0,"old-loc":93,"old-code-health":8.816158827775617}]},"external-review-id":"4431","analysis-time":"2026-04-07T05:37:26Z","negative-impact-count":0,"suppressions":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"affected-hotspots":1,"commits":["cf6dc93707d66f170b48da24d1e37b70616de53c","898415ce66910ce76e64ab24b4807e80fab2cfb8","8537306729d748551754b6d3acedbe7572137015","5c93357e77a0519093d05a1379d0c8e9c1a5f707","f04c02c24a664d8e6b6caeacad9a33cafeae07e6","aab8bf778f71e9bde0ef3298c14697b8b93a4d86","1fbdda6ecca121e6ebfaa9c37d951598a24edbe6"],"is-negative-review":false,"negative-findings":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"positive-impact-count":4,"repo":"tmail-flutter","code-health":7.649236502798188,"version":"3.0","authors":["Dang Dat","coderabbitai[bot]"],"directives":{"added":[],"removed":[]},"positive-findings":{"number-of-types":3,"number-of-files-touched":2,"findings":[{"method":"updateEmailFlagByEmailIds","why-it-occurs":"A Complex Method has a high cyclomatic complexity. The recommended threshold for the Dart language is a cyclomatic complexity lower than 9.","name":"Complex Method","file":"lib/features/mailbox_dashboard/presentation/extensions/update_current_emails_flags_extension.dart","change-level":"improvement","is-hotspot?":false,"line":11,"what-changed":"updateEmailFlagByEmailIds is no longer above the threshold for cyclomatic complexity","how-to-fix":"There are many reasons for Complex Method. Sometimes, another design approach is beneficial such as a) modeling state using an explicit state machine rather than conditionals, or b) using table lookup rather than long chains of logic. In other scenarios, the function can be split using [EXTRACT FUNCTION](https://refactoring.com/catalog/extractFunction.html). Just make sure you extract natural and cohesive functions. Complex Methods can also be addressed by identifying complex conditional expressions and then using the [DECOMPOSE CONDITIONAL](https://refactoring.com/catalog/decomposeConditional.html) refactoring.","change-type":"fixed"},{"method":"updateEmailFlagByEmailIds","why-it-occurs":"A complex conditional is an expression inside a branch such as an <code>if</code>-statmeent which consists of multiple, logical operations. Example: <code>if (x.started() && y.running())</code>.Complex conditionals make the code even harder to read, and contribute to the Complex Method code smell. Encapsulate them.","name":"Complex Conditional","file":"lib/features/mailbox_dashboard/presentation/extensions/update_current_emails_flags_extension.dart","change-level":"improvement","is-hotspot?":false,"line":20,"what-changed":"updateEmailFlagByEmailIds no longer has a complex conditional","how-to-fix":"Apply the [DECOMPOSE CONDITIONAL](https://refactoring.com/catalog/decomposeConditional.html) refactoring so that the complex conditional is encapsulated in a separate function with a good name that captures the business rule. Optionally, for simple expressions, introduce a new variable which holds the result of the complex conditional.","change-type":"fixed"},{"method":"updateEmailFlagByEmailIds","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 Dart language is 4 function arguments.","name":"Excess Number of Function Arguments","file":"lib/features/mailbox_dashboard/presentation/extensions/update_current_emails_flags_extension.dart","change-level":"improvement","is-hotspot?":false,"line":11,"what-changed":"updateEmailFlagByEmailIds 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":"ThreadController.pressEmailSelectionAction","why-it-occurs":"A Complex Method has a high cyclomatic complexity. The recommended threshold for the Dart language is a cyclomatic complexity lower than 9.","name":"Complex Method","file":"lib/features/thread/presentation/thread_controller.dart","change-level":"improvement","is-hotspot?":true,"line":1271,"what-changed":"ThreadController.pressEmailSelectionAction is no longer above the threshold for cyclomatic complexity","how-to-fix":"There are many reasons for Complex Method. Sometimes, another design approach is beneficial such as a) modeling state using an explicit state machine rather than conditionals, or b) using table lookup rather than long chains of logic. In other scenarios, the function can be split using [EXTRACT FUNCTION](https://refactoring.com/catalog/extractFunction.html). Just make sure you extract natural and cohesive functions. Complex Methods can also be addressed by identifying complex conditional expressions and then using the [DECOMPOSE CONDITIONAL](https://refactoring.com/catalog/decomposeConditional.html) refactoring.","change-type":"fixed"}]},"notices":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"external-review-provider":"GitHub"},"analysistime":"2026-04-07T05:37:25.000Z","project-name":"james-project","repository":"https://github.com/linagora/tmail-flutter.git"}}