{"results":{"result":{"added-files":{"code-health":0.0,"old-code-health":0.0,"files":[]},"external-review-url":"https://github.com/linagora/twake-drive/pull/3772","old-code-health":8.98903141590441,"modified-files":{"code-health":9.026732806480588,"old-code-health":8.98903141590441,"files":[{"file":"jestHelpers/setup.js","loc":24,"old-loc":27,"code-health":10.0,"old-code-health":10.0},{"file":"src/lib/flags.js","loc":24,"old-loc":26,"code-health":10.0,"old-code-health":10.0},{"file":"src/modules/layout/Layout.jsx","loc":116,"old-loc":121,"code-health":10.0,"old-code-health":10.0},{"file":"src/modules/public/PublicLayout.jsx","loc":33,"old-loc":39,"code-health":10.0,"old-code-health":10.0},{"file":"src/modules/upload/NewItemHighlightProvider.jsx","loc":38,"old-loc":50,"code-health":10.0,"old-code-health":9.6882083290695},{"file":"src/modules/views/Folder/virtualized/useScrollToHighlightedItem.jsx","loc":40,"old-loc":49,"code-health":9.581652546385712,"old-code-health":9.554464361611602},{"file":"src/modules/views/Folder/virtualized/useScrollToHighlightedItem.spec.jsx","loc":45,"old-loc":52,"code-health":10.0,"old-code-health":10.0},{"file":"test/components/AppLike.jsx","loc":103,"old-loc":109,"code-health":10.0,"old-code-health":10.0},{"file":"src/hooks/useKeyboardShortcuts.spec.jsx","loc":723,"old-loc":725,"code-health":7.945399420487975,"old-code-health":7.923395173432582},{"file":"src/hooks/useKeyboardShortcuts.tsx","loc":318,"old-loc":322,"code-health":8.573097879059372,"old-code-health":8.558693000187485},{"file":"src/modules/views/Public/PublicFolderView.jsx","loc":297,"old-loc":302,"code-health":8.592347096227343,"old-code-health":8.568293205137525},{"file":"src/hooks/useFolderSort/index.spec.jsx","loc":263,"old-loc":271,"code-health":9.387218218812514,"old-code-health":9.387218218812514},{"file":"src/hooks/useFolderSort/index.ts","loc":93,"old-loc":100,"code-health":9.581652546385712,"old-code-health":9.26335021043299},{"file":"src/hooks/useUpdateFavicon/index.spec.jsx","loc":126,"old-loc":140,"code-health":9.387218218812514,"old-code-health":9.096655465156704},{"file":"src/hooks/useUpdateFavicon/index.tsx","loc":39,"old-loc":45,"code-health":10.0,"old-code-health":9.6882083290695},{"file":"src/modules/actions/components/personalizeFolder.js","loc":41,"old-loc":43,"code-health":10.0,"old-code-health":10.0},{"file":"src/modules/drive/Toolbar/personalizeFolder/PersonalizeFolderItem.jsx","loc":45,"old-loc":47,"code-health":9.6882083290695,"old-code-health":9.536386775820924},{"file":"src/modules/filelist/icons/FileIconMime.jsx","loc":42,"old-loc":44,"code-health":9.387218218812514,"old-code-health":9.240656298427343},{"file":"src/hooks/useOnLongPress/helpers.js","loc":118,"old-loc":134,"code-health":10.0,"old-code-health":9.6882083290695},{"file":"src/hooks/useOnLongPress/helpers.spec.jsx","loc":126,"old-loc":123,"code-health":10.0,"old-code-health":10.0},{"file":"src/modules/views/Modal/QualifyFileView.jsx","loc":111,"old-loc":116,"code-health":10.0,"old-code-health":10.0}]},"removed-files":{"code-health":0.0,"old-code-health":0.0,"files":[]},"external-review-id":"3772","analysis-time":"2026-03-30T13:36:52Z","negative-impact-count":0,"suppressions":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"affected-hotspots":2,"commits":["18ae5faad45d69961263fec23a2e9d9337dec448","91c2b11830fa7ba00dc6f991cee05cd03b52dcd0","0c68c3e0a95791a47a0b1afa9fbea90bbf8297b0","aacd93fc5ef7ec3b343eef51f4ce2d602defc8ac","4ebc0a0b2fd441f5d506ed4895cb8217597d9a4d","ef2f775a72cafba884f3db080e54778115b89330","dfa6900cb73d1433e667f83b8afb68b05b19dfdc"],"is-negative-review":false,"negative-findings":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"positive-impact-count":13,"repo":"twake-drive","code-health":9.026732806480588,"version":"3.0","authors":["Théo Poizat"],"directives":{"added":[],"removed":[]},"positive-findings":{"number-of-types":3,"number-of-files-touched":11,"findings":[{"method":"NewItemHighlightProvider","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/upload/NewItemHighlightProvider.jsx","change-level":"improvement","is-hotspot?":false,"line":7,"what-changed":"NewItemHighlightProvider 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":"useScrollToHighlightedItem","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/views/Folder/virtualized/useScrollToHighlightedItem.jsx","change-level":"improvement","is-hotspot?":false,"line":13,"what-changed":"useScrollToHighlightedItem decreases in cyclomatic complexity from 16 to 15, 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":"improved"},{"method":"beforeEach","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/hooks/useKeyboardShortcuts.spec.jsx","change-level":"improvement","is-hotspot?":false,"line":116,"what-changed":"beforeEach decreases in cyclomatic complexity from 16 to 15, 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":"improved"},{"method":"useKeyboardShortcuts","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/hooks/useKeyboardShortcuts.tsx","change-level":"improvement","is-hotspot?":false,"line":55,"what-changed":"useKeyboardShortcuts decreases in cyclomatic complexity from 41 to 40, 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":"improved"},{"method":"PublicFolderView","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/views/Public/PublicFolderView.jsx","change-level":"improvement","is-hotspot?":true,"line":86,"what-changed":"PublicFolderView decreases in cyclomatic complexity from 30 to 24, 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":"improved"},{"method":"useFolderSort","why-it-occurs":"A Complex Method has a high cyclomatic complexity. The recommended threshold for the TypeScript language is a cyclomatic complexity lower than 9.","name":"Complex Method","file":"src/hooks/useFolderSort/index.ts","change-level":"improvement","is-hotspot?":false,"line":26,"what-changed":"useFolderSort decreases in cyclomatic complexity from 17 to 15, threshold = 9","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":"improved"},{"method":"useFolderSort","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":"src/hooks/useFolderSort/index.ts","change-level":"improvement","is-hotspot?":false,"line":43,"what-changed":"useFolderSort 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":"src/hooks/useUpdateFavicon/index.spec.jsx","change-type":"improved","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":"reduced similar code in: 'should not update favicon when fetchStatus is not loaded','should not update favicon when flag is disabled'"},{"method":"useUpdateFavicon","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":"src/hooks/useUpdateFavicon/index.tsx","change-level":"improvement","is-hotspot?":false,"line":37,"what-changed":"useUpdateFavicon 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":"PersonalizeFolderItem","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":"src/modules/drive/Toolbar/personalizeFolder/PersonalizeFolderItem.jsx","change-level":"improvement","is-hotspot?":false,"line":21,"what-changed":"PersonalizeFolderItem decreases from 1 complex conditionals with 3 branches to 1 complex conditionals with 2 branches, threshold = 2","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":"improved"},{"method":"FileIconMime","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/filelist/icons/FileIconMime.jsx","change-level":"improvement","is-hotspot?":false,"line":11,"what-changed":"FileIconMime decreases in cyclomatic complexity from 11 to 10, 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":"improved"},{"method":"FileIconMime","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":"src/modules/filelist/icons/FileIconMime.jsx","change-level":"improvement","is-hotspot?":false,"line":15,"what-changed":"FileIconMime decreases from 1 complex conditionals with 3 branches to 1 complex conditionals with 2 branches, threshold = 2","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":"improved"},{"method":"handleClick","why-it-occurs":"A Complex Method has a high cyclomatic complexity. The recommended threshold for the JavaScript language is a cyclomatic complexity lower than 9.","name":"Complex Method","file":"src/hooks/useOnLongPress/helpers.js","change-level":"improvement","is-hotspot?":false,"line":5,"what-changed":"handleClick 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-03-30T13:36:51.000Z","project-name":"twake-drive","repository":"https://github.com/linagora/twake-drive.git"}}