/code-quality-sonar-qube

5-module in Java Global Mentoring Program

Primary LanguageJava

Code Quality Module Practical Task Necessary Tools Java Development Kit 11+ Apache Maven 3.6.0+ Git 2.24+ Docker ##Task (1 star)

  1. Run Sonarqube docker container
  1. Login to Sonarqube web interface
  • default password: admin
  1. Configure a new project with token
  2. Analyse your pet project with SonarQube. Use generated token for it (you can get project from previous modules)
  1. If there are any issues, correct it
  2. Prepare .doc report with screenshot for every step (2-3 stars)
  3. Configure a new project with token
  4. Create a new maven project with a few (10+) issues, e.x. :
  • Don't use method reference
  • Use switch operator. Define 'default' in the top of operator
  • etc.
  1. Analyse your project
  2. Try to skip all issues with @SuppressWarnings
  3. Prepare .doc report with screenshot for every step (4 stars)
  4. Remove @SuppressWarnings for project from previous section
  5. Create a new Sonar java profile (copy it from default java profile)
  6. Deactivate rules for issues from previous section
  7. Link new profile to your project
  8. Analyse your project
  9. Prepare .doc report with screenshot for every step (5 stars)
  10. Create a new Quality Gate with:
  • Duplicated code (> 10)
  • Issues (> 20)
  • Code smells (> 40)
  • Bugs (> 35)
  • Unit test succsess (< 40)
  1. Link it to your project
  2. Analyse your project
  3. Prepare .doc report with screenshot for every step References • Clean Code • Agile Software Development: Code Quality • 11 Best Practices and Tools to Improve the Java Code Quality • S.O.L.I.D