Closed Jesn closed 2 years ago
Hi @Jesn, You should provide more information to let me reproduce if there is a problem. according to this result, you probably have a configuration problem in your task-runner.json.
@alirezanet
this is my task-runner.json
{
"variables": [
{
"name": "root-dir",
"command": "cmd",
"args": [ "/c", "dir", "/b" ]
}
],
"tasks": [
{
"name": "dotnet-format",
"group": "pre-commit",
"command": "dotnet",
"args": [ "dotnet-format", "--include", "${staged}" ],
"include": [ "**/*.cs" ]
},
{
"name": "commit-message-linter",
"group": "pre-commit",
"command": "dotnet",
"args": [
"husky",
"exec",
".husky/csx/commit-lint.csx",
"--args",
"${args}"
]
}
]
}
Probably you didn't install dotnet format. Make sure it is installed locally, (check .config\dotnet-tools.json
)
dotnet tool list --local
husky 0.4.4 husky path-to-project\.config\dotnet-tools.json
dotnet-format 5.1.250801 dotnet-format path-to-project\.config\dotnet-tools.json
eg: cat .\.config\dotnet-tools.json
{
"version": 1,
"isRoot": true,
"tools": {
"husky": {
"version": "0.4.4",
"commands": [
"husky"
]
},
"dotnet-format": {
"version": "5.1.250801",
"commands": [
"dotnet-format"
]
}
}
}
Version
0.4.4
Details
Steps to reproduce
git commit -m "feat: 添加IdentityService.Host"