Skip to content

Run hook multiple times (a.k.a. extend & rename other hooks) #406

Open
@yajo

Description

@yajo

Here you can see a real world usage of multiple invocations to the same hook: https://github.com/OCA/sale-workflow/blob/3016b43cef41a162c423be3322f2a3bc67447001/.pre-commit-config.yaml#L145-L156

They're essentially splitting pylint hook in 2:

  • once to run optional checks and report them without blocking the commit
  • another time to run required checks and do block the commit if it fails

Upstream pre-commit config is list-based, whereas here it's dict-based (see #250). Thus, how to replicate that without having to redefine the whole pylint hook?

Metadata

Metadata

Assignees

No one assigned

    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