Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>PR & SonarQube ReviewNew to Visual Studio Code? Get it now.
PR & SonarQube Review

PR & SonarQube Review

Mugesh

|
1 install
| (0) | Free
AI-powered PR review, SonarQube issue check, and JUnit 5 test generation for Spring Boot microservices — reviews only your uncommitted changes
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

PR & SonarQube Review Agent

A GitHub Copilot Chat participant extension that reviews only your uncommitted changes. It provides AI-powered PR review, live SonarQube issue filtering, and JUnit 5 test generation — all scoped to the code you actually changed.

Features

Type @pr-review in GitHub Copilot Chat to use any of these commands:

Command Description
/pr-review AI-powered code review of uncommitted changes — naming, logic, impact, security, performance, architecture — with APPROVE / REQUEST CHANGES / NEEDS DISCUSSION verdict
/sonar-check Fetches issues from your live SonarQube server, filtered to only the lines you changed — includes quality gate status and project metrics
/test Generates or updates JUnit 5 test cases for changed methods with Copilot-style Accept / Reject UI in the editor

How It Works

  1. Git Diff Detection — Automatically detects uncommitted changes via git diff HEAD
  2. Scoped Analysis — Only reviews files and lines you actually modified
  3. LLM-Powered — Uses GitHub Copilot's language models (GPT-4o, Claude 3.5 Sonnet) for review and test generation

/pr-review — AI Code Review

  • Reviews naming conventions, logic correctness, security, performance, and architecture
  • Provides a clear verdict: ✅ APPROVE, ⚠️ REQUEST CHANGES, or 💬 NEEDS DISCUSSION
  • Analyzes impact on existing functionality

/sonar-check — Live SonarQube Integration

  • Connects to your SonarQube server (including self-signed certs)
  • Fetches only OPEN/CONFIRMED/REOPENED issues
  • Filters issues to changed lines only — no noise from untouched code
  • Shows quality gate status and project metrics (bugs, vulnerabilities, code smells, coverage, duplication)
  • Supports Basic auth with Bearer token fallback (SonarQube 10+)

/test — Test Generation

  • Generates JUnit 5 tests for changed methods using Mockito
  • For existing test files: merges new test methods without removing existing ones
  • For new files: creates complete test classes with proper annotations
  • Uses Copilot-style Accept / Reject UI — review proposed changes before applying
  • Supports @WebMvcTest for controllers, @ExtendWith(MockitoExtension.class) for services, @DataJpaTest for repositories

Setup

Requirements

  • VS Code 1.93+
  • GitHub Copilot Chat extension
  • A Git repository with uncommitted changes

SonarQube (optional, for /sonar-check)

  1. Set your server URL: Settings → PR Review → SonarQube Server URL
  2. Set your project key: Settings → PR Review → SonarQube Project Key
  3. Run command PR Review: Set SonarQube Token to store your auth token securely
  4. Run command PR Review: Test SonarQube Connection to verify

VS Code Commands

Command Description
PR Review: Set SonarQube Token Store/update/remove your SonarQube authentication token
PR Review: Test SonarQube Connection Verify server reachability, authentication, and project access

Installation

  1. Clone or download this extension
  2. Run npm install and npm run compile
  3. Press F5 to launch the Extension Development Host
  4. Open a project with uncommitted changes and type @pr-review in Copilot Chat

To package as a .vsix:

npm install -g @vscode/vsce
vsce package
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft