Skip to content

Commit 9835e12

Browse files
Add SonarCloud configuration
1 parent 7365194 commit 9835e12

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

.github/workflows/build.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Build
2+
on:
3+
push:
4+
branches:
5+
- master
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@v2
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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# sonar.projectKey=python:plotly
2+
# sonar.projectName=python:plotly
3+
sonar.projectKey=nicolas-harraudeau-sonarsource_plotly.py
4+
sonar.organization=nicolas-harraudeau-sonarsource-g
5+
sonar.projectVersion=master
6+
sonar.links.scm=https://github.com/plotly/plotly.py
7+
8+
sonar.sources=.
9+
sonar.tests=.
10+
sonar.test.inclusions=test/**,packages/**/tests/**
11+
12+
# Disable duplication detection to speed up analysis. This should be removed in a real CI.
13+
sonar.cpd.exclusions=**/*

0 commit comments

Comments
 (0)