summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2025-10-25 13:54:10 +0700
committerhathach <[email protected]>2025-10-25 15:20:07 +0700
commit5818db49b2de8689a07007a5e4d329b94d67ef42 (patch)
treeda215d5da4283cf52aa684b5c73794060be0ef49
parent531009c9a02d719d3222c89dc9d31f5967e23af3 (diff)
add SonarQube scan
-rw-r--r--.github/workflows/static_analysis.yml5
-rw-r--r--sonar-project.properties14
2 files changed, 16 insertions, 3 deletions
diff --git a/.github/workflows/static_analysis.yml b/.github/workflows/static_analysis.yml
index e5254344b..45c5c959b 100644
--- a/.github/workflows/static_analysis.yml
+++ b/.github/workflows/static_analysis.yml
@@ -127,7 +127,7 @@ jobs:
- name: Upload SARIF
uses: github/codeql-action/upload-sarif@v4
with:
- sarif_file: pvs-${{ matrix.board }}.sarif
+ sarif_file: pvs-studio-${{ matrix.board }}.sarif
category: PVS-Studio
- name: Upload artifact
@@ -173,8 +173,7 @@ jobs:
uses: SonarSource/sonarqube-scan-action@v6
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- SONAR_ROOT_CERT: ${{ secrets.SONAR_ROOT_CERT }}
with:
# Consult https://docs.sonarsource.com/sonarqube-server/latest/analyzing-source-code/scanners/sonarscanner/ for more information and options
args: >
- --define sonar.cfamily.compile-commands="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
+ --define sonar.cfamily.compile-commands=${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json
diff --git a/sonar-project.properties b/sonar-project.properties
new file mode 100644
index 000000000..d797bfe6f
--- /dev/null
+++ b/sonar-project.properties
@@ -0,0 +1,14 @@
+sonar.projectKey=hathach_tinyusb
+sonar.organization=hathach
+
+
+# This is the name and version displayed in the SonarCloud UI.
+sonar.projectName=tinyusb
+sonar.projectVersion=0.19.0
+
+
+# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
+#sonar.sources=.
+
+# Encoding of the source code. Default is default system encoding
+#sonar.sourceEncoding=UTF-8