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

Git pre-commit hook is slow #1104

Closed
TravisCarden opened this issue Feb 15, 2017 · 2 comments
Closed

Git pre-commit hook is slow #1104

TravisCarden opened this issue Feb 15, 2017 · 2 comments
Assignees
Labels
Enhancement A feature or feature request

Comments

@TravisCarden
Copy link
Contributor

The Git pre-commit hooks is very slow. I was prepared to tolerate it for ordinary commits, but when I saw that it fires for every commit on a rebase I realized it was unacceptable. Looking at the file I see we're linting custom Twig files and validating the composer.json file whether or not those files have been changed. We should at least make those steps conditional. Perhaps there's a way to optimize phpcs, as well.

@grasmash grasmash added the Enhancement A feature or feature request label Feb 15, 2017
@grasmash
Copy link
Contributor

grasmash commented Mar 20, 2017

Modify https://github.com/acquia/blt/blob/8.6.11/scripts/git-hooks/pre-commit:

  • Execute validate:twig only if *twig files are listed in $LIST
  • Execute composer validate only if composer.* files are listed in $LIST

@TravisCarden
Copy link
Contributor Author

Yay! Thanks, @grasmash and @malikkotob!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement A feature or feature request
Projects
None yet
Development

No branches or pull requests

3 participants