Open aliasadidev opened 1 year ago
@alirezanet Hi, I'm back again :) the problem solved when i added that flag
Hi @aliasadidev, thank you for the contribution but your pr is still open, this issue will automatically close after we merge it. also, I want to check what is going on later
Hi @aliasadidev, Checking your issue and PR I still don't get why this is needed, if you want to write a condition in the hook itself why do you need husky? the main goal of this library is to avoid editing hooks manually, and since dotnet format doesn't exit with a non-zero exit code husky doesn't interfere with the commit.
I think the better approach to solving similar problems is to use a csx
script or some other script file and call it from the husky(instead of calling dotnet-format directly), this way your logic is separated and maintainable and your hook file is not complicated. unless I'm missing something.
Version
0.5.4
Details
The tool doesn't care about the errors, the information attached into Steps to reproduce section
Steps to reproduce
setup and config
add .editorconfig file
pre-commit file content
Task-runner.json
Update program.cs (with bad format)
Add all files
The problem is when I send the git commit, it will be stored successfully, but it shouldn't be.
As you can see the file should be placed in the change section.
Dotnet format worked correctly (added the file as a new file changed)