diff --git a/.github/workflows/ruling-diff-comment.yml b/.github/workflows/ruling-diff-comment.yml index 3b41cea2367..75c1cbd8329 100644 --- a/.github/workflows/ruling-diff-comment.yml +++ b/.github/workflows/ruling-diff-comment.yml @@ -38,16 +38,22 @@ jobs: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: fetch-depth: 0 - submodules: true + submodules: recursive - name: Install uv uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2 with: enable-cache: true + - name: Setup source directory symlinks + run: | + cd its/sources + # Create symlink for sonar-server to match expected path structure + ln -s sonarqube-6.5/server/sonar-server sonar-server + # Use the action from the branch we just pushed - name: Post ruling diff comment - uses: SonarSource/core-languages-tooling-public/ruling-diff-comment@master + uses: SonarSource/core-languages-tooling-public/ruling-diff-comment@romain/read-sources-from-disk with: pr-number: ${{ inputs.pr-number || github.event.pull_request.number }} repository: ${{ github.repository }} diff --git a/its/ruling/src/test/resources/commons-beanutils/java-S112.json b/its/ruling/src/test/resources/commons-beanutils/java-S112.json index 87050aa821e..816a52c4dc8 100644 --- a/its/ruling/src/test/resources/commons-beanutils/java-S112.json +++ b/its/ruling/src/test/resources/commons-beanutils/java-S112.json @@ -1,6 +1,7 @@ { "commons-beanutils:commons-beanutils:src/main/java/org/apache/commons/beanutils2/BeanComparator.java": [ -169, +62, + 169, 172, 175 ], diff --git a/its/ruling/src/test/resources/eclipse-jetty-similar-to-main-small/java-S121.json b/its/ruling/src/test/resources/eclipse-jetty-similar-to-main-small/java-S121.json index f36df1a0983..d048a0e7a74 100644 --- a/its/ruling/src/test/resources/eclipse-jetty-similar-to-main-small/java-S121.json +++ b/its/ruling/src/test/resources/eclipse-jetty-similar-to-main-small/java-S121.json @@ -4,6 +4,7 @@ 35, 45, 47, -49 +49, + 60 ] } diff --git a/its/ruling/src/test/resources/eclipse-jetty-similar-to-main/java-S108.json b/its/ruling/src/test/resources/eclipse-jetty-similar-to-main/java-S108.json index 63254b09787..ee159af550f 100644 --- a/its/ruling/src/test/resources/eclipse-jetty-similar-to-main/java-S108.json +++ b/its/ruling/src/test/resources/eclipse-jetty-similar-to-main/java-S108.json @@ -7,6 +7,7 @@ 311 ], "org.eclipse.jetty:jetty-project:jetty-jmx/src/test/java/org/eclipse/jetty/jmx/MBeanContainerLifeCycleTest.java": [ -95 +60, + 95 ] } diff --git a/its/ruling/src/test/resources/eclipse-jetty/java-S139.json b/its/ruling/src/test/resources/eclipse-jetty/java-S139.json index c2df116cfb9..cf0594f376c 100644 --- a/its/ruling/src/test/resources/eclipse-jetty/java-S139.json +++ b/its/ruling/src/test/resources/eclipse-jetty/java-S139.json @@ -1,6 +1,7 @@ { "org.eclipse.jetty:jetty-project:jetty-http/src/main/java/org/eclipse/jetty/http/CookieCutter.java": [ -351, +61, + 351, 352 ], "org.eclipse.jetty:jetty-project:jetty-http/src/main/java/org/eclipse/jetty/http/HttpField.java": [ diff --git a/its/ruling/src/test/resources/guava/java-S103.json b/its/ruling/src/test/resources/guava/java-S103.json index 7dedbff84d2..ef45dddcda1 100644 --- a/its/ruling/src/test/resources/guava/java-S103.json +++ b/its/ruling/src/test/resources/guava/java-S103.json @@ -2,6 +2,7 @@ "com.google.guava:guava:src/com/google/thirdparty/publicsuffix/PublicSuffixPatterns.java": [ 45, 53, + 60, 62 ] } diff --git a/its/ruling/src/test/resources/jboss-ejb3-tutorial/java-S105.json b/its/ruling/src/test/resources/jboss-ejb3-tutorial/java-S105.json index bb3d0b49cd9..13168878328 100644 --- a/its/ruling/src/test/resources/jboss-ejb3-tutorial/java-S105.json +++ b/its/ruling/src/test/resources/jboss-ejb3-tutorial/java-S105.json @@ -1,5 +1,6 @@ { "jboss-ejb3-tutorial:cachedentity/src/org/jboss/tutorial/cachedentity/client/CachedEntityRun.java": [ -0 +0, + 60 ] } diff --git a/its/ruling/src/test/resources/mall/java-S106.json b/its/ruling/src/test/resources/mall/java-S106.json index 4bcb52fd659..7c8622f3de9 100644 --- a/its/ruling/src/test/resources/mall/java-S106.json +++ b/its/ruling/src/test/resources/mall/java-S106.json @@ -1,5 +1,6 @@ { "com.macro.mall:mall:mall-mbg/src/main/java/com/macro/mall/Generator.java": [ -35 +35, + 60 ] } diff --git a/its/ruling/src/test/resources/regex-examples/java-S1134.json b/its/ruling/src/test/resources/regex-examples/java-S1134.json index e692585a001..21cf0a880f6 100644 --- a/its/ruling/src/test/resources/regex-examples/java-S1134.json +++ b/its/ruling/src/test/resources/regex-examples/java-S1134.json @@ -1,5 +1,6 @@ { "org.regex-examples:regex-examples:src/main/java/org/regex/examples/RegexDatabase4.java": [ +60, 1984 ] } diff --git a/its/ruling/src/test/resources/sonar-server/java-S5838.json b/its/ruling/src/test/resources/sonar-server/java-S5838.json index 332d273e4c4..1b50f06c758 100644 --- a/its/ruling/src/test/resources/sonar-server/java-S5838.json +++ b/its/ruling/src/test/resources/sonar-server/java-S5838.json @@ -13,6 +13,7 @@ 146 ], "org.sonarsource.sonarqube:sonar-server:src/test/java/org/sonar/server/app/TomcatContextsTest.java": [ +60, 94, 129, 135 diff --git a/its/ruling/src/test/resources/sonar-server/java-S8924.json b/its/ruling/src/test/resources/sonar-server/java-S8924.json index 7998d026310..8f4738bdbc8 100644 --- a/its/ruling/src/test/resources/sonar-server/java-S8924.json +++ b/its/ruling/src/test/resources/sonar-server/java-S8924.json @@ -1,5 +1,6 @@ { "org.sonarsource.sonarqube:sonar-server:src/test/java/org/sonar/ce/log/CeLoggingTest.java": [ + 60, 64 ], "org.sonarsource.sonarqube:sonar-server:src/test/java/org/sonar/server/component/ws/TreeActionTest.java": [