Conversation
|
Note: while I'm fine with a nix/devenv setup, I don't agree that the It should only require that the executables are installed, which devenv, docker, podman, homebrew or chocolatey can provide. |
|
The devenv setup should not prevent a custom pre-commit configuration without nix/devenv. |
|
That's the problem: we must create a custom configuration file, and duplicate the devenv/git-hooks to pre-commit configuration 😞 Why not provide a |
|
Because that's hard to do? It requires all these tools to be available and there's no effective generic way to ensure they are. That's the nice thing about git-hooks from devenv: they're integrated with the package manager that makes the tools available. If you use a custom pre-commit configuration, you can easily select which hooks you even want to run locally (for example, reuse is probably not very relevant; it should be enough to run it in CI). I'm planning to add some segmentation to the devenv config as well. |
Inspired by the current dotfiles in https://github.com/crystal-lang/crystal, including the following recent changes: * crystal-lang/crystal#16462 * crystal-lang/crystal#16263 * crystal-lang/crystal#15469 * crystal-lang/crystal#15396 * crystal-lang/crystal#13479
Adds a basic https://devenv.sh/ configuration.
So far, it only contains a couple of git hooks. They're useful as pre-commit checks, and we can also run them in CI.
That'll be the next step: consolidate and enhance the linting jobs in CI.
With this change, it's already easy to run the exact same configurations locally and automatically (when using devenv).
We're already using devenv in other repos (shards, crystal-book, crystal-website) and I'm very pleased with it.