Skip to content

Commit 6daced3

Browse files
committed
Do not auto add php-cs fixes to a commit.
I do not want to commit and sign changes that I've not seen.
1 parent aeb2f68 commit 6daced3

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

bin/fix-cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ git diff --cached --name-only --diff-filter=ACMR HEAD -- '*.php' | while read li
1717
echo " - Fixing: ${line}"
1818
# PHP CS Fixer
1919
PHP_CS_FIXER_IGNORE_ENV=1 php "${CURRENT_DIRECTORY}/run" ${PHP_CS_FIXER} fix --config=${PHP_CS_CONFIG} --verbose ${line};
20-
git add "$line";
20+
git diff "$line";
21+
22+
echo "NOTE: consider adding these changes to the commit with git add --patch $line; git commit --amend"
2123
done
2224

2325
# shellcheck disable=SC2164

0 commit comments

Comments
 (0)