From 3d481f53df085b081a15ee3cf74a110ecf55b3fd Mon Sep 17 00:00:00 2001 From: Lucas Ramos Date: Mon, 24 Aug 2026 17:05:28 +0200 Subject: [PATCH 1/5] Update sonar-project.properties to NiCE naming convention (AB#142804) --- sonar-project.properties | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 sonar-project.properties diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..d7618fe --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,24 @@ +sonar.projectKey=com.nice.cognigy-webchat-SocketClient +sonar.projectName=cognigy-webchat-SocketClient + +sonar.sources=. +sonar.sourceEncoding=UTF-8 + +sonar.exclusions=\ + **/node_modules/**,\ + **/dist/**,\ + **/build/**,\ + **/vendor/**,\ + **/coverage/**,\ + **/*.gen.go,\ + **/*.gen.ts + +sonar.test.inclusions=\ + **/*.test.ts,\ + **/*.spec.ts,\ + **/*_test.go,\ + **/__tests__/** + +# Coverage (enable once CI emits reports - see https://cognigy.atlassian.net/wiki/spaces/Engineering/pages/2559967260 #3): +# sonar.go.coverage.reportPaths=... +# sonar.javascript.lcov.reportPaths=... From 2298b8b0daee8fee3e5206761ff80f49b9eca332 Mon Sep 17 00:00:00 2001 From: Lucas Ramos Date: Mon, 24 Aug 2026 17:05:30 +0200 Subject: [PATCH 2/5] Update SonarQube workflow to NiCE convention (AB#142804) --- .github/workflows/sonarqube.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/sonarqube.yml diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml new file mode 100644 index 0000000..d70ff19 --- /dev/null +++ b/.github/workflows/sonarqube.yml @@ -0,0 +1,28 @@ +name: "CI | SocketClient Sonar" + +on: + push: + branches: [ main ] + pull_request: + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +jobs: + sonarqube: + name: "SocketClient - SonarQube Analysis" + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - uses: actions/checkout@v6 + with: + fetch-depth: 0 + - uses: SonarSource/sonarqube-scan-action@v7 + env: + SONAR_TOKEN: ${{ secrets.NICE_SONAR_TOKEN }} + SONAR_HOST_URL: ${{ vars.NICE_SONAR_HOST_URL }} From 69cc0447fa606b348ba4fefba31435a337478a4d Mon Sep 17 00:00:00 2001 From: Lucas Ramos Date: Tue, 25 Aug 2026 11:38:36 +0200 Subject: [PATCH 3/5] Correct team segment in projectKey to boron (AB#142804) --- sonar-project.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sonar-project.properties b/sonar-project.properties index d7618fe..3ef8b24 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,5 +1,5 @@ -sonar.projectKey=com.nice.cognigy-webchat-SocketClient -sonar.projectName=cognigy-webchat-SocketClient +sonar.projectKey=com.nice.cognigy-boron-SocketClient +sonar.projectName=cognigy-boron-SocketClient sonar.sources=. sonar.sourceEncoding=UTF-8 From 43050fac4c63a0add40a895c28d5063bc7b98c03 Mon Sep 17 00:00:00 2001 From: Lucas Ramos Date: Tue, 25 Aug 2026 12:27:03 +0200 Subject: [PATCH 4/5] Set sonar.tests so sonar.test.inclusions actually classifies test files (AB#142804) --- sonar-project.properties | 1 + 1 file changed, 1 insertion(+) diff --git a/sonar-project.properties b/sonar-project.properties index 3ef8b24..3346be8 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -2,6 +2,7 @@ sonar.projectKey=com.nice.cognigy-boron-SocketClient sonar.projectName=cognigy-boron-SocketClient sonar.sources=. +sonar.tests=. sonar.sourceEncoding=UTF-8 sonar.exclusions=\ From ee8b5a27e007307ecada8fde502afee190e3b369 Mon Sep 17 00:00:00 2001 From: Lucas Ramos Date: Tue, 25 Aug 2026 12:27:04 +0200 Subject: [PATCH 5/5] Skip Sonar scan on fork PRs, which never receive NICE_SONAR_TOKEN (AB#142804) --- .github/workflows/sonarqube.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml index d70ff19..2211470 100644 --- a/.github/workflows/sonarqube.yml +++ b/.github/workflows/sonarqube.yml @@ -23,6 +23,7 @@ jobs: with: fetch-depth: 0 - uses: SonarSource/sonarqube-scan-action@v7 + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository env: SONAR_TOKEN: ${{ secrets.NICE_SONAR_TOKEN }} SONAR_HOST_URL: ${{ vars.NICE_SONAR_HOST_URL }}