Skip to content

Commit 992e1e8

Browse files
[PRMP-1416] Add SonarCloud configuration (#237)
1 parent d4b9848 commit 992e1e8

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: SonarCloud-Analysis
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
types: [opened, synchronize, reopened]
8+
permissions:
9+
contents: read
10+
pull-requests: write
11+
12+
jobs:
13+
sonarqube:
14+
name: SonarQube
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
20+
- name: SonarQube Scan
21+
uses: SonarSource/sonarqube-scan-action@v4
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
24+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

sonar-project.properties

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
sonar.projectKey=prm-repository_infrastructure
2+
sonar.organization=prm-repository
3+
4+
# This is the name and version displayed in the SonarCloud UI.
5+
sonar.projectName=Repository-Infrastructure
6+
sonar.projectVersion=1.0
7+
8+
9+
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
10+
sonar.sources=infrastructure/
11+
12+
# Encoding of the source code. Default is default system encoding
13+
#sonar.sourceEncoding=UTF-8

0 commit comments

Comments
 (0)