{"results":{"result":{"added-files":{"code-health":9.952191943790657,"old-code-health":0.0,"files":[{"file":"src/modules/services/components/Picker.jsx","loc":13,"code-health":10.0},{"file":"src/modules/services/components/FilePicker/FilePickerBody.jsx","loc":97,"code-health":10.0},{"file":"src/modules/services/components/FilePicker/FilePickerBodyItem.jsx","loc":115,"code-health":9.6882083290695},{"file":"src/modules/services/components/FilePicker/FilePickerBodyItem.spec.jsx","loc":134,"code-health":10.0},{"file":"src/modules/services/components/FilePicker/FilePickerBreadcrumb.jsx","loc":48,"code-health":10.0},{"file":"src/modules/services/components/FilePicker/FilePickerFooter.jsx","loc":35,"code-health":10.0},{"file":"src/modules/services/components/FilePicker/FilePickerFooter.spec.jsx","loc":33,"code-health":10.0},{"file":"src/modules/services/components/FilePicker/FilePickerHeader.jsx","loc":73,"code-health":10.0},{"file":"src/modules/services/components/FilePicker/helpers.js","loc":22,"code-health":10.0},{"file":"src/modules/services/components/FilePicker/helpers.spec.js","loc":65,"code-health":10.0},{"file":"src/modules/services/components/FilePicker/index.jsx","loc":82,"code-health":10.0},{"file":"src/modules/services/components/FilePicker/queries.js","loc":33,"code-health":10.0}]},"external-review-url":"https://github.com/linagora/twake-drive/pull/3787","old-code-health":10.0,"modified-files":{"code-health":10.0,"old-code-health":10.0,"files":[{"file":"src/targets/intents/index.jsx","loc":36,"old-loc":38,"code-health":10.0,"old-code-health":10.0},{"file":"src/modules/services/components/IntentHandler.jsx","loc":47,"old-loc":47,"code-health":10.0,"old-code-health":10.0}]},"removed-files":{"code-health":0.0,"old-code-health":0.0,"files":[]},"external-review-id":"3787","analysis-time":"2026-04-08T18:29:54Z","negative-impact-count":1,"suppressions":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"affected-hotspots":0,"commits":["2a6446efad785cf59b6ab7b290cfbc4cca1aec1f","8821d126108e4f1511b1ccb69e1fbdbd6d61e5a9","2b26beef9a7fa9eed0e5d1a6eaa0348a7d27879a","7bafde9d473b5e99e46b29e8eda0c27b6c4afe03","75c6bf4568703ce84539ccc6cc038732e8cbc564"],"is-negative-review":true,"negative-findings":{"number-of-types":1,"number-of-files-touched":1,"findings":[{"method":"FilePickerBodyItem","why-it-occurs":"A Complex Method has a high cyclomatic complexity. The recommended threshold for the React language is a cyclomatic complexity lower than 10.","name":"Complex Method","file":"src/modules/services/components/FilePicker/FilePickerBodyItem.jsx","refactoring-examples":[{"diff":"diff --git a/complex_method.js b/complex_method.js\nindex 10cce78e6d..0c1a8cabaf 100644\n--- a/complex_method.js\n+++ b/complex_method.js\n@@ -1,15 +1,20 @@\n function postItem(item) {\n   if (!item.id) {\n-    if (item.x != null && item.y != null) {\n-      post(item);\n-    } else {\n-      throw Error(\"Item must have x and y\");\n-    }\n+    // extract a separate function for creating new item\n+    postNew(item);\n   } else {\n-    if (item.x < 10 && item.y > 25) {\n-      put(item);\n-    } else {\n-      throw Error(\"Item must have an x and y value between 10 and 25\");\n-    }\n+    // and one for updating existing items\n+    updateItem(item);\n   }\n }\n+\n+function postNew(item) {\n+  validateNew(item);\n+  post(item);\n+}\n+\n+function updateItem(item) {\n+  validateUpdate(item);\n+  put(item);\n+}\n+\n","language":"react","improvement-type":"Complex Method"}],"change-level":"warning","is-hotspot?":false,"line":36,"what-changed":"FilePickerBodyItem has a cyclomatic complexity of 11, threshold = 10","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":"introduced"}]},"positive-impact-count":0,"repo":"twake-drive","code-health":9.95695553162424,"version":"3.0","authors":["Théo Poizat"],"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":"2026-04-08T18:29:53.000Z","project-name":"twake-drive","repository":"https://github.com/linagora/twake-drive.git"}}