KEMBAR78
Hook fail_fast stops pre-commit if any prior hook fails · Issue #945 · pre-commit/pre-commit.com · GitHub
Skip to content

Hook fail_fast stops pre-commit if any prior hook fails #945

@tp832944

Description

@tp832944

Hook fail_fast says in the documentation that pre-commit will stop if this hook fails, which suggests it is referring only to the present hook. After testing on pre-commit v3.6.2, the actual behaviour appears to be that pre-commit will stop if this or any previous hook fails.

I find the actual behaviour quite useful, as it means we can avoid running a slow hook (e.g. pytest) if any other hook has failed. Thus, my suggestion is to edit the documentation.

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