Skip to content

Latest commit

 

History

History
96 lines (61 loc) · 4.52 KB

Sonar.md

File metadata and controls

96 lines (61 loc) · 4.52 KB

Installation guide and sonarqube test

Brief installation guide where we apply the steps followed for the correct creation of the analysis environment sonarqube in windows 10

Elements used

Instalation

Step 1

Install all previously mentioned elements

Step 2

Using MYSQL Workbench we create an schema which we will call sonarqube, we can create it directly as the image shows or first create it and then use the scrip on it.

Step 3

Now we go to the conf file that is where we installed our sonarqube and we decompose and modify the following sections.

Step 4

Now we will start our sonarqube server, first we open a cmd where we will put the route to our sonarqube, then we will enter the bin folder, we will choose our operating system and once this is done we will copy this route in the cmd and execute StartSonar.bat

Now we can enter our LocalHost: 9000 where the server will be deployed

Step 5

We will enter our server sonarqube using the credentials:

  • username: admin
  • pass: admin Where we can see our projects, configure them, eliminate them or install plugins.

Step 6

We create a file called sonar-project.properties which will have the following appearance

The important data are "sonar.projectKey=my:project" and "sonar.projectName=My project" in which we will have to add the name of our project. The file in our case will look like this.

And this file will be stored in the raid of our project.

Step 7

The next step is to execute the analysis in our code. For this we will open a cmd and we will place ourselves in the directory of the sonar-project and in the we will execute the sonar-scanner command

When the analysis finishes, the following will appear and we will go to the sonarquide server page

Step 8

Seeing our mistakes we can solve them.

Once we have seen our errors, we go to the files with this error and correct them one by one. When we correct them and we pass our sonarqube again we see how they have been solved.

With the last type of error we do the same as indicated and we would go through the scanner

Once corrected, we see the result of having 0 bugs

And with this we would finish our analysis