Skip to content

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

@maartenflippo

Description

@maartenflippo

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    tooling-issueThere is a problem with the scripts/tooling in the repository.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions