Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GSW-2032] SonarQube code quality #591

Merged
merged 11 commits into from
Dec 26, 2024
Merged

Conversation

tfrg
Copy link
Collaborator

@tfrg tfrg commented Dec 17, 2024

Description

Fixes all code quality issues identified by SonarQube analytics in the current project.

Changes

  • Fixed code smells and maintainability issues
  • Resolved potential bugs identified by static analysis
  • Reduced technical debt

Details

  • Exceeded nested function depth
  • Unused variables/imports
  • Highly complex functions
  • Code duplication
  • Type stability issues

Copy link

vercel bot commented Dec 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
gnoswap-interface ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 23, 2024 1:59am

tfrg added 9 commits December 23, 2024 10:22
Refactor this getter to return a value.
Getters and setters should access the expected fields typescript:S4275
Software qualities impacted:
Reliability
Provide a compare function to avoid sorting elements alphabetically.
"Array.prototype.sort()" and "Array.prototype.toSorted()" should use a compare function typescript:S2871
Software qualities impacted:
Reliability
Fix SonarQube issue by removing direct .sort() comparison in test assertions
Remove this duplicated type or replace with another one.
Union and intersection types should not include duplicated constituents typescript:S4621
Software qualities impacted:
Maintainability
Refactor this redundant 'await' on a non-promise.
"await" should only be used with promises typescript:S4123
Software qualities impacted:
Maintainability
Move this "default" clause to the end of this "switch" statement.
"default" clauses should be last typescript:S4524
Software qualities impacted:
Maintainability
Refactor this function to reduce its Cognitive Complexity from 60 to the 15 allowed.
Cognitive Complexity of functions should not be too high typescript:S3776
Software qualities impacted:
Maintainability
Refactor this function to reduce its Cognitive Complexity from 60 to the 15 allowed.
Cognitive Complexity of functions should not be too high typescript:S3776
Software qualities impacted:
Maintainability
Refactor this function to reduce its Cognitive Complexity from 60 to the 15 allowed.
Cognitive Complexity of functions should not be too high typescript:S3776
Software qualities impacted:
Maintainability
Make sure not using "noopener" is safe here.
Authorizing an opened window to access back to the originating window is security-sensitivetypescript:S5148
… operator

Extract this nested ternary operation into an independent statement.
Ternary operators should not be nested typescript:S3358
Software qualities impacted:
Maintainability
@tfrg tfrg merged commit da12837 into develop Dec 26, 2024
6 checks passed
@tfrg tfrg deleted the GSW-2032-sonarqube-code-quality branch December 26, 2024 03:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants