sethreno/ReGitLint

Not compatible with dotnet sdk 6.x

chgsit00 opened this issue · 2 comments

It seems like there was a breaking change in the dotnet sdk 6.0 making ReGitLint unusable.
When trying to format staged files the following output ist displayed using the sdk version 6.0.201:

PS C:\c\grow3d> dotnet regitlint -f staged --fail-on-diff --format-only
No sln file specified. Searching for one...
Found .\backend\backend.sln. Using that.
error:command "cleanupcode" not found
error:argument"-v" not found
looks like jb dotnet tool isn't installed...
you can install it by running the following command:

dotnet tool install JetBrains.ReSharper.GlobalTools

Upon further investigation I found that you use "dotnet tool run jb cleanupcode" to run the Resharper.
This has changed to "dotnet jb cleanupcode" in the sdk 6.x.

using this global.json at the project's root fixed the issue for me:
{ "sdk": { "version": "5.0.406" } }

However in the future it would be nice to have an updated release that checks for the configured sdk version and using the appropriate syntax. :)

@chgsit00 Can you point me to some documentation that says the dotnet tool run syntax has been deprecated?

I'm not able to reproduce this and the docs I've read say dotnet tool run is valid syntax. https://docs.microsoft.com/en-us/dotnet/core/tools/global-tools#invoke-a-local-tool

I can't reproduce this using net6.0.