Skip to content

Commit

Permalink
Integrate SonarCloud
Browse files Browse the repository at this point in the history
Signed-off-by: Ry Jones <ry@linux.com>
  • Loading branch information
ryjones committed Jul 6, 2023
1 parent cbd7006 commit 5d06be3
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/sonar.yml
@@ -0,0 +1,20 @@
name: Sonar Cloud
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
26 changes: 26 additions & 0 deletions sonar-project.properties
@@ -0,0 +1,26 @@
#
# SPDX-License-Identifier: Apache-2.0
#

sonar.projectKey=hyperledger-labs_blockchain-explorer
sonar.organization=hyperledger-labs

# Path to sources
sonar.sources=.
sonar.exclusions=**/e2e-test/**,**/test/**,docs/**/*,devenv/**/*,client/**/*.spec.js
#sonar.inclusions=

# Path to tests
#sonar.tests=
#sonar.test.exclusions=
#sonar.test.inclusions=

# Source encoding
#sonar.sourceEncoding=UTF-8

# Exclusions for copy-paste detection
#sonar.cpd.exclusions=

# This is the name and version displayed in the SonarCloud UI.
#sonar.projectName=blockchain-explorer
#sonar.projectVersion=1.0

0 comments on commit 5d06be3

Please sign in to comment.