Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create .pre-commit-hooks.yaml #238

Merged
merged 1 commit into from
Aug 27, 2024

Commits on Aug 26, 2024

  1. Create .pre-commit-hooks.yaml

    This will allow people to enforce the style of .nix files in their own
    repos via the pre-commit tool. This change is related to #221, but
    it doesn’t actually implement the idea proposed in that issue.
    
    When writing the instructions for how to use the nixfmt pre-commit hook,
    I tried to make it clear that there’s a difference between the
    pre-commit tool and Git pre-commit hooks in general. I tried to make the
    difference between those two things clear for two reasons:
    
    1. Both of those things are called pre-commit which makes it easy for
    people to mix them up [1].
    
    2. Depending on how #221 shakes out, the nixfmt project might end up
    adding another alternative mechanism for using nixfmt as part of a Git
    pre-commit hook script. I’m preemptively using language that makes it
    easy to differentiate between those two different mechanisms just in
    case there ends up being two different mechanisms in the future.
    
    [1]: <DescentDevelopers/Descent3#450 (comment)>
    Jayman2000 committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    6d57d1b View commit details
    Browse the repository at this point in the history