mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-19 08:01:17 +00:00
fix: exclude echo -n from macos-compat MC002 rule to eliminate false positives (#1545)
The MC002 regex matched both `echo -e` and `echo -n`, but only `echo -e` is non-portable on macOS bash 3.2. `echo -n` works fine as a bash builtin. This caused 3 false positive errors (all TTY probe patterns using `echo -n "" > /dev/tty`) making the linter exit non-zero incorrectly. Agent: test-engineer Co-authored-by: B <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
031b8fbcf0
commit
af475629d8
1 changed files with 1 additions and 1 deletions
|
|
@ -98,7 +98,7 @@ while IFS= read -r _f; do
|
|||
_mc002_msg="'echo"
|
||||
_mc002_msg="${_mc002_msg} -e' is not portable — use printf instead"
|
||||
grep_rule "error" "MC002" "$_mc002_msg" \
|
||||
"$_f" "$_r" 'echo[[:space:]]+-[en]+[[:space:]]'
|
||||
"$_f" "$_r" 'echo[[:space:]]+-[en]*e[en]*[[:space:]]'
|
||||
|
||||
# MC003: source <(...) or . <(...)
|
||||
grep_rule "error" "MC003" "'source <(...)' fails in bash <(curl...) — use eval instead" \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue