fix(hack): make audit-gate lint scripts run on stock macOS - #159
Open
omergk28 wants to merge 1 commit into
Open
Conversation
lint-drift.sh aborted on empty-array expansion under set -u (bash 3.2), lint-docstrings.sh broke bash 3.2's command-substitution parser with an apostrophe in a comment, then false-positived MISSING_FIELDS on every exported struct because BSD grep has no -P/PCRE. make audit could not run at all on a default macOS toolchain. Behavior-preserving POSIX/bash-3.2-safe substitutions; findings identical under GNU. Spec: specs/hack-script-portability.md Signed-off-by: Omer Kocaoglu <omergk28@gmail.com>
omergk28
force-pushed
the
fix/hack-script-portability
branch
from
August 20, 2026 02:31
e9279d8 to
35c9cc6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix(hack): make audit-gate lint scripts run on stock macOS
Branch:
fix/hack-script-portability→mainCommits:
e9279d82· Spec:specs/hack-script-portability.mdWhat
make auditcould not run at all on a default macOS toolchain(bash 3.2, BSD grep). Three GNU-isms, three minimal
behavior-preserving fixes:
hack/lint-drift.sh"${arr[@]}"aborts underset -u(bash 3.2)${arr[@]+"${arr[@]}"}guardhack/lint-docstrings.sh$( )breaks bash 3.2's substitution parserhack/lint-docstrings.shgrep -cPis GNU-only; BSD grep returns empty counts → every exported struct false-positives asMISSING_FIELDS$'^\t…'+[[:space:]](POSIX)Verification
make auditcompletes green on macOS bash 3.2.57 / BSD grep,with identical findings to a GNU toolchain (
lint-drift: clean,no docstring false-positives).
shellcheckclean.Notes
isolated-PR rule; merge this one first so
make auditruns formacOS contributors reviewing the other.
tracked in TASKS.md; this only unblocks the gate.