Skip to content

Check just the staged content of the changed files #117

@georgiyordanov

Description

@georgiyordanov

Hi,

I'm using pretty-quick to just check the contents of the commit in a precommit hook and fail if there are any issues without formatting/staging anything. It works well and fast, but my problem is it checks the contents of the file as it exists in the filesystem. If I have some staged changes that are not formatted correctly, but also have the file formatted correctly as unstaged, the check succeeds as it reads the file from the filesystem, thus allowing to create a commit that will not pass validation on the CI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions