Skip to content

ci: fail pull requests with new Sonar issues #88

Description

@jamessawle

Problem

SonarQube Cloud currently uses the built-in Sonar way quality gate. It can report newly introduced issues while still passing the gate because maintainability remains rated A. PR #87 demonstrated this with three new critical maintainability findings and a passing quality gate.

Scope

  • Determine whether the current SonarQube Cloud plan supports a project-specific custom quality gate.
  • If supported, configure a gate that fails when New issues > 0 while retaining the existing security, reliability, maintainability, hotspot, coverage, and duplication conditions.
  • If it is not supported, add a repository-owned required CI check that waits for the matching Sonar analysis and fails when it reports any new open or confirmed issue.
  • Make any bypass explicit, auditable, narrowly scoped, and documented; do not silently accept new issues.
  • Keep branch protection and contributor documentation aligned with the selected enforcement mechanism.

Acceptance criteria

  • A pull request introducing any new Sonar issue fails a required check by default.
  • An allowed exception requires an explicit, visible bypass with a recorded reason.
  • CONTRIBUTING.md documents the quality check.
  • mise run validate passes.

Context

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    maintenanceRepository, tooling, release, and dependency upkeep

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions