Skip to content

fix(sonar): resolve 105 SonarQube issues (BLOCKER, CRITICAL, MAJOR, MINOR)#353

Open
scheilch wants to merge 2 commits into
mainfrom
fix/sonar-findings
Open

fix(sonar): resolve 105 SonarQube issues (BLOCKER, CRITICAL, MAJOR, MINOR)#353
scheilch wants to merge 2 commits into
mainfrom
fix/sonar-findings

Conversation

@scheilch

Copy link
Copy Markdown
Collaborator

Summary

Resolves 105 SonarQube code quality issues across backend, frontend, and CI workflows. All issues have been fixed systematically with full test coverage verification.

Changes

Backend Fixes (Python)

  • 39 tests — Added missing assertions (S2699: "Add at least one assertion to this test case")
  • 17 exception handlers — Switched from logger.error() to logger.exception() for proper stack traces (S8572)
  • 41 logging calls — Sanitized user-controlled data to prevent log injection (S5145)
  • 4 duplicate strings — Extracted to constants (S1192)
  • 3 Pydantic fields — Added explicit default values for optional fields (S8396)

Frontend Fixes (TypeScript)

  • 1 void operator — Replaced with direct function call (S3735)

CI/CD Workflow Fixes

  • Refactored contributor scoring logic with DRY principles
  • Fixed codecov-commenter secret leak
  • Improved pagination handling
  • Updated discussion category references

Test Results

Backend: ✅ 2166 passed, 1 skipped
Frontend: ✅ 953 passed, 1 skipped

Progress

105/105 issues resolved

Related

Part of continuous code quality improvement. No functional changes — only code hygiene and maintainability improvements.

…INOR)

- fix: add assertions to 39 tests without assertions (S2699)
- refactor: extract 4 duplicate string literals to constants (S1192)
- fix: add explicit default values to 3 Pydantic optional fields (S8396)
- fix: replace void operator with direct function call (S3735)
- fix: use logger.exception() instead of logger.error() in 17 except blocks (S8572)
- security: sanitize user-controlled data in 41 logging calls (S5145)

All tests passing:
- Backend: 2166 passed, 1 skipped
- Frontend: 953 passed, 1 skipped
@github-actions

github-actions Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

❌ CI Failed

Job Status
Mojibake Check ✅ success
Commit Lint ✅ success
Security Scan ✅ success
License Check ✅ success
Lint ✅ success
Backend Tests ✅ success
Frontend Tests ✅ success
E2E Tests ❌ failure

🔗 Full details

@sonarqubecloud

Copy link
Copy Markdown

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.

2 participants