Skip to content

Commit 82dbe32

Browse files
chore: add SonarCloud analysis (#49)
Adds `sonar-project.properties`, a standalone `.github/workflows/sonarcloud.yml` (SonarSource/sonarqube-scan-action, SHA-pinned), and a README quality-gate badge. Mirrors the boj-server reference setup. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent d4facf4 commit 82dbe32

4 files changed

Lines changed: 44 additions & 0 deletions

File tree

.github/workflows/sonarcloud.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# SPDX-License-Identifier: MPL-2.0
2+
# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
3+
#
4+
# SonarQube Cloud (SonarCloud) static analysis. Analysis scope + exclusions
5+
# live in sonar-project.properties. Requires the SONAR_TOKEN repository secret
6+
# (Settings -> Secrets and variables -> Actions).
7+
name: SonarCloud
8+
on:
9+
push:
10+
branches:
11+
- main
12+
pull_request:
13+
types: [opened, synchronize, reopened]
14+
permissions:
15+
contents: read
16+
jobs:
17+
sonarqube:
18+
name: SonarQube
19+
runs-on: ubuntu-latest
20+
env:
21+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
22+
steps:
23+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
24+
with:
25+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
26+
# Skips cleanly (job stays green) until the SONAR_TOKEN secret is added;
27+
# analysis activates automatically once the token is present.
28+
- name: SonarQube Scan
29+
if: env.SONAR_TOKEN != ''
30+
uses: SonarSource/sonarqube-scan-action@7006c4492b2e0ee0f816d36501671557c97f5995 # v8.1.0

EXPLAINME.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// SPDX-License-Identifier: CC-BY-SA-4.0
22
// Copyright (c) 2026 Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
33
= [quantum (sic)] DNS Fluctuator — Show Me The Receipts
4+
5+
image:https://sonarcloud.io/api/project_badges/quality_gate?project=hyperpolymath_resource-record-fluctuator[Quality gate,link=https://sonarcloud.io/summary/new_code?id=hyperpolymath_resource-record-fluctuator]
46
:toc:
57
:icons: font
68
:author: Jonathan D.A. Jewell

README.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
= [quantum (sic)] DNS Fluctuator
22

33
image:https://img.shields.io/badge/license-PMPL--1.0-blue.svg[License,link="https://github.com/hyperpolymath/palimpsest-license"]
4+
image:https://sonarcloud.io/api/project_badges/quality_gate?project=hyperpolymath_resource-record-fluctuator[Quality gate,link=https://sonarcloud.io/summary/new_code?id=hyperpolymath_resource-record-fluctuator]
45

56
// SPDX-License-Identifier: CC-BY-SA-4.0
67
// SPDX-FileCopyrightText: 2025 Jonathan D.A. Jewell

sonar-project.properties

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# SPDX-License-Identifier: MPL-2.0
2+
# SonarQube Cloud (SonarCloud) configuration.
3+
# Project: https://sonarcloud.io/project/overview?id=hyperpolymath_resource-record-fluctuator
4+
sonar.organization=hyperpolymath
5+
sonar.projectKey=hyperpolymath_resource-record-fluctuator
6+
7+
# Estate-default analysable surface. Vendored, generated, build, proof, and
8+
# dependency trees are excluded so findings stay signal-rich. SonarCloud
9+
# silently ignores patterns that match nothing in a given repo.
10+
sonar.exclusions=**/node_modules/**,**/build/**,**/dist/**,**/_build/**,**/deps/**,**/target/**,**/vendor/**,**/generated/**,**/.lake/**,external_corpora/**,proofs/**,verification/**,**/*.idr,**/*.zig,**/*.agda,**/*.lean,**/*.lagda
11+
sonar.coverage.exclusions=**/*test*,**/tests/**,**/*.spec.*

0 commit comments

Comments
 (0)