From 1fe5fb47799813e10a04fa5faf44731fb5f86fbc Mon Sep 17 00:00:00 2001 From: DJ Date: Mon, 30 Mar 2026 19:48:37 -0700 Subject: [PATCH 1/3] ci: add SonarCloud continuous inspection Add SonarCloud configuration and GitHub Actions workflow for automated code quality analysis on pushes to main and pull requests. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/sonarcloud.yml | 25 +++++++++++++++++++++++++ sonar-project.properties | 6 ++++++ 2 files changed, 31 insertions(+) create mode 100644 .github/workflows/sonarcloud.yml create mode 100644 sonar-project.properties diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml new file mode 100644 index 0000000..79839f7 --- /dev/null +++ b/.github/workflows/sonarcloud.yml @@ -0,0 +1,25 @@ +name: SonarCloud + +on: + push: + branches: [main] + pull_request: + types: [opened, synchronize, reopened] + +permissions: + contents: read + +jobs: + sonarcloud: + name: SonarCloud Analysis + runs-on: ubuntu-24.04 + steps: + - name: Checkout + uses: actions/checkout@v5 + with: + fetch-depth: 0 + + - name: SonarCloud Scan + uses: SonarSource/sonarqube-scan-action@v5 + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..9cfe8a1 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,6 @@ +sonar.projectKey=oneirosoft_dagger +sonar.organization=oneirosoft +sonar.sources=src +sonar.tests=tests +sonar.sourceEncoding=UTF-8 +sonar.exclusions=**/test_support.rs From 6e95aeff2abd3aa6fcdbf71e8da19a17603a2273 Mon Sep 17 00:00:00 2001 From: DJ Date: Mon, 30 Mar 2026 20:09:26 -0700 Subject: [PATCH 2/3] fix: align SonarCloud config with petry-projects org standards Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/sonarcloud.yml | 27 ++++++++++++++------------- sonar-project.properties | 3 ++- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 79839f7..fa1480e 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -1,25 +1,26 @@ -name: SonarCloud +name: SonarCloud Analysis + +permissions: {} on: push: branches: [main] pull_request: - types: [opened, synchronize, reopened] - -permissions: - contents: read + branches: [main] jobs: sonarcloud: - name: SonarCloud Analysis - runs-on: ubuntu-24.04 + name: SonarCloud + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: read + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} steps: - - name: Checkout - uses: actions/checkout@v5 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: fetch-depth: 0 - - name: SonarCloud Scan - uses: SonarSource/sonarqube-scan-action@v5 - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + if: ${{ env.SONAR_TOKEN != '' }} + uses: SonarSource/sonarqube-scan-action@fd88b7d7ccbaefd23d8f36f73b59db7a3d246602 # v6 diff --git a/sonar-project.properties b/sonar-project.properties index 9cfe8a1..8e274b3 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,6 +1,7 @@ sonar.projectKey=oneirosoft_dagger sonar.organization=oneirosoft +sonar.projectName=dagger sonar.sources=src sonar.tests=tests sonar.sourceEncoding=UTF-8 -sonar.exclusions=**/test_support.rs +sonar.exclusions=**/test_support.rs,.claude/** From 4e2a983886aff4ef1632d7bb11487f7a341e7d13 Mon Sep 17 00:00:00 2001 From: DJ Date: Mon, 30 Mar 2026 20:13:09 -0700 Subject: [PATCH 3/3] fix: remove sonar.tests and address fork PR concerns Co-Authored-By: Claude Opus 4.6 (1M context) --- sonar-project.properties | 1 - 1 file changed, 1 deletion(-) diff --git a/sonar-project.properties b/sonar-project.properties index 8e274b3..a0699d4 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -2,6 +2,5 @@ sonar.projectKey=oneirosoft_dagger sonar.organization=oneirosoft sonar.projectName=dagger sonar.sources=src -sonar.tests=tests sonar.sourceEncoding=UTF-8 sonar.exclusions=**/test_support.rs,.claude/**