Laravel Code Review&Analysis with SonarQube

rojina dawadi
3 min readApr 1, 2021

Code review is a stage in the software development life cycle ​where we check code systematically for errors, irregular formatting, ​or inconsistencies with system ​requirements​.Some of the importance's of code review can be

  • Improves code quality​
  • Supports knowledge transfer​
  • Helps teams create better documentation​
  • Makes QA testing easier​

How to install and configure SonarQube

  1. Go to this link and download SonarQube, we can see both Community Edition, the Developer Edition and the Enterprise Edition. Community Edition is free and open-source.If you are an Automation Engineer, you can use Community Edition for the test automation. If you are a Developer and if you want to check your code quality for the Developer perspective then you can Download the Developer Edition.
  2. Unzip the downloaded file and go to the bin folder.

3.Inside the bin folder, we can see Linux, Mac OS, and the Windows installation folder. Just go inside to the desired folder.

4.Inside the windows folder we can see few .bat files. We just need to click the StartSonar bat file to start the SonarQube server.

If you are using Linux then you need to start Sonar like this

5.To run SonarQube server we must have Java 11.So we need to download JDK 11. Use this link to download Java SE Development Kit 11. Unzip the downloaded file and set the Java path in Environment Variables.Then go to the SonarQube folder and find the conf folder. Open the wrapper.conf file in any text editor.

Change this “wrapper.java.command” line and add your Java 11 bin folder path -“wrapper.java.command=<your Java 11 bin folder path>/java”. Now again start the SonarQube server using StartSonar bat file like shown in previous steps.

6.Go to your browser and type http://localhost:9000/. Here this 9000 is the default port.

--

--