Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Enhancement A feature or feature request
Projects
None yet
Development

No branches or pull requests

3 participants