mirror of
https://github.com/openclaw/openclaw.git
synced 2026-02-09 05:19:32 +08:00
11 lines
313 B
Bash
Executable File
11 lines
313 B
Bash
Executable File
#!/bin/sh
|
|
FILES=$(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g')
|
|
[ -z "$FILES" ] && exit 0
|
|
|
|
# Lint and format staged files
|
|
echo "$FILES" | xargs pnpm exec oxlint --fix 2>/dev/null || true
|
|
echo "$FILES" | xargs pnpm exec oxfmt --write 2>/dev/null || true
|
|
echo "$FILES" | xargs git add
|
|
|
|
exit 0
|