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

Support for pre-commit project #692

Closed
jvstein opened this issue May 27, 2020 · 5 comments · Fixed by #872
Closed

Support for pre-commit project #692

jvstein opened this issue May 27, 2020 · 5 comments · Fixed by #872
Labels
Documentation Help Wanted This issue is up for grabs by the community

Comments

@jvstein
Copy link

jvstein commented May 27, 2020

I wrote a hook for integrating with the pre-commit project. It's here: https://github.com/jvstein/pre-commit-dotnet-format

I've been using it while developing on Linux, but haven't tested it on Windows or macOS. It's very much dependent on Docker, using a prebuilt docker image, because pre-commit doesn't support C# yet. I'd be very happy to integrate it into the project, but wasn't sure how to go about adding the docker dependency to the build system.

@JoeRobich
Copy link
Member

@jvstein Thanks for sharing your work. pre-commit looks like a nice tool. I've used Husky for the same purpose on previous projects.

I've been thinking that one of the bits of missing documentation for dotnet-format is how to integrate with various build systems. There have been other issues opened where people have contributed their GitHub Action or AzDO yaml configurations. What might be nice is to start a new document (/docs/integrations.md maybe) that collects this information.

We would be thrilled if you wanted to start the document and share your configuration for pre-commit with a little write-up.

@jmarolf
Copy link
Contributor

jmarolf commented May 27, 2020

I totally endorse this. I think we start with a doc that we can point people at the tells them how to set this up and see where things go from there.

@jvstein
Copy link
Author

jvstein commented May 28, 2020

That sounds like a great place to start. I'm happy to get that doc started.

@JoeRobich JoeRobich added Documentation Help Wanted This issue is up for grabs by the community labels Aug 9, 2020
@rkm
Copy link
Contributor

rkm commented Nov 21, 2020

pre-commit has just added support for the dotnet language, so I've opened a PR to add a hooks file #872.

@rkm
Copy link
Contributor

rkm commented Jan 23, 2021

Until #872 is merged (or not), I've mirrored this repo to add pre-commit support here. This also allows auto-updating to follow the master/main branch so that you don't have to wait for the next release (use pre-commit autoupdate --bleeding-edge)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Help Wanted This issue is up for grabs by the community
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants