This is the 28th day of my participation in the First Challenge 2022

Today is the 28th day to participate in this activity, so I should be able to get the prize smoothly. I will use SonarQube to analyze the code and record my operation process in my work. Used locally and on AzurePipeline

SonarQube

Welcome to SonarQube documentation!

SonarQube ® is an automated code review tool for detecting errors, bugs, and code problems in your code. It can be integrated with your existing workflow for continuous code review across project branches and pull requests.

Use SonarQube locally

SonarQube tokens tokens are generated on SonarQube tokens. SonarQube tokens are generated on SonarQube tokens.

projectkey:

Run the following commandMVN clean verify sonar:sonar -Dsonar. Login = your token -Dsonar. ProjectKey = your projectKeyThis will allow SonarQube to run locally

SonarQube is used on pipeline

That’s the basic setup, pre-analyze and then build…Some of them need to be set up like:

This location requires you to set the address of SonarQube’s server. You can click the new next to it to create this location, mainly fill in your SonarQube’s server address and the token just generated there

This place I used the book Java project so I chose to choose the second one.Fill in the following Advance with these: sonary.host. url=Sonarqube.net (fill in the actual Sonarqube address)Sonar. ProjectName =DemotestSQ// This is your name for your own project

Finally we see the following result on the actual SQ server

There are other questions, and solutions can be found hereDocs.sonarqube.org/latest/anal…

Finally, we can set Azurepipeline triggers to complete CICD when someone submits code

OK, done for the day. Be a problem solver, not a problem solver