Skip to content

test(examples): harden example scripts with set -euo pipefail (#131) - #210

Open
Cid-oe wants to merge 1 commit into
dmarro89:mainfrom
Cid-oe:fix/issue-131-harden-scripts
Open

Cid-oe wants to merge 1 commit into
dmarro89:mainfrom
Cid-oe:fix/issue-131-harden-scripts

Conversation

@Cid-oe

@Cid-oe Cid-oe commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Closes #131

Description

Adds set -euo pipefail to all example shell scripts so they fail fast when a command fails, making the developer experience clearer for new contributors.

Summary by CodeRabbit

  • Chores
    • Example build, Docker, and test scripts now stop when a command fails or encounters an unset variable, helping prevent incomplete runs from appearing successful. Pipeline failures are also reported.

…89#131)

Adds `set -euo pipefail` to all example shell scripts so they fail fast
when a command fails, making the developer experience clearer for new
contributors.

Resolves dmarro89#131.
@coderabbitai

coderabbitai Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: c3641a4b-b101-4afa-a945-caafd84c6b62

📥 Commits

Reviewing files that changed from the base of the PR and between f65672b and bf7235e.

📒 Files selected for processing (3)
  • examples/build_and_run.sh
  • examples/run_docker.sh
  • examples/test_all.sh

Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Three example shell scripts now enable strict shell error handling with set -euo pipefail. The test script also adds a blank line after its shebang.

Changes

Example script safety

Layer / File(s) Summary
Enable strict shell handling
examples/build_and_run.sh, examples/test_all.sh, examples/run_docker.sh
All three scripts add set -euo pipefail. The test script also adds a blank line after its shebang.

Priority: ⬇️ Low

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

Change: Bug fix · Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to bf723

The example scripts now stop when their Make commands fail, without an identified regression to their normal workflows. No actionable merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description states what changed, why it changed, and references issue #131. It does not use the required ## What, ## Why, or ## How to test sections, and it omits the required `## Pre-flight… Add the required ## What, ## Why, and ## How to test sections. Include concrete test commands and complete the ## Pre-flight checklist. Retain Closes #131`` if applicable.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the test scope and the main change: adding set -euo pipefail to example scripts.
Linked Issues check ✅ Passed Issue #131 requires strict shell options for scripts under examples/. The three example shell scripts now contain set -euo pipefail immediately after the shebang. The diff changes no commands, so …
Out of Scope Changes check ✅ Passed The pull request changes only examples/build_and_run.sh, examples/run_docker.sh, and examples/test_all.sh. Each change adds the strict shell options required by issue #131 and a related blank li…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 3…
Full details: Description check

Explanation

The description states what changed, why it changed, and references issue #131. It does not use the required ## What, ## Why, or ## How to test sections, and it omits the required ## Pre-flight checklist.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Create a new PR

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.

This branch has not been deployed

No deployments
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.

Harden example scripts with strict shell options

1 participant