Open AliceeLe opened 2 months ago
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
src/notifications.js | 16 | 17 | 94.12% | ||
<!-- | Total: | 16 | 17 | 94.12% | --> |
Totals | |
---|---|
Change from base Build 10607818019: | 0.002% |
Covered Lines: | 22328 |
Relevant Lines: | 25587 |
In the SonarCloud warning, the code complexity for the function Notifications.getMultiple is 16, which exceeds the threshold 15. Hence, to reduce code complexity, I modularize a segment of the code and move it into a separate function called cleanPath(notification). In doing so, I reduce the responsibility of Notifications.getMultiple, making it easier to maintain in the future.