You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SonarCloud open findings in petry-projects/broodly — 20 issue(s) grouped as one workstream. Part of the org SonarCloud tuning initiative combsmith/.github#593.
Behavior-preserving shell hygiene: replace 19 [ ... ] POSIX tests with [[ ... ]] (S7688) and add one explicit return to the assert_contains function (S7682), across the three affected scripts.
tests/scripts/apply-repo-settings.test.sh — convert 4 [ ... ] tests → [[ ... ]] and add explicit return to assert_contains
Tests to Write
No new tests: pure behavior-preserving refactor. Existing suite tests/scripts/apply-repo-settings.test.sh (runs the script in --dry-run --force) is the regression guard and must stay green.
Pure behavior-preserving refactor, so Phase 2 (test-first) was handled per the documented exception — the existing regression test (--dry-run --force) is the guard and stays green. All =/!= comparisons use quoted or literal operands, so [[ ]] pattern-matching semantics do not alter behavior. assert_contains return value is unused by callers, so return 0 is a no-op behaviorally. No unrelated files touched (.dev-lead/scripts/apply-repo-settings.sh copy left untouched — not in scope).
Activity
don-petry commentedon Jul 3, 2026
Dev-Lead Implementation Plan
Issue: #370 — SonarCloud: shell script hygiene cleanup (×20)
Scope
Behavior-preserving shell hygiene: replace 19
[ ... ]POSIX tests with[[ ... ]](S7688) and add one explicitreturnto theassert_containsfunction (S7682), across the three affected scripts.Implementation Checklist
scripts/apply-rulesets.sh— convert 8[ ... ]tests →[[ ... ]]scripts/apply-repo-settings.sh— convert 7[ ... ]tests →[[ ... ]]tests/scripts/apply-repo-settings.test.sh— convert 4[ ... ]tests →[[ ... ]]and add explicitreturntoassert_containsTests to Write
tests/scripts/apply-repo-settings.test.sh(runs the script in--dry-run --force) is the regression guard and must stay green.Test Command
bash tests/scripts/apply-repo-settings.test.shdon-petry commentedon Jul 3, 2026
Dev-Lead: Implementation Complete
Plan Execution
scripts/apply-rulesets.sh— converted 8[ ... ]tests →[[ ... ]](S7688)scripts/apply-repo-settings.sh— converted 7[ ... ]tests →[[ ... ]](S7688)tests/scripts/apply-repo-settings.test.sh— converted 4[ ... ]tests →[[ ... ]](S7688) and added explicitreturn 0toassert_contains(S7682)Total: 19 × S7688 + 1 × S7682 = 20 findings addressed. All fixes are real (no
NOSONAR).Test Results
Files Changed
scripts/apply-rulesets.sh: 8 conditional tests[ ]→[[ ]]scripts/apply-repo-settings.sh: 7 conditional tests[ ]→[[ ]]tests/scripts/apply-repo-settings.test.sh: 4 conditional tests[ ]→[[ ]]; explicitreturn 0added toassert_containsNotes
Pure behavior-preserving refactor, so Phase 2 (test-first) was handled per the documented exception — the existing regression test (
--dry-run --force) is the guard and stays green. All=/!=comparisons use quoted or literal operands, so[[ ]]pattern-matching semantics do not alter behavior.assert_containsreturn value is unused by callers, soreturn 0is a no-op behaviorally. No unrelated files touched (.dev-lead/scripts/apply-repo-settings.shcopy left untouched — not in scope).feat: implement issue #370 — SonarCloud: shell script hygiene cleanup…