Skip to content

fix: Remove unused variables and improve code clarity#21

Merged
remyluslosius merged 2 commits into
mainfrom
fix/sonar-unused-variables
Sep 11, 2025
Merged

fix: Remove unused variables and improve code clarity#21
remyluslosius merged 2 commits into
mainfrom
fix/sonar-unused-variables

Conversation

@remyluslosius

Copy link
Copy Markdown
Contributor

Summary

This PR addresses unused variable warnings from SonarCloud to improve code quality and maintainability.

Changes

  • Removed 15 unused variable assignments that were never referenced
  • Replaced unused destructured variables with underscore (_) convention
  • Fixed severity variable reassignment issue by using descriptive variable name
  • Removed unnecessary pass statement
  • Cleaned up code to improve readability

Files Modified

  • 9 backend files including routes, services, and CSV analyzer

Testing

  • No functional changes, only cleanup of unused code
  • All tests should continue to pass as before

This addresses SonarCloud's unused variable warnings and improves overall code quality.

- Removed 15 unused variable assignments that were never referenced
- Replaced unused destructured variables with underscore (_) convention
- Fixed severity variable reassignment issue by using descriptive name
- Removed unnecessary pass statement
- Cleaned up code to improve maintainability

This addresses SonarCloud's unused variable warnings and improves code quality
- Fixed orphaned SQL queries in scans.py that were missing db.execute() calls
- Fixed unterminated triple-quoted string in compliance.py
- Properly initialize error_service and sanitization_service variables
- All Python files now compile successfully without syntax errors

Completes PR #21 unused variable cleanup task
@sonarqubecloud

sonarqubecloud Bot commented Sep 7, 2025

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@remyluslosius remyluslosius merged commit 770fd3c into main Sep 11, 2025
13 of 25 checks passed
@remyluslosius remyluslosius deleted the fix/sonar-unused-variables branch September 11, 2025 00:54
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.

1 participant