From 82c6537b2f37955ab174ffa4c82d2783056bd607 Mon Sep 17 00:00:00 2001 From: Danai Suwantanee <107535705+Danai6588102@users.noreply.github.com> Date: Tue, 25 Feb 2025 16:27:11 +0700 Subject: [PATCH 1/2] Create sonarcloud.yml --- .github/workflows/sonarcloud.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/sonarcloud.yml diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml new file mode 100644 index 0000000..7e51ac3 --- /dev/null +++ b/.github/workflows/sonarcloud.yml @@ -0,0 +1,19 @@ +name: SonarCloud workflow +on: + push: + branches: + - individual + 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: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} From 1390cba10e188b7ce8b71389100121db66dcf058 Mon Sep 17 00:00:00 2001 From: Danai Suwantanee <107535705+Danai6588102@users.noreply.github.com> Date: Tue, 25 Feb 2025 16:29:06 +0700 Subject: [PATCH 2/2] Create sonar-project.properties --- sonar-project.properties | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sonar-project.properties diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..1133977 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,6 @@ +sonar.projectKey=Danai6588102_IndividualAssignment +sonar.organization=danai6588102 +sonar.language=java +sonar.java.binaries=. +sonar.exclusions=**/*.java +sonar.coverage.exclusions=**/*.java