Skip to content

Add SonarQube/Codacy compliance rules and fix violations#220

Merged
JE-Chen merged 3 commits intomainfrom
dev
Apr 18, 2026
Merged

Add SonarQube/Codacy compliance rules and fix violations#220
JE-Chen merged 3 commits intomainfrom
dev

Conversation

@JE-Chen
Copy link
Copy Markdown
Member

@JE-Chen JE-Chen commented Apr 18, 2026

Summary

  • Add Static Analysis Compliance (SonarQube / Codacy) section to CLAUDE.md covering complexity, exception handling, code quality, security (Bandit), and resource management rules
  • Fix existing violations: replace bare except Exception: pass with specific exception types + debug logging across git_action.py, base_process_manager.py, git_client_gui.py
  • Replace print() diagnostics with jeditor_logger in watchdog_thread.py and json_process.py
  • Annotate the intentional shell=True in shell_exec.py with # noqa: S602 # nosec B602 and rationale

Test plan

  • pytest passes
  • Shell execution feature still works end-to-end
  • Git UI stage/unstage still works
  • Watchdog linting output appears in the configured log file

JE-Chen added 3 commits April 17, 2026 23:26
Fix 31 ruff violations (unused imports, semicolons, inline statements,
f-string noise, module-level import order) and add return/parameter
type annotations across 63 files covering utils, code_scan, git_client,
and all pyside_ui layers. Public APIs, private helpers, __init__ and
parameters now carry explicit types (Qt event classes, QModelIndex,
Callable, specific widget/model types rather than bare None).
- Document static analysis rules in CLAUDE.md (complexity, exception
  handling, security, resource management)
- Replace broad except Exception: pass with specific exception types
  and debug-level logging in git_action, base_process_manager,
  git_client_gui
- Replace print() with jeditor_logger in watchdog_thread and
  json_process
- Annotate intentional shell=True in shell_exec with nosec/noqa and
  rationale
@codacy-production
Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 2 critical

Alerts:
⚠ 2 issues (≤ 0 issues of at least minor severity)

Results:
2 new issues

Category Results
Security 2 critical

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

TIP This summary will be updated as you push new changes. Give us feedback

@sonarqubecloud
Copy link
Copy Markdown

@JE-Chen JE-Chen merged commit 137c4c3 into main Apr 18, 2026
7 of 8 checks passed
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