Closed
Description
Currently, nix develop
complains:
nix-pre-commit-hooks: updating /home/kokobd/work/github.com/kokobd/haskell-language-server repo
nix-pre-commit-hooks: WARNING: Refusing to install because of pre-existing .pre-commit-config.yaml
1. Translate .pre-commit-config.yaml contents to the new syntax in your Nix file
see https://github.com/hercules-ci/nix-pre-commit-hooks#getting-started
2. remove .pre-commit-config.yaml
3. add .pre-commit-config.yaml to .gitignore
This problem was introduced by #2679, where .pre-commit-config.yaml
was checked in git.
But according to our documentation, .pre-commit-config.yaml
should be managed by Nix. People do not use Nix can just manually install pre-commit
hook and paste the file content into .pre-commit-config.yaml
haskell-language-server/docs/contributing/contributing.md
Lines 171 to 216 in 09968a1
Now we have two options to compare:
- Remove
pre-commit
config from Nix, and update the docs accordingly.- pros: Non-Nix users' life is made easier a little bit.
- cons: Nix users will have to install pre-commit hooks manually.
- Remove
.pre-commit-config.yaml
from Git, and let Nix manage it again.- pros: Nix users can benefit from the pre-commit hooks without any extra setup.
- cons: Non-Nix users have to do one more manual step: paste the
.pre-commit-config.yaml
I recommend the second option, as Non-Nix users will have some manual setups anyway, and we were on option 2 before #2679 was merged.