Skip to content

dotnet format example #41

Answered by alirezanet
sander1095 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,
Thanks for the feedback. good idea I'll try to add some examples to the docs soon but for now, you can check the husky repo to get some ideas.

task-runner:

{
"name": "dotnet-format",
"command": "dotnet",
"group": "pre-commit",
"args": ["dotnet-format", "--include" , "${staged}"],
"include": ["**/*.cs"]
},

pre-commit hook:

#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
dotnet husky run -v --group "pre-commit"

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by alirezanet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants