Skip to content

pre-commit sample configuration should not suggest rev: stable #420

@asottile

Description

@asottile

👋 hello, pre-commit maintainer here :)

The sample configuration currently suggests rev: stable for black's repository setup. A mutable ref poses some problems. Notably it gives the illusion that the latest version is being used but in reality it uses the version at install time.

This setup isn't suitable for those looking for a repeatable and reproducible linting experience.

The suggestion that we use for our official repositories is to either list the version explicitly in the docs (though this adds tedium to the release cycle) or to use some suitable non-value with instructions on how to substitute an appropriate value.

Yet another option would be to suggest pre-commit autoupdate after writing such a configuration as this will usually convert the mutable rev to an immutable tag (or sha if --bleeding-edge is passed).

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: integrationsEditor plugins and other integrations

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions