sshnet / SSH.NET

SSH.NET is a Secure Shell (SSH) library for .NET, optimized for parallelism.
http://sshnet.github.io/SSH.NET/
MIT License
3.88k stars 917 forks source link

Cleanup and muting of analyzer warnings #1357

Closed jscarle closed 2 months ago

jscarle commented 3 months ago

As it currently stands, the analyzer warnings and messages make the analyzers overly difficult to follow. There are currently more that 32k messages for the entire solution:

Warnings

There are also new analyzer warnings coming in .NET 9.0. Therefore to bring some order to the chaos, I started by addressing the analyzer warnings and messages that could be easily fixed. I then switched all of the analyzer warnings from suggestion to silent for all test projects. I then set the remaining analyzer warnings in the main project to none.

In the future, I'll look into standardizing all of the analyzer configurations and merge everything down to two .editorconfigs files, one for the main project, and another for all of the tests, while also addressing as many warning as is logical.

jscarle commented 3 months ago

@Rob-Hague FYI.

Rob-Hague commented 3 months ago

Thanks for tackling some of the noise. On initial look, I think test classes are supposed to be public? I can see that they are not running in CI

jscarle commented 3 months ago

@WojciechNagorski @Rob-Hague Ready for review and merge.

Rob-Hague commented 2 months ago

Something is wrong with CI...

It crashed on the latest commit on this PR: https://ci.appveyor.com/project/drieseng/ssh-net/builds/49517362/job/8rdxcr7v12990kdx?fullLog=true

On some builds it is only running 840 tests on Ubuntu: https://ci.appveyor.com/project/drieseng/ssh-net/builds/49516084 https://ci.appveyor.com/project/drieseng/ssh-net/builds/49513131

jscarle commented 2 months ago

@Rob-Hague All tests seem to be passing now. I also cleaned up the diff by removing any formatting changes to make it easier to review.

Rob-Hague commented 2 months ago

Thanks. CI managed to finish all 2951 tests on Ubuntu, so this is good to merge from me.