Skip to content

Improve Bash guideline wording#135

Merged
StrangeRanger merged 3 commits into
mainfrom
dev
Jun 9, 2026
Merged

Improve Bash guideline wording#135
StrangeRanger merged 3 commits into
mainfrom
dev

Conversation

@StrangeRanger

Copy link
Copy Markdown
Owner

This pull request updates the style guide with improvements to the Bash idioms section, error handling, and general style guidelines. It also updates the changelog for a new release and makes minor improvements to CI workflow references and documentation clarity.

Guideline and documentation improvements:

  • Renamed the Bashisms section to Bash Idioms, reframed it to focus on Bash-specific patterns, and expanded the rationale to discuss safety, clarity, performance, consistency, and POSIX portability tradeoffs.
  • Improved grammar, wording, and consistency across guideline pages, including sections on error handling, style, and aesthetics, without changing the underlying recommendations.
  • Enhanced the draft guidance for choosing between for and while loops with better wording and terminology.
  • Refined error handling examples for clarity and consistency, including improved error messages, use of trap, and better variable handling in cleanup functions. [1] [2] [3] [4] [5]
  • Improved explanations in the style guide regarding quoting and variable declaration, including clarifications on the use of single quotes and the local keyword. [1] [2]

Changelog and CI updates:

  • Added a new release entry (2026.6.9) to CHANGELOG.md and updated release links. [1] [2]
  • Updated pinned GitHub Actions references for actions/checkout and astral-sh/setup-uv in CI workflows.
  • Updated guideline review tracking and removed outdated review examples.

Copilot AI review requested due to automatic review settings June 9, 2026 17:14
@StrangeRanger StrangeRanger merged commit 0c8d661 into main Jun 9, 2026
2 of 3 checks passed
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request refines the Bash style guide’s wording and examples (style + error-handling guidance), and records the changes in the changelog for a new dated release entry.

Changes:

  • Clarifies wording in quoting guidance and local variable scope rationale.
  • Refines error-handling examples (clearer messaging, trap cleanup structure, and added explanatory comments).
  • Adds a 2026.6.9 release entry and updates changelog reference links accordingly.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
docs/guidelines/style.md Wording tweaks for quoting guidance and local variable scope rationale.
docs/guidelines/error-handling.md Improves error-handling examples/messages and refines trap + cleanup function example.
CHANGELOG.md Adds the 2026.6.9 release entry and updates reference links.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/guidelines/style.md
- **Naming Convention**: Use `snake_case` for variable names.
- **Scope Management**: Use the `local` keyword to limit a variable's scope to a function.
- **Reason**: Declaring a variable as `local` prevents accidental overwrites of global variables with the same name. It also ensures that once the function completes, the variable is unset and released from memory. (1)
- **Reason**: Declaring a variable as `local` prevents accidental overwrites to global variables with the same name. It also ensures that once the function completes, the variable is unset and released from memory. (1)
Comment on lines 34 to +35
- **Guideline**: When a command fails, provide a clear error message that explains what went wrong.
- **Reason**: Clear error messages help users, including yourself, understand what failed and why, making troubleshooting easier.
- **Reason**: Error messages help users, including yourself, understand what failed and why, making troubleshooting easier.
Comment on lines +128 to +132
echo "[INFO] Cleaning up..."
rm "$TMP_FILE" || {
echo "[ERROR] Failed to remove temporary file" >&2
echo "[NOTE] Please remove it manually: '$TMP_FILE'" >&2
}
Comment thread CHANGELOG.md
Comment on lines +28 to +29
- **TODO**: Update guideline review tracking for `Aesthetics`, `Bash Idioms`,
`Error Handling`, and `Style`, and remove an outdated wording-review example.
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.

2 participants