Member-only story
SonarQube in Android — Implementation tips and challenges faced

Introduction:
SonarQube is an open-source tool that helps developers and teams improve the quality of their code:
- Code quality analysis: Analyzes code quality for over 30 languages, frameworks, and IaC platforms
- Automatic reviews: Performs automatic reviews with static analysis of code to detect bugs and code smells
- Integration with DevOps platforms: Integrates with GitHub, GitLab, Azure, and Bitbucket
- Real-time feedback: Provides immediate feedback in your IDE as you write code
- Quality gates: Keeps code with issues from being released to production
Steps to implement:
I followed this medium article https://medium.com/@niranjanky14/sonarqube-tutorial-for-getting-started-in-android-app-7d11e2ef6932 while trying to implement SonarQube.
Step 1: Download SonarQube Free Edition from below link
Step 2: Download and install Docker from below link
Step 3: Open terminal and run the following command
docker pull sonarqube:latest
If you get an error — Docker command not found, then export its path
export PATH="$PATH:/Applications/Docker.app/Contents/Resources/bin/"
Keep Docker Application open in your system while typing the command docker pull sonarqube:latest, otherwise you may get the following error
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
If Step 3 is successful, you will see the following