Skip to content

Commit 4088882

Browse files
committed
style(comments): enforce third-person singular and spacing
- Apply third-person singular wording in inline comments across touched scripts. - Add vertical gaps before standalone comment lines in function bodies. - Update agent guidance and refresh README links to match source layout.
1 parent 07c3411 commit 4088882

5 files changed

Lines changed: 15 additions & 8 deletions

File tree

AGENTS.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ file already depends on them. Follow the existing editor hints: 2-space
3434
indentation, no tabs, and an approximately 79-character text width. Public
3535
functions in `lib/base.sh` are unprefixed, internal helpers use `base_`, and
3636
global variables use the `BASE_` prefix. Keep new test files aligned with the
37-
current pattern, for example `app/test-realpath-ok`.
37+
current pattern, for example `app/test-realpath-ok`. Write comments in
38+
third-person singular, and place a vertical gap before standalone comment lines
39+
inside function bodies.
3840

3941
## Testing Guidelines
4042

README.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@ The public functions are, in alphabetical order:
128128
{url-base}#L866[`validate_cmd`],
129129
{url-base}#L873[`validate_var`],
130130
{url-base}#L880[`var_exists`],
131-
{url-base}#L914[`ver_ge`],
132-
{url-base}#L922[`vid2aud`],
133-
{url-base}#L936[`ytda`].
131+
{url-base}#L916[`ver_ge`],
132+
{url-base}#L924[`vid2aud`],
133+
{url-base}#L938[`ytda`].
134134

135135
Global variables have the `BASE_` prefix and can be used by clients.
136136
Clients should place temporary files under `$BASE_WIP`.

app/install

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,16 @@ set -- "$@" --quiet
77
BSH="$(
88
CDPATH='' cd -- "$(dirname -- "$0" 2>&1)" 2>&1 && pwd -P 2>&1
99
)"/../lib/base.sh || {
10-
# Capture status before printf; local is invalid outside functions.
10+
11+
# Captures status before printf; local is invalid outside functions.
1112
err=$?
1213
printf >&2 %s\\n "$BSH"
1314
exit "$err"
1415
}
1516

1617
# shellcheck disable=SC2034 # Variable appears unused.
1718
readonly \
18-
BASE_APP_VERSION=0.9.20260402 \
19+
BASE_APP_VERSION=0.9.20260409 \
1920
BASE_MIN_VERSION=0.9.20240831 \
2021
BSH \
2122
DST=/usr/local/bin \

lib/base.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ BASE_RC_CON_NO=14
4747
BASE_RC_CON_TO=13
4848
BASE_RC_DIE_NO=10
4949
BASE_SHOULD_CON=false
50-
BASE_VERSION=0.9.20260407
50+
BASE_VERSION=0.9.20260409
5151

5252
# Removes any file besides mp3, m4a, flac in the current directory.
5353
# Removes empty directories.
@@ -880,6 +880,7 @@ validate_var() {
880880
var_exists() {
881881
local arg ret=0 var
882882
for arg; do
883+
883884
# Accepts only POSIX identifiers: [A-Za-z_][A-Za-z0-9_]*.
884885
case "$arg" in
885886
'' | [!A-Za-z_]* | *[!A-Za-z0-9_]*)
@@ -888,6 +889,7 @@ var_exists() {
888889
continue
889890
;;
890891
esac
892+
891893
# ${name-} expands to empty when name is undefined and avoids nounset
892894
# failures under set -o nounset.
893895
eval "var=\${$arg-}" || {
@@ -1389,6 +1391,7 @@ for arg; do
13891391
-x | --execute) set -x ;;
13901392
-y | --yes) BASE_SHOULD_CON=true ;;
13911393
*)
1394+
13921395
# If an argument is not skipped, sets it back to all.
13931396
if [ $skp = false ]; then
13941397
set -- "$@" "$arg"

test.do

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ BSH="$(
1313
1414
# shellcheck disable=SC2034 # Variable appears unused.
1515
readonly \
16-
BASE_APP_VERSION=0.9.20250819 \
16+
BASE_APP_VERSION=0.9.20260409 \
1717
BASE_MIN_VERSION=0.9.20231228 \
1818
BSH
1919
set -- "$@" --quiet
@@ -27,6 +27,7 @@ for sh in ash bash dash fish ksh oksh tcsh yash zsh; do
2727
"$sh" -c "$ok 2>&1" || die "$ok" on "$sh" returns negative.
2828
done
2929
for no in ./app/*-no; do
30+
3031
# shellcheck disable=SC2015 # A && B || C.
3132
"$sh" -c "$no 2>&1" && die "$no" on "$sh" returns positive. || :
3233
done

0 commit comments

Comments
 (0)