Repository navigation
feat: implement issue #378 — SonarCloud: shell script hygiene - #393
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe shell test’s ChangesShell test hygiene
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related issues
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 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.
Pull request overview
Resolves SonarCloud rule shelldre:S7682 in the shell test harness by making the function’s return behavior explicit, without changing the test’s pass/fail logic (which is driven by the global fail flag and final exit "$fail").
Changes:
- Add an explicit
return 0at the end ofassert_contains()to satisfy SonarCloud S7682.
donpetry-bot
left a comment
There was a problem hiding this comment.
Automated review — APPROVED ✓
Risk: LOW
Reviewed commit: 1e3aca5fa3ae92edb4068a69f5f967d53ac2ac3f
Review mode: triage-approved (single reviewer)
Summary
One-line change adding an explicit 'return 0' at the end of assert_contains() in tests/scripts/apply-repo-settings.test.sh to resolve SonarCloud rule shelldre:S7682. Behavior-neutral: both branches of the function already terminated with zero-status commands (echo / fail=1), and test pass/fail is driven by the global 'fail' flag and final 'exit $fail'. Triage assessment (low-risk) confirmed.
Linked issue analysis
Closes #378 (SonarCloud: shell script hygiene). The issue reports exactly one MAJOR finding (shelldre:S7682) in tests/scripts/apply-repo-settings.test.sh, asking for an explicit return statement. This PR adds it as a real fix (no NOSONAR), with no behavior change. SonarCloud quality gate on this PR passed with 0 new issues, satisfying the acceptance criteria.
Findings
No findings.
- Security: none — test-only shell script, no secrets, no auth/crypto/CI-workflow changes. Secret-scanning MCP tool unavailable in this run; gitleaks CI check passed.
- Correctness: 'return 0' does not mask assertion failures — the failure branch sets the global 'fail' flag, and the script exits with 'exit $fail'. The function's return value was already 0 in both branches.
- Maintainability: change matches existing style of the test harness.
CI status
All validation checks green: CI (TypeScript, Go, gitleaks), CodeQL (actions/go/javascript-typescript), SonarCloud quality gate passed (0 new issues, 0 security hotspots), dependency audits (govulncheck, pnpm audit) passed, AgentShield passed. Two CANCELLED entries (dev-lead dispatch/ci-relay) are agent-orchestration jobs from a superseded run — a later dev-lead dispatch run succeeded; not code CI. Branch is BEHIND main but MERGEABLE.
Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.
|



Closes #378
Implemented by dev-lead agent. Please review.
Summary by CodeRabbit