Skip to content

Commit 04c0448

Browse files
committed
feat: sonarcloud
Adding static analysis with sonarcloud
1 parent 842cd97 commit 04c0448

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

.github/workflows/sonarcloud.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+
- 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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
sonar.projectKey=Lowcoder-Community_openblocks
2+
sonar.organization=lowcoder-community
3+
4+
# This is the name and version displayed in the SonarCloud UI.
5+
#sonar.projectName=openblocks
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

0 commit comments

Comments
 (0)