Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Website: git pre-commit hook should use `xargs -r` #887

Closed
ttencate opened this issue May 15, 2017 · 1 comment

Comments

@ttencate
Copy link

commented May 15, 2017

git diff --name-only --cached --relative | grep '\.jsx\?$' | xargs -r standard
                                                                   ^^

This way, xargs won't run standard if no JavaScript files were changed in this commit. This is useful because without arguments, standard needlessly checks everything.

@Flet

This comment has been minimized.

Copy link
Member

commented May 30, 2017

Nice! Would you mind updating the README in this repo? The website gets its content from here. I'll happily merge it!

ttencate added a commit to ttencate/standard that referenced this issue May 30, 2017

@Flet Flet closed this in #1015 Nov 7, 2017

@lock lock bot locked as resolved and limited conversation to collaborators May 10, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
2 participants
You can’t perform that action at this time.