Skip to content

Address project-wide SonarCloud findings (post-#97)#98

Merged
JE-Chen merged 1 commit into
mainfrom
dev
May 24, 2026
Merged

Address project-wide SonarCloud findings (post-#97)#98
JE-Chen merged 1 commit into
mainfrom
dev

Conversation

@JE-Chen
Copy link
Copy Markdown
Member

@JE-Chen JE-Chen commented May 24, 2026

Summary

Single follow-up commit (1f9b5f9) addressing the 6 project-wide
SonarCloud issues that surfaced after PR #97 merged.

Rule File Fix
python:S1192 (×2) mcp_server/server.py Extracted _ERR_ACTIONS_LIST and _ERR_TEXT_STRING module constants (7 call sites updated)
python:S5869 md_authoring/markdown_to_actions.py [A-Za-z_][A-Z_] (with re.IGNORECASE — same match set, no class duplication)
python:S8513 visual_review/review_server.py Chained startswith calls collapsed into single tuple-arg form
python:S8520 test/unit_test/test_sharding.py sum(parts, [])list(chain.from_iterable(parts))
text:S8565 pyproject.toml Generated uv.lock via uv lock to pin all 26 resolved deps

The uv.lock file is the bulk of the diff (+503 lines) and documents
the resolved dependency graph; the project still builds via setuptools.

Test plan

These predate PR #97 but surface in the project-wide issue list:

- 2 × python:S1192 in mcp_server/server.py: extracted _ERR_ACTIONS_LIST
  and _ERR_TEXT_STRING module constants (literal "'actions' must be a
  list" appeared 4x; "'text' must be a string" appeared 3x)
- python:S5869 in md_authoring/markdown_to_actions.py _TEMPLATE_RE:
  with re.IGNORECASE, [A-Za-z_] has a duplicate range — replaced with
  [A-Z_] (lowercase folds via the flag); dropped the misplaced NOSONAR
- python:S8513 in visual_review/review_server.py: collapsed
  `startswith("/img/baseline/") or startswith("/img/current/")` into
  the single-call tuple form
- python:S8520 in test_sharding.py: replaced `sum(parts, [])` flatten
  with `list(itertools.chain.from_iterable(parts))`
- text:S8565 in pyproject.toml (missing lock file): generated uv.lock
  via `uv lock` to pin all 26 transitive dependencies (project still
  builds with setuptools; uv.lock just documents resolved versions)

All 2920 unit tests pass.
@sonarqubecloud
Copy link
Copy Markdown

@codacy-production
Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@JE-Chen JE-Chen merged commit 0419fc1 into main May 24, 2026
22 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