Skip to content

Commit 2bb40a1

Browse files
hyperpolymathclaude
andcommitted
ci(sonar): SonarCloud scan workflow + project config
Adds the SonarCloud setup-wizard workflow (SHA-pinned actions, build.yml) and sonar-project.properties (org hyperpolymath, key hyperpolymath_boj-server) with exclusions so only the analysable surface (the JS bridge + scripts) is scanned — Idris2/Zig/Elixir have no SonarCloud analyser, and vendored, generated, build, proof, and dependency trees are excluded. Requires the SONAR_TOKEN repo secret and the project imported on SonarCloud with CI-based analysis (Automatic Analysis disabled). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 750ba8f commit 2bb40a1

2 files changed

Lines changed: 39 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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. Generated from the SonarCloud
5+
# setup wizard; analysis scope + exclusions live in sonar-project.properties.
6+
# Requires the SONAR_TOKEN repository secret (Settings -> Secrets and variables
7+
# -> Actions). Project: https://sonarcloud.io/project/overview?id=hyperpolymath_boj-server
8+
name: Build
9+
on:
10+
push:
11+
branches:
12+
- main
13+
pull_request:
14+
types: [opened, synchronize, reopened]
15+
permissions:
16+
contents: read
17+
jobs:
18+
sonarqube:
19+
name: SonarQube
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
23+
with:
24+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
25+
- name: SonarQube Scan
26+
uses: SonarSource/sonarqube-scan-action@7006c4492b2e0ee0f816d36501671557c97f5995 # v8.1.0
27+
env:
28+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

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_boj-server
4+
sonar.organization=hyperpolymath
5+
sonar.projectKey=hyperpolymath_boj-server
6+
7+
# Analysable surface = the JS MCP bridge + shell scripts. Idris2 / Zig / Elixir
8+
# / AffineScript have no SonarCloud analyser; vendored, generated, build, proof,
9+
# and dependency trees are excluded to keep findings signal-rich.
10+
sonar.exclusions=cartridges/**,ffi/**,generated/**,build/**,**/node_modules/**,elixir/_build/**,elixir/deps/**,external_corpora/**,.lake/**,proofs/**,verification/**,**/*.idr,**/*.zig
11+
sonar.coverage.exclusions=mcp-bridge/tests/**,**/*test*

0 commit comments

Comments
 (0)