Skip to content

Commit

Permalink
Merge pull request #1 from chriselion/patch-1
Browse files Browse the repository at this point in the history
Update integrations.md
  • Loading branch information
rkm committed Mar 14, 2021
2 parents f6ccd2f + 2bb839e commit 5b33180
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-hooks.yaml
Expand Up @@ -3,5 +3,5 @@
- id: dotnet-format
name: dotnet format
language: dotnet
types: ['c#']
entry: dotnet-format
types_or: ['c#', 'vb']
entry: dotnet-format --include
19 changes: 17 additions & 2 deletions docs/integrations.md
@@ -1,7 +1,7 @@
# Integrations
Collection of advice how to auto check/format. Every sample expects dotnet format installed as local tool.
Collection of advice how to auto check/format. Every sample expects dotnet format installed as local tool, unless otherwise noted.

## Pre-commit hook to reformat
## Git pre-commit hook to reformat

Create file `.git/pre-commit` with following contents:
```sh
Expand Down Expand Up @@ -46,3 +46,18 @@ Add following to your build file:


These instructions originally authored by [leotsarev](https://github.com/joinrpg/joinrpg-net/).


## [pre-commit.com](https://pre-commit.com/) hook to reformat

Add the following block to the `repos` section of your `.pre-commit-config.yaml` file:

```yaml
- repo: https://github.com/dotnet/format
rev: "" # Specify a tag or sha here, or run "pre-commit autoupdate"
hooks:
- id: dotnet-format
```
Note that this will install dotnet format to an isolated environment, using the system installation of the dotnet CLI. See the [pre-commit.com documentation](https://pre-commit.com/#dotnet) for more details.

These instructions originally authored by [rkm](https://github.com/rkm)

0 comments on commit 5b33180

Please sign in to comment.