Skip to content

Commit b9fedec

Browse files
committed
Integrate SonarCloud
Signed-off-by: Ry Jones <[email protected]>
1 parent cbd7006 commit b9fedec

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

.github/workflows/sonar.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Sonar Cloud
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
types: [opened, synchronize, reopened]
8+
jobs:
9+
sonarcloud:
10+
name: SonarCloud
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
with:
15+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
16+
- name: SonarCloud Scan
17+
uses: SonarSource/sonarcloud-github-action@master
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
20+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

sonar-project.properties

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#
2+
# SPDX-License-Identifier: Apache-2.0
3+
#
4+
5+
sonar.projectKey=hyperledger-labs_blockchain-explorer
6+
sonar.organization=hyperledger-labs
7+
8+
# Path to sources
9+
sonar.sources=.
10+
sonar.exclusions=**/e2e-test/**,**/test/**,docs/**/*,devenv/**/*,client/**/*.spec.js
11+
#sonar.inclusions=
12+
13+
# Path to tests
14+
#sonar.tests=
15+
#sonar.test.exclusions=
16+
#sonar.test.inclusions=
17+
18+
# Source encoding
19+
#sonar.sourceEncoding=UTF-8
20+
21+
# Exclusions for copy-paste detection
22+
#sonar.cpd.exclusions=
23+
24+
# This is the name and version displayed in the SonarCloud UI.
25+
#sonar.projectName=blockchain-explorer
26+
#sonar.projectVersion=1.0

0 commit comments

Comments
 (0)