Skip to content

scripts: use [[ for bash tests (SonarCloud S7688) - #111

Merged
dylanmtaylor merged 1 commit into
mainfrom
sonar/s7688-bash-tests
Nov 10, 2026
Merged

dylanmtaylor merged 1 commit into
mainfrom
sonar/s7688-bash-tests

Conversation

@dylanmtaylor

@dylanmtaylor dylanmtaylor commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Behaviour-preserving: [[ ]] in place of [ ] for bash tests (SonarCloud shell:S7688). Every script has a bash shebang; no test uses -a/-o, escaped parentheses or an unquoted pattern on the right of =. bash -n passes on each script; the rest is left to CI.

  • scripts/build-web.sh (3)

Summary by CodeRabbit

  • Chores
    • Updated build-script checks. Build outputs and behavior remain unchanged; there are no user-facing changes in this release.

Behaviour-preserving: `[[ ]]` in place of `[ ]` for bash tests (SonarCloud shell:S7688). Every script has a bash shebang; no test uses `-a`/`-o`, escaped parentheses or an unquoted pattern on the right of `=`. `bash -n` passes on each script; the rest is left to CI.

- `scripts/build-web.sh` (3)
@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The web build script now uses Bash [[ ... ]] conditionals for wasm-bindgen version checks and for selecting the output directory when PROFILE is dev. The compared values and outcomes remain unchanged.

Changes: Web Build Script

Layer / File(s) Summary
Version and profile conditionals
scripts/build-web.sh
The version checks and dev profile check now use [[ ... ]]. Error handling and the selected directory remain unchanged.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Refactor

Suggested reviewers: tanish2k09

Merge Risk: Minimal · up to 8a46c

The conditional updates appear behavior-preserving; no merge-blocking risk is identified.

Pre-merge checks: Passed 5

Check name Status Explanation
Title check Passed The title clearly identifies the change: using Bash [[ ]] tests in scripts.
Description check Passed The description explains the change and reports bash -n verification, with other checks left to CI. It omits the roadmap item and the template checklist, but is otherwise informative.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files.

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5393fe10-7d67-460b-862c-f4793bc869ab
Commits

Reviewing files that changed from the base of the PR and between f696d79 and 8a46c2b.

Files selected for processing: 1

  • scripts/build-web.sh

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

@sonarqubecloud

Copy link
Copy Markdown

@dylanmtaylor
dylanmtaylor merged commit 3cf69c1 into main Nov 10, 2026
17 checks passed
@dylanmtaylor
dylanmtaylor deleted the sonar/s7688-bash-tests branch November 10, 2026 23:45
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