Setup Sonarlint/SonarQube With VSCode

Kobe
2 min readAug 23, 2020

Today I will guide you on how to configure VSCode with SonarQube Server.

Step 1. Install SonarLint Extension.

Step 2. Open global setup for VS Code

Ex:\AppData\Roaming\Code\User\settings.json

"sonarlint.connectedMode.connections.sonarqube": [{        "serverUrl": "https://sonar.domain.net",        "token": "xxxx"}]

Step 3. How to get token for the application

Access to current SonarQube Server

Ex. Open link https://sonar.domain.net/

Login with your account and go to Account Settings

Go to the security tab and generate token — copy token to VS Code settings

Step 4. Go to the code base of your application

Add a workspace/user settings for the application

Add this config to your workspace/users settings

“sonarlint.connectedMode.project”: {    “projectKey”: “TestApp”}

How to get projectKey

  1. Go to the SonarQube Server

2. Click in the Project you want to check — You can get Project Key -> ID in the URL

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Kobe
Kobe

Written by Kobe

I’m working at KMS-Technology company. I love code (▀̿Ĺ̯▀̿ ̿) — Full Stack Software Engineer

No responses yet

Write a response