Skip to content

Block commit when changes aren't staged #12

Description

@xipasduarte

Is your feature request related to a problem? Please describe.
After starting a commit, which triggers the linting process, we get changed files (if any fall out of the PHPCS specs). After this, if we want, we can commit again and the process doesn't identify that the files are staged, which generates a commit without clean code.

Describe the solution you'd like
The package should block any commits while the staged files have issues. This means we should lint the files that are about to be committed and leave the other alone.
To allow users the chance to skip the linting step we should rely on a flag when committing.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions