SonarQube for IDE

Setting up SonarQube for IDE in Connected Mode with Eclipse

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

Transcript

Hey there! In this video, you’ll learn how to set up SonarQube for IDE in Connected Mode with Eclipse. This allows you to find and fix issues directly in Eclipse before you even commit the code. Let’s get started! The first step is to install the SonarQube for IDE extension. Go to Help, then Eclipse Marketplace and search for SonarQube, and select Install. You’ll need to restart your IDE to apply the extension. After restarting, you’ll see that the extension is already detecting issues based on Sonar’s default settings. In order to connect to your organization’s custom rules and settings, you’ll need to enable Connected Mode. To enable Connected Mode, you’ll need to go to your Eclipse toolbar, and select File > New > Other, and within the SonarQube folder, select New SonarQube Connection. Connected Mode binds your IDE with your SonarQube instance and unlocks security analysis like SAST and secrets, and advanced bug detection. It allows you to perform SonarQube operations right in your IDE including AI Code Fix, marking false positives, and accepting issues. It also enables support for additional commercial languages. To see more about Connected Mode features, see Sonar’s documentation guide. Note that if connection configuration sharing is already enabled in your repository, you should have an option labeled Set up connection. Otherwise, select the instance you want to connect to, enter your server URL, and generate a token. Note that if you're already logged in to your SonarQube instance, Eclipse will generate the token automatically. Create a name for your connection, then select Next. You’ll have the option to get regular updates on your connection, and to create a password for connection recovery. Next, you’ll bind your project to an existing project to copy its rules and settings. If you already have connection sharing enabled, your project will automatically bind. Otherwise, select Add, search for your project, and select it. The project is now bound. Best Practice: You can share your configuration to the project repository, so everything is pre-configured for other developers working on that same project. Now you’re ready to start finding and fixing issues in Eclipse. See our additional videos to dive deeper into Sonar topics. Thanks for watching!