To fully take full advantage of SonarQube in IntelliJ, it is recommended that your project is already being be analyzed on a regular basis by SonarQube. Indeed, you'll get features such as only displaying new issues that you have introduced.However, if you want to give SonarQube in IntelliJ a quick try, you just have to first declare your project through the SonarQube web interfaceRegular analysis allows the IntelliJ plugin to distinguish between existing issues and any new ones you introduced.
If your project is not already under analysis, you'll need to declare it through the SonarQube web interface.
Once your project exists in SonarQube, you're ready to get started with SonarQube in IntelliJ.
Setting SonarQube Servers
Go to File > Settings > SonarQube to add, edit or remove SonarQube servers :and configure your SonarQube instance.
The user you set to access the server has to be granted the Execute Preview Analysis permission.
Linking a Project to One Analyzed on a SonarQube Server
Once the SonarQube server is defined, the next step is to link your IntelliJ project with a project defined on this its counterpart on the SonarQube server.
To do so, right-click on the project and click on choose Associate with SonarQube. Start typing the name of the project and select it in the result list:
To do so, right-click on the project and click on Update SonarQube Association...:
Unlinking a Project
You can also remove the server association. To do so, right-click on the project, go to Update SonarQube Association..., then click on Remove Association.