From bf71fb079d20a9786448366decf953e70aff7b4a Mon Sep 17 00:00:00 2001 From: LCSOGthb <185141600+LCSOGthb@users.noreply.github.com> Date: Mon, 6 Jan 2025 17:19:47 +0800 Subject: [PATCH 1/2] Create build.yml --- .github/workflows/build.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..8630482 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,20 @@ +name: Build +on: + push: + branches: + - main + pull_request: + types: [opened, synchronize, reopened] +jobs: + sonarqube: + name: SonarQube + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: SonarQube Scan + uses: SonarSource/sonarqube-scan-action@v4 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} From ae03292601a94e2792812114ddd21348aef29e76 Mon Sep 17 00:00:00 2001 From: LCSOGthb <185141600+LCSOGthb@users.noreply.github.com> Date: Mon, 6 Jan 2025 17:20:14 +0800 Subject: [PATCH 2/2] Create sonar-project.properties --- sonar-project.properties | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 sonar-project.properties diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..4dd0201 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,13 @@ +sonar.projectKey=LCSOGthb_center +sonar.organization=lcssonarqube1512 + +# This is the name and version displayed in the SonarCloud UI. +#sonar.projectName=Center +#sonar.projectVersion=1.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