LoginSignup
3
4

More than 5 years have passed since last update.

自分が修正したファイルだけphp-cs-fixerで整形する方法

Last updated at Posted at 2016-06-15

masterをマージした状態で

git diff --name-only --diff-filter=AMCR master...|xargs -n 1 php-cs-fixer fix

diff-filterで削除したファイルを一覧から消している

ファイル名の後にオプションを指定する場合は

git diff --name-only --diff-filter=AMCR master...|xargs -I'{}' php-cs-fixer fix '{}' --level=psr2
3
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
4