Skip to content

Better respect pre-commit repos by using pipeweld to insert pre-commit hooks #150

@nathanjmcdougall

Description

@nathanjmcdougall

Motivation
At the moment, we basically ignore pre-commit repos per se, and treat them as a list of hooks. But if a repo has multiple hooks and the one we are inserting is a precedent for the one in the repo, this we would ideally break up the repo to respect the dependency relationship. (Note that the dependencies are not necessarily in place to enforce a logic as much to enforce a canonical sort order so this isn't particularly important).

This is very similar, in principle to the idea of stages in Bitbucket pipelines, as mentioned in #149. The pipeweld utility is designed to handle these sorts of situations, which is being developed as a part of #54.

Supporting repos would also decrease duplication since all local hooks are compatible and can potentially share the same repo, simplifying things. The notion of "compatible config groups" in pipeweld would reflect this.

Summary of desired enhancement
Use pipeweld as the solver to decide how to insert new pre-commit hooks, as a way to support the notion of pre-commit repos

Metadata

Metadata

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