Skip to content

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

Closed as not planned

Description

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.

Activity

  1. asottile commented on Mar 21, 2024

    @asottile
    Member

    this is not the intended behavior, perhaps an oversight in implementation

  2. ghost closed this as not plannedon Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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