Skip to content

docs: add command-v example pair - #11

Merged
posidoni merged 1 commit into
posidoni:mainfrom
pollychen-lab:docs/command-v-not-which-example
Jul 14, 2026
Merged

docs: add command-v example pair#11
posidoni merged 1 commit into
posidoni:mainfrom
pollychen-lab:docs/command-v-not-which-example

Conversation

@pollychen-lab

@pollychen-lab pollychen-lab commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a runnable standards example pair for command -v vs which
  • document the pair in the standards examples table

Closes #8.

Validation

  • git diff --check
  • shellcheck --severity=warning examples/standards/11-command-v-not-which.good.sh in alpine:3.20 container
  • shellcheck --severity=style --format=gcc examples/standards/11-command-v-not-which.bad.sh in alpine:3.20 container: reports SC2230
  • shfmt -d examples/standards/11-command-v-not-which.good.sh examples/standards/11-command-v-not-which.bad.sh in alpine:3.20 container
  • ./tools/check-bad-examples.sh in alpine:3.20 container
  • bats tests/examples.bats in alpine:3.20 container

@pollychen-lab
pollychen-lab requested a review from posidoni as a code owner July 12, 2026 21:00

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request introduces a new standard example demonstrating why command -v should be preferred over which for checking command availability, updating the README table accordingly. The feedback suggests renaming the example files and README entry to use sequential numbering (changing 12 to 11 as 11 was skipped) and removing the redundant stderr redirection (2>&1) from the command -v check in the good example.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread examples/standards/README.md Outdated
Comment thread examples/standards/12-command-v-not-which.good.sh Outdated
@pollychen-lab
pollychen-lab force-pushed the docs/command-v-not-which-example branch from 6f48fd1 to 910775c Compare July 12, 2026 21:32
@posidoni

Copy link
Copy Markdown
Owner

Thank you for your contribution. I will review it carefully and come back with my feedback soon.

@posidoni posidoni left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks for the clean contribution! This closes #8 exactly per the contract in CONTRIBUTING.md — the command -v vs which example pair is correct, safe, and both gemini-code-assist nits (file renumbering, redundant 2>&1) are already addressed. CI is green on all required checks. Merging now.

@posidoni
posidoni merged commit f404d30 into posidoni:main Jul 14, 2026
4 checks passed
@posidoni

Copy link
Copy Markdown
Owner

Merged — thank you for the contribution, @pollychen-lab! This is exactly the kind of clean, well-tested example the project needs. Appreciate you taking the time.

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.

Add example pair for command -v vs which (SC2230)

2 participants