Skip to content

#220 - chore(backend): Fix Maintainability Issues - SonarQube#338

Draft
yasminehilout wants to merge 15 commits intodevfrom
220/chore-backend-maintainability-fix
Draft

#220 - chore(backend): Fix Maintainability Issues - SonarQube#338
yasminehilout wants to merge 15 commits intodevfrom
220/chore-backend-maintainability-fix

Conversation

@yasminehilout
Copy link
Copy Markdown
Collaborator

@yasminehilout yasminehilout commented Mar 30, 2025

Summary

This PR addresses maintainability issues identified by SonarQube in the backend codebase. The goal is to improve code clarity and reduce technical debt without altering functionality.

Changes Made

  • Refactored duplicated logic into reusable functions
  • Removed unused imports and variables
  • Simplified complex conditionals
  • Renamed ambiguous variables for better readability

Testing Instructions

  1. Run backend unit and integration tests to ensure no regressions.
  2. Verify application behavior remains consistent.
  3. Confirm that SonarQube no longer flags the fixed issues.

Screenshots (if applicable)

Before:
sonarCloud_backend_before

Now:

Additional Notes

  • ❗️Request for Review:
    Left a comment on DataService.java line 98 — I’m wondering if that unused progress value is still needed or if we can remove it.

  • 🟡 Known SonarCloud Warning:
    The StacDataConverter.java file still shows some unused code warnings in SonarCloud. This is expected for now, as that file isn’t currently in use but will possibly be integrated in an upcoming iteration.

@yasminehilout yasminehilout added Back End This PR is related to the back end enhancement New feature or request refactor labels Mar 31, 2025
@yasminehilout yasminehilout marked this pull request as ready for review March 31, 2025 01:43
@yasminehilout yasminehilout self-assigned this Mar 31, 2025
@yasminehilout yasminehilout linked an issue Mar 31, 2025 that may be closed by this pull request
@yasminehilout yasminehilout marked this pull request as draft March 31, 2025 03:15
Comment on lines +35 to +36
@Value("${geoserver.workspacesPath}")
private String geoserverWorkspacesPath;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an unnecessary change. It is a constant string and will never change, why put it with application properties when it is not.

@yasminehilout yasminehilout removed their assignment Apr 11, 2025
@yasminehilout
Copy link
Copy Markdown
Collaborator Author

yasminehilout commented Apr 11, 2025

This is a draft pull request capturing work in progress during Release 3. It is being documented here for transparency and potential future continuation.

As part of the capstone handoff, we are unassigning ourselves from this pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Back End This PR is related to the back end enhancement New feature or request refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chore(Backend) : Fix Maintainability Issues - SonarQube

2 participants