Skip to content

NPA-7116: Add Sonar cloud scanning for sandbox only - #386

Merged
ellie-bound1-NHSD merged 4 commits into
masterfrom
task/NPA-7116/add-sonar-cloud-to-repo
Aug 17, 2026
Merged

NPA-7116: Add Sonar cloud scanning for sandbox only#386
ellie-bound1-NHSD merged 4 commits into
masterfrom
task/NPA-7116/add-sonar-cloud-to-repo

Conversation

@ellie-bound1-NHSD

@ellie-bound1-NHSD ellie-bound1-NHSD commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Pull Request

🧾 Ticket Link

https://nhsd-jira.digital.nhs.uk/browse/NPA-7116


📄 Description/Summary of Changes

  • Add SonarQ Cloud Scanning to Sandbox directory

🧪 Developer Testing Carried Out

  • Can see in commit checks a sonar cloud scan is added as part of the PR checks. Analysis is passing -> https://sonarcloud.io/summary/new_code?id=NHSDigital_validated-relationships-service-api&pullRequest=386

📋 PR Principles

  • Keep PRs Small and Focused: Ensure the PR addresses a single task or feature to make it easier to review.
  • Multiple PRs for one Ticket: When splitting work into multiple PRs, clearly describe what this PR addresses and outline the remaining work to complete the ticket.
  • Ensure Tests Are Included: Add or update unit, integration, or end-to-end tests to cover the changes made.
  • Follow Coding Standards: Ensure the code adheres to the team's coding guidelines and best practices.
  • Resolve Comments Promptly: If you raise a comment, ensure you follow up and resolve it before approving the PR to maintain clarity and ensure comments are addressed.
  • Foster Learning: PR reviews are an opportunity to share knowledge, provide constructive feedback, and encourage a collaborative environment.

🏷️ Naming Conventions Reminder

Please ensure the following naming conventions are followed:

  • PR title follows the format: NPA-XXXX: <short-description>
  • Branch name follows the convention: <type>/NPA-XXXX/<short-description>
  • Commit messages follow the template: NPA-XXXX: <short-description>

Copilot AI lite review requested due to automatic review settings August 17, 2026 09:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds SonarQ Cloud static analysis configuration to this repository, targeting the sandbox directory so Sonar analysis focuses on the sandboxed API code.

Changes:

  • Introduces sonar-project.properties to configure Sonar project/org and restrict analysis scope to sandbox.
  • Adds a GitHub Actions workflow to run SonarCloud analysis on pushes and pull requests.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
sonar-project.properties Adds Sonar project configuration and limits sources to sandbox.
.github/workflows/sonarcloud.yml Adds a CI workflow to run the Sonar scanner in GitHub Actions.
Suppressed comments (1)

.github/workflows/sonarcloud.yml:15

  • actions/checkout is referenced by tag (@v4) while other workflows in this repo pin actions to a full commit SHA (e.g. actions/checkout@d23441... # v6). Pinning helps prevent supply-chain issues from a retagged or compromised release.
      - uses: actions/checkout@v4

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread sonar-project.properties Outdated
Comment thread .github/workflows/sonarcloud.yml
@sonarqubecloud

Copy link
Copy Markdown

@davesmallnhs davesmallnhs left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ellie-bound1-NHSD
ellie-bound1-NHSD merged commit e64e47b into master Aug 17, 2026
21 checks passed
@ellie-bound1-NHSD
ellie-bound1-NHSD deleted the task/NPA-7116/add-sonar-cloud-to-repo branch August 17, 2026 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants