Skip to content

Commit 4a56f50

Browse files
authored
[maint] Enable Harness Sonar scan
Enable Sonarqube for the repo
1 parent c6f823f commit 4a56f50

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

.github/workflows/sonar_analysis.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Static Code Analysis
2+
on:
3+
push:
4+
branches:
5+
- master # or the name of your main branch
6+
pull_request:
7+
types: [opened, synchronize, reopened]
8+
jobs:
9+
build:
10+
name: Build
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
with:
15+
fetch-depth: 0
16+
- uses: sonarsource/sonarqube-scan-action@master
17+
env:
18+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
19+
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
20+
# If you wish to fail your job when the Quality Gate is red, uncomment the
21+
# following lines. This would typically be used to fail a deployment.
22+
# We do not recommend to use this in a pull request. Prefer using pull request
23+
# decoration instead.
24+
# - uses: sonarsource/sonarqube-quality-gate-action@master
25+
# timeout-minutes: 5
26+
# env:
27+
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

sonar-project.properties

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sonar.projectKey=harness_ff-golang-server-sdk_AYSkVwnLWr37sP7QAgtQ

0 commit comments

Comments
 (0)