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

Remove pre-commit as a dependency #1494

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fabiomadge
Copy link
Collaborator

I propose replacing our current setup of having the dependency pre-commit run in local mode, with a direct git hook. All the user has to do is to symlink the script into .git/hooks during the initial setup.

ln -s "$PWD/Scripts/pre-commit" .git/hooks/pre-commit

The script runs dotnet-format on the staged files and aborts the commit if the formatter changes those files. In that case, the user is encouraged to add the changes to the commit, but rerunning git commit without any changes will still work.

@robin-aws
Copy link
Member

Thanks for the suggestion Fabio! I'm not completely sold on dropping the dependency on pre-commit with a less standard solution, especially since it won't work for any Windows contributors. I'm curious to hear @RustanLeino's opinion as I know he was using Windows until fairly recently.

@RustanLeino
Copy link
Collaborator

Yes, it's important that we still support building on Windows. This makes me, too, hesitant about this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants