When you have a nice .Net core solution and want to see the code smell and technical debt, you can analyze it with SonarCube
I started by browsing to the docker hub and used a container:
docker pull sonarqube
docker run -d --name sonarqube -p 9000:9000 sonarqube
The default username is ‘admin’ and the default password is ‘admin’ so once it is started you can head over to http://localhost:9000 and login. Configure your project there and copy the key/hash
You can get the SonarLint extension for Visual Studio and Visual Studio Code and link it to the local SonarCube server.
You need this one time installation of a global tool:
dotnet tool install --global dotnet-sonarscanner --version 4.3.1
And then:
dotnet sonarscanner begin /k:"project-key"
dotnet build <path to solution.sln>
dotnet sonarscanner end
Wait a minute after it finishes so that the SonarCube server has some time to process the results. Check the dashboard again to see the smell, bugs and tech debt. This does help you verify if you are still coding SOLID.
Happy coding!