Alternate Referenceable Hook ID · Issue #882 · pre-commit/pre-commit · GitHub
Skip to content

Alternate Referenceable Hook ID #882

Description

@s0undt3ch

Would you accept a change that accepts something like alt or altid in the pre-commit configuration file? ref?

The use case is the following.
We run our code through PyLint and while on the project code we're strict, on the tests we're a bit more relaxed.

So, we define 2 repos entries for PyLint. One for the project code, the other for the projects tests.

We already override name to make it clear which set of files are being linted, however, there's no way to choose which of the PyLint entries we want to explicitly run on the CLI, pre-commit run pylint is all we can do and runs both pylint hook entries.

Here's were the alternative ID comes in. It would allow "overriding" the ID so that we could better target what we want to run.

Should it also be used on the output if defined?

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions