View on GitHub

PyKaraoke-NG

A free, open-source karaoke player for Linux, Windows, and macOS

SonarQube Integration Setup

← Back to Home Developer Guide Admin Guide

This repository is configured to use SonarCloud for continuous code quality analysis.

Prerequisites

Setup Instructions

1. Configure GitHub Secrets

Add the following secrets to your GitHub repository:

  1. Go to your repository: https://github.com/wilsonify/pykaraoke-ng
  2. Navigate to SettingsSecrets and variablesActions
  3. Click “New repository secret” for each of the following:

SONARQUBE_TOKEN

SONARQUBE_HOST_URL

2. Verify Configuration Files

The repository includes the following SonarQube configuration files:

3. Trigger Analysis

SonarCloud analysis runs automatically on:

To manually trigger an analysis:

  1. Go to Actions tab in GitHub
  2. Select “SonarQube Analysis” workflow
  3. Click “Run workflow”

Viewing Results

After the workflow completes:

  1. Visit your SonarCloud project dashboard:
    • URL: https://sonarcloud.io/project/overview?id=wilsonify_pykaraoke-ng
  2. Review quality metrics:
    • Bugs: Potential runtime errors
    • Vulnerabilities: Security issues
    • Code Smells: Maintainability issues
    • Coverage: Test coverage percentage
    • Duplications: Duplicated code blocks

Quality Gates

The project is configured with quality gates that must pass:

If quality gates fail, the CI pipeline will fail, preventing merges.

Troubleshooting

Authentication Errors

Analysis Failures

Quality Gate Failures

Security Note

NEVER commit the SonarQube token directly to the repository. Always use GitHub Secrets to store sensitive credentials.