To take full advantage of SonarQube in IntelliJ, it is recommended that your project be analyzed on a regular basis by SonarQube. Regular 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:
Linking a Project to One Analyzed on a SonarQube Server
Linking for the first time
Once the SonarQube server is defined, the next step is to link your IntelliJ project with its counterpart on the SonarQube server.
To do so, right-click the project and choose Associate with SonarQube. Start typing the name of the project and select it in the result list:
At any time, it is possible to change the project association.
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.
You are now all set with configuration and you can start using SonarQube in IntelliJ.