Skip to content

Commit 357ec6e

Browse files
Merge pull request #147 from helmo/phpcs
Do not auto add php-cs fixes to a commit.
2 parents 084e1da + 6daced3 commit 357ec6e

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'| grep -v -e 'te
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)