Skip to content

Commit 2ebf335

Browse files
authored
Try SonarCloud (#2330)
1 parent 45f1991 commit 2ebf335

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

.github/workflows/static_analysis.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,16 @@ jobs:
5151

5252
- name: Generate Docs
5353
run: "yarn run gendoc"
54+
55+
sonarqube:
56+
name: SonarQube
57+
runs-on: ubuntu-latest
58+
steps:
59+
- uses: actions/checkout@v2
60+
with:
61+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
62+
- name: SonarCloud Scan
63+
uses: SonarSource/sonarcloud-github-action@master
64+
env:
65+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
66+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

sonar-project.properties

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
sonar.projectKey=matrix-js-sdk
2+
sonar.organization=matrix-org
3+
4+
# This is the name and version displayed in the SonarCloud UI.
5+
#sonar.projectName=matrix-js-sdk
6+
#sonar.projectVersion=1.0
7+
8+
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
9+
#sonar.sources=.
10+
11+
# Encoding of the source code. Default is default system encoding
12+
#sonar.sourceEncoding=UTF-8
13+
14+
sonar.sources=src
15+
sonar.tests=spec
16+
sonar.exclusions=docs,examples,git-hooks

0 commit comments

Comments
 (0)