mirror of
https://ghproxy.net/https://github.com/wp-cli/wp-cli-bundle.git
synced 2026-03-04 15:20:31 +08:00
19 lines
387 B
Bash
Executable file
19 lines
387 B
Bash
Executable file
#!/bin/bash
|
|
|
|
if REV=$(git rev-parse -q --verify HEAD); then
|
|
against=HEAD
|
|
else
|
|
# Initial commit: diff against an empty tree object
|
|
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
|
|
fi
|
|
|
|
FILES=$(git diff-index --name-only --cached --diff-filter=ACMR $against -- | grep .php )
|
|
|
|
if [ "$FILES" == "" ]; then
|
|
echo "No files to check with PHPCS."
|
|
exit 0
|
|
fi
|
|
|
|
set -ex
|
|
|
|
{{PHPCS_BIN}} -s $FILES
|