Originally posted by **AlaiyaNetwork** December 4, 2023
I add this task
```
{
"name": "Clean up code",
"group": "clean-up-code",
"command": "cmd",
"pathMode": "relative",
"args": [
"/c",
"dotnet",
"jb",
"cleanupcode",
"My.sln",
"--profile=Teams: Clean up code",
"--settings=My.sln.DotSettings",
"--include=${stages-files}"
]
}
```
And variables:
```
{
"name": "stages-files",
"command": "cmd",
"args": [
"/c",
"git diff --staged --name-only --no-ext-diff --diff-filter=AM | tr '\\n' ';' | sed 's/;$//'"
]
}
```
If I commited none *.cs files:
```
[Husky] Preparing task 'Clean up code'
[Husky] Executing task 'Clean up code' ...
JetBrains Cleanup Code 2023.3 RC 1
Running on x64 OS in x64 architecture, .NET 8.0.0 under Microsoft Windows 10.0.22631
No items were found to cleanup.
❌ Task 'Clean up code' failed in 16 864ms
husky - pre-commit hook exited with code 1 (error)
```
Maybe someone has already had this problem and can suggest a good solution?
Discussed in https://github.com/alirezanet/Husky.Net/discussions/98