sonarqube-scan

Run SonarQube scans on Python projects and upload quality reports to SonarCloud.

Updated Jul 30, 2025
One-click install
npx skills add https://github.com/visgwu/python_web_app --skill sonarqube-scan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sonarqube-scan
Source: https://github.com/visgwu/python_web_app/tree/main/.claude/skills/sonarqube
Command: npx skills add https://github.com/visgwu/python_web_app --skill sonarqube-scan

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pysonar, and includes scripts (resource) components.

What problem does it solve?

This Skill runs SonarQube/SonarCloud scans to measure code quality, identify security vulnerabilities, code smells, and bugs, giving teams a centralized view of software quality.

Core Features & Use Cases

  • Automated quality analysis: Scans Python files and generates quality reports.
  • Upload to SonarCloud: Results uploaded to SonarCloud for dashboards and collaboration.
  • CI/CD integration: Integrate scans into CI pipelines to gate code changes.

Quick Start

Run the Windows script: powershell.exe -ExecutionPolicy Bypass -File .claude/skills/sonarqube/scripts/run_sonar_scan.ps1 Run the Linux/Mac script: bash .claude/skills/sonarqube/scripts/run_sonar_scan.sh

Frequently Asked Questions about sonarqube-scan

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run static analysis on Python code to identify security vulnerabilities and bugs?

Static analysis scans source code without executing it to detect security vulnerabilities, bugs, and code quality issues. SonarQube/SonarCloud performs this analysis on Python projects, categorizing findings by severity and type, then uploads results to a centralized dashboard for tracking and remediation.

Can I integrate code quality scanning into my CI/CD pipeline?

Yes. SonarQube scans integrate directly into CI/CD workflows to gate code changes based on quality metrics. The Skill runs scans automatically, generates quality reports, and uploads results to SonarCloud, enabling teams to enforce quality standards before merging.

What do I need to set up to run SonarQube scans on my Python project?

To run SonarQube scans, you need Python, pip, the pysonar client installed, and SonarCloud credentials including an authentication token, project key, and organization name. The Skill executes scans across specified source files with optional exclusions and branch configuration.

How does SonarQube identify code smells and technical debt?

SonarQube analyzes code patterns to detect code smells—maintainability issues like duplicated code, complex methods, and poor naming—and quantifies technical debt as the effort required to remediate these issues. Reports prioritize findings by impact and severity.

Can I exclude specific files or directories from SonarQube scans?

Yes. The Skill supports optional exclusion patterns to skip specific files or directories during scans. You configure exclusions and other scan parameters like branch settings before execution to focus analysis on relevant source code.

What's the difference between running scans locally versus in a CI/CD pipeline?

Local scans provide immediate feedback during development; pipeline scans enforce quality gates on every commit. Both use the same SonarQube analysis engine but pipeline scans ensure consistent, automated quality checks before code merges and produce historical trend reports.

Related Skills