0 Comments

When you have a nice .Net core solution and want to see the code smell and technical debt, you can analyze it with SonarCube

SonarQube

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!

Pin on pinterest Plus on Googleplus Post on LinkedIn

Recently the Raspberry Pi 4 was announced, But I am currently using my rpi 3test_1 and want to run Rabbit MQ on it in Docker. So I used these two commands to get it to work and I just wanted to share it:


sudo rm /etc/apt/sources.list.d/docker.list;

curl –sL get.docker.com | sed ‘s/9)/10)’ | sh

If you would like to use Docker as a non-root user you should add your user to the docker group:

sudo usermod –aG docker pi

To get Rabbit MQ (which has arm container) on the pi with a management web interface run:

sudo docker run –d –hostname my-rabbit –name some-rabbit –p 15672:15672 –p 5672:5672 rabbitmq:3-management

Then get the ip of the docker container with (but since you added the ports in the previous command, this step can be skipped):

sudo docker inspect –f ‘{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}’ some-rabbit

Then you can launch a browser and go to http://thatipaddress:15672 and login with 'guest/guest'. If you did not lookup the ip of the container you can use the ip of the pi because you opened container ports when running it.


8850828555_df7c7bd300_b


Good luck!

Pin on pinterest Plus on Googleplus Post on LinkedIn