{"results":{"result":{"added-files":{"code-health":10.0,"old-code-health":0.0,"files":[{"file":"lib/features/caching/clients/sentry_configuration_cache_client.dart","loc":10,"code-health":10.0},{"file":"lib/features/caching/clients/sentry_user_cache_client.dart","loc":10,"code-health":10.0},{"file":"lib/features/caching/entries/sentry_configuration_cache.dart","loc":64,"code-health":10.0},{"file":"lib/features/caching/entries/sentry_user_cache.dart","loc":28,"code-health":10.0},{"file":"lib/features/caching/extensions/sentry_cache_extensions.dart","loc":62,"code-health":10.0},{"file":"lib/features/caching/manager/sentry_configuration_cache_manager.dart","loc":62,"code-health":10.0}]},"external-review-url":"https://github.com/linagora/tmail-flutter/pull/4443","old-code-health":9.375486353626103,"modified-files":{"code-health":10.0,"old-code-health":9.375486353626103,"files":[{"file":"core/lib/utils/sentry/sentry_config.dart","loc":58,"old-loc":59,"code-health":10.0,"old-code-health":9.6882083290695},{"file":"lib/features/caching/caching_manager.dart","loc":205,"old-loc":200,"code-health":10.0,"old-code-health":10.0},{"file":"lib/features/caching/config/hive_cache_config.dart","loc":261,"old-loc":249,"code-health":10.0,"old-code-health":10.0},{"file":"lib/features/caching/exceptions/local_storage_exception.dart","loc":16,"old-loc":6,"code-health":10.0,"old-code-health":10.0},{"file":"lib/features/mailbox_dashboard/presentation/extensions/ai_scribe/setup_scribe_prompt_url_extension.dart","loc":57,"old-loc":55,"code-health":10.0,"old-code-health":10.0},{"file":"lib/features/mailbox_dashboard/presentation/mixin/sentry_ecosystem_mixin.dart","loc":54,"old-loc":34,"code-health":10.0,"old-code-health":10.0},{"file":"lib/features/push_notification/presentation/controller/fcm_message_controller.dart","loc":292,"old-loc":188,"code-health":10.0,"old-code-health":8.816158827775617},{"file":"lib/features/push_notification/presentation/listener/email_change_listener.dart","loc":347,"old-loc":323,"code-health":10.0,"old-code-health":8.207341892489644},{"file":"lib/features/push_notification/presentation/services/fcm_receiver.dart","loc":79,"old-loc":43,"code-health":10.0,"old-code-health":10.0},{"file":"lib/features/push_notification/presentation/services/fcm_service.dart","loc":49,"old-loc":31,"code-health":10.0,"old-code-health":10.0},{"file":"lib/main/bindings/local/local_bindings.dart","loc":159,"old-loc":125,"code-health":10.0,"old-code-health":10.0}]},"removed-files":{"code-health":0.0,"old-code-health":0.0,"files":[]},"external-review-id":"4443","analysis-time":"2026-04-09T09:52:10Z","negative-impact-count":0,"suppressions":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"affected-hotspots":0,"commits":["1609fcb9b36d485370c900d462d8f359f2865cfa","376a8ea08098459db1a31ce8f7dd46c21a1e5f27","0848c6e9cfc75a0b6a950832de036aa449a18aaa"],"is-negative-review":false,"negative-findings":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"positive-impact-count":10,"repo":"tmail-flutter","code-health":10.0,"version":"3.0","authors":["dab246"],"directives":{"added":[],"removed":[]},"positive-findings":{"number-of-types":3,"number-of-files-touched":3,"findings":[{"method":"SentryConfig.load","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":"core/lib/utils/sentry/sentry_config.dart","change-level":"improvement","is-hotspot?":false,"line":74,"what-changed":"SentryConfig.load 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"},{"name":"Code Duplication","file":"lib/features/push_notification/presentation/controller/fcm_message_controller.dart","change-type":"fixed","change-level":"improvement","is-hotspot?":false,"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":"The module no longer contains too many functions with similar structure"},{"method":"FcmMessageController._handleGetAccountByOidcSuccess","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/push_notification/presentation/controller/fcm_message_controller.dart","change-level":"improvement","is-hotspot?":false,"line":126,"what-changed":"FcmMessageController._handleGetAccountByOidcSuccess 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":"FcmMessageController._handleGetAccountByBasicAuthSuccess","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/push_notification/presentation/controller/fcm_message_controller.dart","change-level":"improvement","is-hotspot?":false,"line":151,"what-changed":"FcmMessageController._handleGetAccountByBasicAuthSuccess 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":"EmailChangeListener.handleSuccessViewState","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/push_notification/presentation/listener/email_change_listener.dart","change-level":"improvement","is-hotspot?":false,"line":206,"what-changed":"EmailChangeListener.handleSuccessViewState 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":"EmailChangeListener.dispatchActions","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/push_notification/presentation/listener/email_change_listener.dart","change-level":"improvement","is-hotspot?":false,"line":90,"what-changed":"EmailChangeListener.dispatchActions 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":"EmailChangeListener._getStoredEmailState","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/push_notification/presentation/listener/email_change_listener.dart","change-level":"improvement","is-hotspot?":false,"line":145,"what-changed":"EmailChangeListener._getStoredEmailState 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":"EmailChangeListener._getEmailChangesAction","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/push_notification/presentation/listener/email_change_listener.dart","change-level":"improvement","is-hotspot?":false,"line":151,"what-changed":"EmailChangeListener._getEmailChangesAction 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":"EmailChangeListener._handleListEmailToPushNotification","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/push_notification/presentation/listener/email_change_listener.dart","change-level":"improvement","is-hotspot?":false,"line":248,"what-changed":"EmailChangeListener._handleListEmailToPushNotification 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":"EmailChangeListener._getListDetailedEmailByIdAction","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/push_notification/presentation/listener/email_change_listener.dart","change-level":"improvement","is-hotspot?":false,"line":322,"what-changed":"EmailChangeListener._getListDetailedEmailByIdAction 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"}]},"notices":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"external-review-provider":"GitHub"},"analysistime":"2026-04-09T09:52:09.000Z","project-name":"james-project","repository":"https://github.com/linagora/tmail-flutter.git"}}