-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Breaking changes in dotnet-format 6.x #1292
Comments
Hi @JoeRobich, dotnet format --include folder/targetFile.cs The expected behavior is ignoring everything else except the target file. or providing an option to change its behavior. |
@alirezanet Thanks for bringing this up. There seems to be issues with how our CommandLine options are being parsed by the Dotnet CLI itself prior to them being sent to our tool. As a workaround you can try using |
Hi @JoeRobich, @alirezanet and I have been trying to find a solution to this issue. (alirezanet/Husky.Net#23) Is it a bug or by design that |
It is by design that if you are working against a .csproj or .sln that the only files you can include are also part of that project or solution. You can use the |
@JoeRobich Hi, please consider reverting that last bullet point:
It seems to break dotnet format completely when preview versions are installed because it is now trying to load the wrong assemblies. See #1500 for logs. When a project has a |
I'm using lint-staged (node tool) to perform this exactly scenario. |
We had some problems in the previous versions of husky.net, It is solved now. I suggest trying it out since not every dontet project needs npm and node js to be installed. |
@alirezanet how did you solve this? i'm trying to setup husky .net with dotnet-format on a dotnet 6.0 project and i'm running into the "no workspace" problem. If i do provide a workspace i run into problems like IDE1006 can't fix the whole solution |
dotnet-format, unfortunately, doesn't work if your csharp file isn't part of a project/solution. this is dotnet-format default behavior which I don't like either, and it is not related to husky. I solved husky compatibility issues with this behavior. |
Yeah but even when i do supply a file that is part of a project/solution i get errors like it not being able to apply NamingStyleCodeFixProvider
|
@jose-tissei Currently dotnet-format cannot fix NamingStyle issues as Roslyn does not provide a support for it. See Roslyn issue dotnet/roslyn#14983. Is dotnet-format logging this warning causing issues? |
@JoeRobich i thought it was more of a generalized error and that the way i was running the tool was wrong, now that i know that it's just a limitation from roslyn i can use it just fine, thank you! |
warning
.The text was updated successfully, but these errors were encountered: