Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# SonarCloud analysis for the community-health repository.
#
# Explicit rather than automatic. This repo holds no application source, so
# SonarCloud's automatic analysis finds no language it recognises and reports
# nothing — the project sits empty and the badge never resolves. A scan told
# where to look via sonar-project.properties produces a real result for the
# markdown and workflow files that are the substance here.
#
# The sibling repositories keep automatic analysis; only this one needs the
# workflow, because only this one has nothing for the detector to find.
name: sonar

on:
push:
branches: [main]
pull_request:

permissions:
contents: read

jobs:
sonar:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
# Sonar attributes new code to the commits that introduced it, and a
# shallow clone leaves it guessing.
fetch-depth: 0

- name: SonarCloud scan
uses: SonarSource/sonarqube-scan-action@22918119ff8e1ca75a623e15c8296b6ea4fbe28f # v8.2.1
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
15 changes: 15 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
sonar.projectKey=beatrax-app_.github
sonar.organization=beatrax

# A configuration repository: community-health files, issue templates and the
# workflows that carry them. There is no application source, so the scan has to
# be told what to look at — automatic analysis finds no recognised language here
# and reports nothing at all.
sonar.sources=.
sonar.exclusions=**/*.png,**/*.svg,.github/ISSUE_TEMPLATE/**

# No test tree. Declared empty rather than left unset so the scanner does not
# infer one and then report zero coverage against files that have no tests by
# design.
sonar.tests=
sonar.sourceEncoding=UTF-8
Loading