Created
March 21, 2015 13:25
-
-
Save havvg/972893026c9aed4a15bf to your computer and use it in GitHub Desktop.
apply PHP-CS-Fixer on all changed files in the staging area
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
fix-staged = "!git diff-index --cached --name-status HEAD | grep -ve '^D' | cut -f2 | xargs -n1 php-cs-fixer fix" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm using them in conjunction with those two:
I apply the fixer on the staged, use the update patch workflow to only stage the fixes on my work. Afterwards I can use
cs-head
to apply all other fixes to the files I just change.