Skip to content
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

--severity-level is ignored with dotnet tool #1446

Closed
holly-hacker opened this issue Apr 21, 2024 · 3 comments · Fixed by #1449
Closed

--severity-level is ignored with dotnet tool #1446

holly-hacker opened this issue Apr 21, 2024 · 3 comments · Fixed by #1449

Comments

@holly-hacker
Copy link

holly-hacker commented Apr 21, 2024

Product and Version Used:

❯ dotnet roslynator --version
0.8.6.0

Steps to Reproduce:
Create a project with automatically generated EF migrations, or a project with any hidden or info diagnostics.

Actual Behavior:

VideoArchive3 on  main [$!?]
❯ dotnet roslynator analyze --severity-level warning -o test.xml
Loading solution '/home/variant9/Projects/VideoArchive3/VideoArchive3.sln'...
Analyze solution '/home/variant9/Projects/VideoArchive3/VideoArchive3.sln'
Analyze 'Domain.ApiModels' 1/5
Analyze 'ApiClient' 2/5
Analyze 'Domain.Database' 3/5
  Migrations/20240406144306_AddCreator.cs(1,1): hidden CS8019: Unnecessary using directive.
  Migrations/20240406195658_AddSource.cs(1,1): hidden CS8019: Unnecessary using directive.
  Migrations/20240406202552_AddCreatorProfile.cs(1,1): hidden CS8019: Unnecessary using directive.
  Migrations/20240412190819_AddInitialPostModels.cs(1,1): hidden CS8019: Unnecessary using directive.
  Migrations/20240406144306_AddCreator.cs(1,7): hidden CS8933: The using directive for 'System' appeared previously as global using
  Migrations/20240406195658_AddSource.cs(1,7): hidden CS8933: The using directive for 'System' appeared previously as global using
  Migrations/20240406202552_AddCreatorProfile.cs(1,7): hidden CS8933: The using directive for 'System' appeared previously as global using
  Migrations/20240412190819_AddInitialPostModels.cs(1,7): hidden CS8933: The using directive for 'System' appeared previously as global using
Analyze 'Web' 4/5
Analyze 'DummyDownloadAgent' 5/5
Analyzed solution '/home/variant9/Projects/VideoArchive3/VideoArchive3.sln' (in 5.1 s)

4 CS8019 Unnecessary using directive
4 CS8933 The using directive appeared previously as global using

8 diagnostics found

VideoArchive3 on  main [$!?] took 7s
❯ echo $status
1

Expected Behavior:
No diagnostics reported due to --severity-level warning (as described by these docs).


I don't see any errors in logs when using diag-level logging. This happens both locally and in my CI pipeline.

@holly-hacker holly-hacker changed the title --severity-level is ignored with dotnet tool --severity-level is ignored with dotnet tool Apr 21, 2024
@josefpihrt
Copy link
Collaborator

Btw, I think it's not necessary to run dotnet roslynator, it's enough to run roslynator.

@holly-hacker
Copy link
Author

Thanks for the speedy fix! Do you think you'll be able to release a new point release with this fix soon?

@josefpihrt
Copy link
Collaborator

It's been released: https://www.nuget.org/packages/Roslynator.DotNet.Cli/0.8.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants