To fully take advantage of SonarQube in IntelliJ, it is recommended that your project is already being 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 interface.
Setting SonarQube Servers
Go to File > Settings > SonarQube to add, edit or remove SonarQube servers:
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 a project defined on this SonarQube server.
To do so, right-click on the project and click on 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
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.