SonarQube for IDE

Setting up SonarQube for IDE in Connected Mode with Cursor

This course outlines the process for setting up SonarQube for IDE within Cursor. To learn more about SonarQube for IDE and its Connected Mode features, see Sonar's online documentation.

Transcript

(music) Pulse (chime) Hey there! In this video, you’ll learn how to set up SonarQube for IDE in Connected Mode with Cursor. This allows you to find and fix issues directly in Cursor before your code goes into production. Let’s get started! The first step is to install the SonarQube for IDE extension. Go to the Extensions Marketplace and search for SonarQube, then select Install. Once it's installed, go to SonarQube setup. By default, Sonar will detect issues in your file based on your local definition of Sonar rules. The next step is to configure Connected Mode. This binds your IDE with your SonarQube instance so you can align your code quality standards, gain access to advanced bug and security rules, and detect secrets directly in your IDE. Connected Mode also allows you to switch between new code and old code. To enable Connected Mode, navigate to the SonarQube instance you want to connect to, and select More Actions to initiate the connection. Note that if credential connection sharing is already enabled in your repository, you can simply click Set up connection. Otherwise, you’ll need to enter your server URL manually. Next, generate a user token. If you're already logged in to your SonarQube instance, Cursor will generate the token automatically. Give your connection a unique name to help you identify it and select Save Connection. The next step is to configure your project binding. If you already have connection sharing enabled, your project will automatically bind. Otherwise, select Add Project Binding. The tool will automatically suggest projects to bind, but if you don’t see your project, search for it instead, then select it. Lastly, if you want to share your Connected Mode configuration file with other developers working on the same project, select Share configuration. This stores the project binding in the repository, so everything is pre-configured for other developers. Now you’re ready to start finding and fixing issues in Cursor. See our additional videos to learn more about Sonar topics. Thanks for watching!