Skip to content

Commit

Permalink
added git hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
majkel89 committed Mar 2, 2024
1 parent 0fc6fc2 commit dc3d76e
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"husky": {
"version": "0.6.4",
"commands": [
"husky"
]
}
}
}
24 changes: 24 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

## husky task runner examples -------------------
## Note : for local installation use 'dotnet' prefix. e.g. 'dotnet husky'

## run all tasks
#husky run

### run all tasks with group: 'group-name'
#husky run --group group-name

## run task with name: 'task-name'
#husky run --name task-name

## pass hook arguments to task
#husky run --args "$1" "$2"

## or put your custom commands -------------------
#echo 'Husky.Net is awesome!'

dotnet clean
dotnet build
dotnet format --verify-no-changes
13 changes: 13 additions & 0 deletions .husky/task-runner.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"tasks": [
{
"name": "welcome-message-example",
"command": "bash",
"args": [ "-c", "echo Husky.Net is awesome!" ],
"windows": {
"command": "cmd",
"args": ["/c", "echo Husky.Net is awesome!" ]
}
}
]
}

0 comments on commit dc3d76e

Please sign in to comment.