Skip to content

Commit 286d3b5

Browse files
committed
chore(sonar): add github action to scan code
1 parent 7012921 commit 286d3b5

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

.github/workflows/sonar-scan.yml

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

sonar-project.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
sonar.organization=react-native-datetimepicker
2+
sonar.projectKey=react-native-datetimepicker_datetimepicker
3+
sonar.sources=src
4+
sonar.sourceEncoding=UTF-8

0 commit comments

Comments
 (0)