Skip to content

Fix SonarCloud HIGH issues: S1192 duplicated literals, S7688 shell tests - #14

Merged
kgrizz-git merged 4 commits into
mainfrom
fix/sonar-high-s1192-s7688
Aug 7, 2026
Merged

kgrizz-git merged 4 commits into
mainfrom
fix/sonar-high-s1192-s7688

Conversation

@kgrizz-git

Copy link
Copy Markdown
Owner

Summary

Resolves 27 HIGH-severity SonarCloud issues — the safe, mechanical subset.

  • shelldre:S7688 (6) — convert all [ … ] conditionals in start.sh to [[ … ]] (script is bash; [[ is the recommended, safer construct).
  • python:S1192 (21) — hoist duplicated string literals into named module constants across 11 files: HTML fragments (email_report_html.py), the .github/workflows/ git pathspec (cli_runs_diff.py), the "Git LFS" label, the "reports." TOML prefix, and the repeated Textual query selectors / button labels across the GUI views and setup wizard.

Also gitignores the local .sonar_cloud_token helper file.

Not included (intentionally)

  • python:S5754 (5) — catching argparse's SystemExit to return an int exit code is required by the cli:main console-script contract; handled as accept-as-intentional in SonarCloud rather than code changes.
  • python:S3776 (25) — cognitive-complexity refactors; being done separately, function by function with tests.

Verification

  • 732 tests OK (unittest discover)
  • typecheck: 0 errors
  • ruff: clean
  • bash -n start.sh: clean

No behavior change.

🤖 Generated with Claude Code

Resolves 27 HIGH-severity code-smell issues that are safe, mechanical fixes.

- shelldre:S7688 (start.sh): convert all `[ ... ]` conditionals to `[[ ... ]]`
  (script is bash; `[[` is the recommended, safer construct).
- python:S1192 (11 files): hoist duplicated string literals into named
  module constants — HTML fragments in email_report_html.py, the git
  pathspec in cli_runs_diff.py, the "Git LFS" label, the "reports." TOML
  prefix, and the repeated Textual query selectors / labels across the GUI
  views and setup wizard.

Also gitignore the local .sonar_cloud_token helper file.

No behavior change. 732 tests OK, typecheck clean, ruff clean, bash -n clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 6, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: f4f397a2-528f-4e20-b503-94037eb35128

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

sonarqubecloud Bot commented Aug 7, 2026

Copy link
Copy Markdown

@kgrizz-git
kgrizz-git merged commit 033ad2a into main Aug 7, 2026
11 checks passed
@kgrizz-git
kgrizz-git deleted the fix/sonar-high-s1192-s7688 branch August 7, 2026 03:59
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