Slide 1

Slide 1 text

Code Analysis in Android project with SonarQube Funky Bags Squad Presenter: Hieu Vu

Slide 2

Slide 2 text

About Sonar equips developers and organizations to systematically achieve a state of Clean Code so that all code is fit for development and production.

Slide 3

Slide 3 text

Benefits

Slide 4

Slide 4 text

SonarQube vs SonarCloud Self-managed static analysis tool for continuous codebase inspection Cloud-based static analysis tool for your CI/CD workflows

Slide 5

Slide 5 text

Local setup 1 Download SonarQube from official site. (https://www.sonarsource.com/products/sonarqube/downloads/)

Slide 6

Slide 6 text

Local setup Local setup 2 Extract and run the bash file according to your OS It is located at bin folder

Slide 7

Slide 7 text

Local setup Local setup 3 Open terminal, run ./sonar.sh start

Slide 8

Slide 8 text

Local setup Local setup 4 Open browser, go to http://localhost:9000/ Default account: admin/admin

Slide 9

Slide 9 text

Local setup Local setup 5 After logging in successfully, a dashboard will be displays Click on Create Project > Manually & fill in project information

Slide 10

Slide 10 text

Local setup Local setup 6 Select first option for simplicity then click Create Project

Slide 11

Slide 11 text

Local setup Local setup 7 Select DevOps tools you want to integrate with, it will provide instruction We will choose Locally

Slide 12

Slide 12 text

Local setup Local setup 8 Generate token & follow instruction to run code analysis

Slide 13

Slide 13 text

Android Setup 9 Add plugin in build.gradle (app)

Slide 14

Slide 14 text

Android Setup 10 Open terminal, copy command from SonarQube and run

Slide 15

Slide 15 text

Analysis Result

Slide 16

Slide 16 text

Analysis Result

Slide 17

Slide 17 text

Analysis Result

Slide 18

Slide 18 text

Analysis Result

Slide 19

Slide 19 text

Demo