-
Notifications
You must be signed in to change notification settings - Fork 78
Analyzers not working with dotnet format #387
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
Comments
This is not an issue on our side, but rather on the We use diagnostic suppressors to handle specific I spotted a similar issue with NUnit suppressors: |
Here is the initial tracking ticket: (but I believe newer devs are in the sdk repository now) Closing this one. |
@pierre-fove I made a PR that fixes this issue: dotnet/sdk#48512 |
Oh great! much thanks! :) |
Bug description
When using the
dotnet format unity-solution.sln
to ensure that our Unity project respects the .editorconfig linting rules, the Unity analyzer dll isn't properly loaded/used, resulting in a lot of IDE0051 (unused private member) and IDE0044 (field can be make readonly).To Reproduce
dotnet format project-name.sln --severity warn --verify-no-changes --verbosity diagnostic
Expected behavior
Same as what is displayed in Visual Studio (eg. no linting error)

Actual Result
IDE0051 errors
Additional info
This issue can be easily reproduced in Visual Studio by removing the following lines from Assembly-CSharp.csproj
The text was updated successfully, but these errors were encountered: