Static Code Analysis Setup
Static Code Analysis Setup
For this exercise, you will be setting up SonarQube to analyze your Java project code and
SonarScanner to analyze your TypeScript code.
Install SonarQube
We will be using the Docker image to run SonarQube. To install, you must first have Docker
running on your computer. You can install Docker Desktop here:
• Windows - https://hub.docker.com/editions/community/docker-ce-desktop-windows
• Mac - https://docs.docker.com/desktop/mac/install/
Make sure you Docker Desktop running. Open a terminal window and type:
Accessing SonarQube
Once you have SonarQube installed and running, log in to http://localhost:9000 with System
Administrator credentials (admin/admin) and update your password.
Remember your username and password as this will be needed later for the exercise.
Scroll to the bottom and make sure Force user authentication is unchecked. This will allow you
to freely run SonarQube without requiring any credentials.
Install SonarScanner
To stop SonarQube on Docker, you must first find the container id by typing: docker ps