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

Commit hook looks at current state of files rather than state of added files #4

Open
maartenflippo opened this issue Jul 18, 2024 · 0 comments
Labels
tooling-issue There is a problem with the scripts/tooling in the repository.

Comments

@maartenflippo
Copy link
Contributor

Running the commit hooks does not necessarily prevent committing with unformatted code since it only looks at the current state of the repository. Thus the following situation can occur:

  • Attempt to push a commit and get an error that files are not properly formatted
  • Fix the issues and commit again
  • Forget to run git add and the commit hooks pass even though the committed files are unformatted
  • Push unformatted code to the repository
@maartenflippo maartenflippo added the tooling-issue There is a problem with the scripts/tooling in the repository. label Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tooling-issue There is a problem with the scripts/tooling in the repository.
Projects
None yet
Development

No branches or pull requests

1 participant