From 443fa60f98fa7bc8da80d784ce085b0faa48d216 Mon Sep 17 00:00:00 2001 From: okmoch_pure Date: Mon, 6 Nov 2023 10:59:44 +0100 Subject: [PATCH 1/6] Fix Sample project --- sample-project/R/bad.R | 2 -- sample-project/README.md | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/sample-project/R/bad.R b/sample-project/R/bad.R index 4814f75..c3c25f1 100644 --- a/sample-project/R/bad.R +++ b/sample-project/R/bad.R @@ -1,5 +1,3 @@ -library(dplyr) - T_and_F <- function() { F diff --git a/sample-project/README.md b/sample-project/README.md index 225ea6b..80dc770 100644 --- a/sample-project/README.md +++ b/sample-project/README.md @@ -8,6 +8,7 @@ A few hints for non-R developers to get environment for LintR up-and-running eas ```bash brew install r +brew install fribidi ``` Content for `~/.Rprofile`: From 0c51811740b005e90221594880094997de1af40f Mon Sep 17 00:00:00 2001 From: okmoch_pure Date: Mon, 6 Nov 2023 10:59:59 +0100 Subject: [PATCH 2/6] Update versions for local development --- sample-project/sonar-scanner-run.sh | 2 +- sonar-local.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sample-project/sonar-scanner-run.sh b/sample-project/sonar-scanner-run.sh index 570138e..78b1fb0 100755 --- a/sample-project/sonar-scanner-run.sh +++ b/sample-project/sonar-scanner-run.sh @@ -18,7 +18,7 @@ set -euo pipefail -SONAR_SCANNER_VERSION=4.7.0.2747 +SONAR_SCANNER_VERSION=5.0.1.3006 URL="https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${SONAR_SCANNER_VERSION}-macosx.zip" # Resolve where script is stored (symlinks too) diff --git a/sonar-local.sh b/sonar-local.sh index c47c4ea..f520b76 100755 --- a/sonar-local.sh +++ b/sonar-local.sh @@ -16,7 +16,7 @@ # limitations under the License. # ---------------------------------------------------------------------------- -SONAR_NAME=sonarqube-8.9.8.54436 +SONAR_NAME=sonarqube-9.9.2.77730 URL="https://binaries.sonarsource.com/Distribution/sonarqube/${SONAR_NAME}.zip" set -euo pipefail From 9c811026831f475885daaf202bbc15692ffd4dac Mon Sep 17 00:00:00 2001 From: okmoch_pure Date: Mon, 6 Nov 2023 11:00:14 +0100 Subject: [PATCH 3/6] Enable SonarCloud --- .github/workflows/ci.yaml | 16 +++++++++++++++- pom.xml | 10 ++++++---- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 010b809..ac74bbf 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -12,5 +12,19 @@ jobs: with: java-version: '17' distribution: 'temurin' + - name: Cache SonarCloud packages + uses: actions/cache@v3 + with: + path: ~/.sonar/cache + key: ${{ runner.os }}-sonar + restore-keys: ${{ runner.os }}-sonar + - name: Cache Maven packages + uses: actions/cache@v3 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 - name: Package with Maven - run: ./mvnw --batch-mode package + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + run: ./mvnw --batch-mode package org.sonarsource.scanner.maven:sonar-maven-plugin:sonar diff --git a/pom.xml b/pom.xml index dd55d0f..34a1b71 100644 --- a/pom.xml +++ b/pom.xml @@ -47,8 +47,10 @@ 3.0.0-M1 3.1.0 3.0.0-M6 - - 0.8.8 + 0.8.11 + + kmoco2am + https://sonarcloud.io src/main/java,src/main/js jacoco reuseReports @@ -180,7 +182,7 @@ 1.21.0.505 true - + kmoco2am_sonar-r-plugin com.msd.gin.common.sonar.SonarRPlugin @@ -195,7 +197,7 @@ + tofile="${project.basedir}/.sonar/sonarqube-9.9.2.77730/extensions/plugins/${project.artifactId}-${project.version}.jar"/> From 4420a3a66d519d8d9dd0ecdd148762821c164459 Mon Sep 17 00:00:00 2001 From: okmoch_pure Date: Mon, 6 Nov 2023 11:00:35 +0100 Subject: [PATCH 4/6] Enable caching for Maven --- .github/workflows/main.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 9dfba05..039265e 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -15,6 +15,12 @@ jobs: with: java-version: '17' distribution: 'temurin' + - name: Cache Maven packages + uses: actions/cache@v3 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 - name: Publish package run: mvn --batch-mode deploy env: From 84611196ed24832e563a0fe53ac1baf555e6b0b1 Mon Sep 17 00:00:00 2001 From: okmoch_pure Date: Mon, 6 Nov 2023 11:02:43 +0100 Subject: [PATCH 5/6] Remove wrong sources dir --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 34a1b71..f080384 100644 --- a/pom.xml +++ b/pom.xml @@ -51,7 +51,7 @@ kmoco2am https://sonarcloud.io - src/main/java,src/main/js + src/main/java jacoco reuseReports ${project.basedir}/target/jacoco.exec From 3443d54a6079c499d09e34b7aec1d49ded4e1daa Mon Sep 17 00:00:00 2001 From: okmoch_pure Date: Mon, 6 Nov 2023 11:05:51 +0100 Subject: [PATCH 6/6] Configure properly project key in SonarCloud --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f080384..5cd5644 100644 --- a/pom.xml +++ b/pom.xml @@ -51,6 +51,7 @@ kmoco2am https://sonarcloud.io + kmoco2am_sonar-r-plugin src/main/java jacoco reuseReports @@ -182,7 +183,6 @@ 1.21.0.505 true - kmoco2am_sonar-r-plugin com.msd.gin.common.sonar.SonarRPlugin