Skip to content

CLP-265 Test ruling diff action - #5888

Draft
romainbrenguier wants to merge 2 commits into
masterfrom
romain/test-ruling-diff-action
Draft

CLP-265 Test ruling diff action#5888
romainbrenguier wants to merge 2 commits into
masterfrom
romain/test-ruling-diff-action

Conversation

@romainbrenguier

@romainbrenguier romainbrenguier commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Part of


Summary by Gitar

  • Tests:
    • Updated expected ruling JSON test files for various projects
  • CI/CD:
    • Switched workflow action reference in .github/workflows/ruling-diff-comment.yml to use branch version

This will update automatically on new commits.

@romainbrenguier
romainbrenguier force-pushed the romain/test-ruling-diff-action branch from 560fd52 to 9fbefad Compare August 5, 2026 13:05
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Ruling Diff Summary

Detected changes in 10 rule files: 14 issues removed, 10 issues added.

S103 (java) on commons-beanutils - 2 issues removed, 1 issues added

Removed src/main/java/org/apache/commons/beanutils2/BeanPropertyValueEqualsPredicate.java (line 164)

       159 |      * @param propertyValue The value to use in object evaluation.
       160 |      * @param ignoreNull Determines whether <code>null</code> objects in the property path will
       161 |      * genenerate an <code>IllegalArgumentException</code> or not.
       162 |      * @throws IllegalArgumentException If the property name provided is null or empty.
       163 |      */
>>>    164 |     public BeanPropertyValueEqualsPredicate(final String propertyName, final Object propertyValue, final boolean ignoreNull) {
       165 |         super();
       166 | 
       167 |         if (propertyName != null && propertyName.length() > 0) {
       168 |             this.propertyName = propertyName;
       169 |             this.propertyValue = propertyValue;

Removed src/main/java/org/apache/commons/beanutils2/RowSetDynaClass.java (line 236)

       231 |      *  is <code>null</code>
       232 |      * @throws SQLException if the metadata for this result set
       233 |      *  cannot be introspected
       234 |      * @since 1.8.3
       235 |      */
>>>    236 |     public RowSetDynaClass(final ResultSet resultSet, final boolean lowerCase, final int limit, final boolean useColumnLabel)
       237 |                                                             throws SQLException {
       238 | 
       239 |         if (resultSet == null) {
       240 |             throw new NullPointerException();
       241 |         }

Added src/main/java/org/apache/commons/beanutils2/RowSetDynaClass.java (line 238)

       233 |      *  cannot be introspected
       234 |      * @since 1.8.3
       235 |      */
       236 |     public RowSetDynaClass(final ResultSet resultSet, final boolean lowerCase, final int limit, final boolean useColumnLabel)
       237 |                                                             throws SQLException {
>>>    238 | 
       239 |         if (resultSet == null) {
       240 |             throw new NullPointerException();
       241 |         }
       242 |         this.lowerCase = lowerCase;
       243 |         this.limit = limit;
S100 (java) on eclipse-jetty - 1 issues removed, 1 issues added

Removed jetty-util/src/main/java/org/eclipse/jetty/util/security/UnixCrypt.java (line 395)

(source file not found at this revision: jetty-util/src/main/java/org/eclipse/jetty/util/security/UnixCrypt.java)

Added jetty-util/src/main/java/org/eclipse/jetty/util/security/UnixCrypt.java (line 397)

(source file not found at this revision: jetty-util/src/main/java/org/eclipse/jetty/util/security/UnixCrypt.java)
S103 (java) on eclipse-jetty-similar-to-main - 1 issues removed, 1 issues added

Removed jetty-http/src/main/java/org/eclipse/jetty/http/CookieCutter.java (line 197)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/CookieCutter.java)

Added jetty-http/src/main/java/org/eclipse/jetty/http/CookieCutter.java (line 199)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/CookieCutter.java)
S103 (java) on eclipse-jetty-similar-to-main-small - 1 issues removed, 1 issues added

Removed jetty-http/src/main/java/org/eclipse/jetty/http/pathmap/AbstractPathSpec.java (line 64)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/pathmap/AbstractPathSpec.java)

Added jetty-http/src/main/java/org/eclipse/jetty/http/pathmap/AbstractPathSpec.java (line 66)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/pathmap/AbstractPathSpec.java)
S100 (java) on guava - 1 issues removed, 1 issues added

Removed src/com/google/common/hash/Hashing.java (line 113)

       108 |    * 32-bit murmur3 algorithm, x86 variant</a> (little-endian variant),
       109 |    * using a seed value of zero.
       110 |    *
       111 |    * <p>The exact C++ equivalent is the MurmurHash3_x86_32 function (Murmur3A).
       112 |    */
>>>    113 |   public static HashFunction murmur3_32() {
       114 |     return Murmur3_32Holder.MURMUR3_32;
       115 |   }
       116 | 
       117 |   private static class Murmur3_32Holder {
       118 |     static final HashFunction MURMUR3_32 = new Murmur3_32HashFunction(0);

Added src/com/google/common/hash/Hashing.java (line 115)

       110 |    *
       111 |    * <p>The exact C++ equivalent is the MurmurHash3_x86_32 function (Murmur3A).
       112 |    */
       113 |   public static HashFunction murmur3_32() {
       114 |     return Murmur3_32Holder.MURMUR3_32;
>>>    115 |   }
       116 | 
       117 |   private static class Murmur3_32Holder {
       118 |     static final HashFunction MURMUR3_32 = new Murmur3_32HashFunction(0);
       119 | 
       120 |     /** Returned by {@link #goodFastHash} when {@code minimumBits <= 32}. */
S103 (java) on jboss-ejb3-tutorial - 4 issues removed, 1 issues added

Removed blob/src/org/jboss/tutorial/blob/bean/LobTesterBean.java (line 68)

        63 |       {
        64 |          throw new RuntimeException(e);
        65 |       }
        66 | 
        67 | 
>>>     68 |       String clobby = "This is a very long string that will be stored in a java.sql.Clob hopefully.  We'll see how this works and if it will work" +
        69 |       "This is a very long string that will be stored in a java.sql.Clob hopefully.  We'll see how this works and if it will work" +
        70 |       "This is a very long string that will be stored in a java.sql.Clob hopefully.  We'll see how this works and if it will work" +
        71 |       "This is a very long string that will be stored in a java.sql.Clob hopefully.  We'll see how this works and if it will work" +
        72 |       "This is a very long string that will be stored in a java.sql.Clob hopefully.  We'll see how this works and if it will work" +
        73 |       "This is a very long string that will be stored in a java.sql.Clob hopefully.  We'll see how this works and if it will work" +

Removed blob/src/org/jboss/tutorial/blob/bean/LobTesterBean.java (line 70)

        65 |       }
        66 | 
        67 | 
        68 |       String clobby = "This is a very long string that will be stored in a java.sql.Clob hopefully.  We'll see how this works and if it will work" +
        69 |       "This is a very long string that will be stored in a java.sql.Clob hopefully.  We'll see how this works and if it will work" +
>>>     70 |       "This is a very long string that will be stored in a java.sql.Clob hopefully.  We'll see how this works and if it will work" +
        71 |       "This is a very long string that will be stored in a java.sql.Clob hopefully.  We'll see how this works and if it will work" +
        72 |       "This is a very long string that will be stored in a java.sql.Clob hopefully.  We'll see how this works and if it will work" +
        73 |       "This is a very long string that will be stored in a java.sql.Clob hopefully.  We'll see how this works and if it will work" +
        74 |       "This is a very long string that will be stored in a java.sql.Clob hopefully.  We'll see how this works and if it will work" +
        75 |       "This is a very long string that will be stored in a java.sql.Clob hopefully.  We'll see how this works and if it will work" +

Removed blob/src/org/jboss/tutorial/blob/bean/LobTesterBean.java (line 71)

        66 | 
        67 | 
        68 |       String clobby = "This is a very long string that will be stored in a java.sql.Clob hopefully.  We'll see how this works and if it will work" +
        69 |       "This is a very long string that will be stored in a java.sql.Clob hopefully.  We'll see how this works and if it will work" +
        70 |       "This is a very long string that will be stored in a java.sql.Clob hopefully.  We'll see how this works and if it will work" +
>>>     71 |       "This is a very long string that will be stored in a java.sql.Clob hopefully.  We'll see how this works and if it will work" +
        72 |       "This is a very long string that will be stored in a java.sql.Clob hopefully.  We'll see how this works and if it will work" +
        73 |       "This is a very long string that will be stored in a java.sql.Clob hopefully.  We'll see how this works and if it will work" +
        74 |       "This is a very long string that will be stored in a java.sql.Clob hopefully.  We'll see how this works and if it will work" +
        75 |       "This is a very long string that will be stored in a java.sql.Clob hopefully.  We'll see how this works and if it will work" +
        76 |       "This is a very long string that will be stored in a java.sql.Clob hopefully.  We'll see how this works and if it will work" +

Added blob/src/org/jboss/tutorial/blob/bean/LobTesterBean.java (line 66)

        61 |       }
        62 |       catch (IOException e)
        63 |       {
        64 |          throw new RuntimeException(e);
        65 |       }
>>>     66 | 
        67 | 
        68 |       String clobby = "This is a very long string that will be stored in a java.sql.Clob hopefully.  We'll see how this works and if it will work" +
        69 |       "This is a very long string that will be stored in a java.sql.Clob hopefully.  We'll see how this works and if it will work" +
        70 |       "This is a very long string that will be stored in a java.sql.Clob hopefully.  We'll see how this works and if it will work" +
        71 |       "This is a very long string that will be stored in a java.sql.Clob hopefully.  We'll see how this works and if it will work" +
S103 (java) on mall - 1 issues removed, 1 issues added

Removed mall-admin/src/main/java/com/macro/mall/config/MallSecurityConfig.java (line 43)

        38 |             @Override
        39 |             public Map<String, ConfigAttribute> loadDataSource() {
        40 |                 Map<String, ConfigAttribute> map = new ConcurrentHashMap<>();
        41 |                 List<UmsResource> resourceList = resourceService.listAll();
        42 |                 for (UmsResource resource : resourceList) {
>>>     43 |                     map.put(resource.getUrl(), new org.springframework.security.access.SecurityConfig(resource.getId() + ":" + resource.getName()));
        44 |                 }
        45 |                 return map;
        46 |             }
        47 |         };
        48 |     }

Added mall-admin/src/main/java/com/macro/mall/config/MallSecurityConfig.java (line 45)

        40 |                 Map<String, ConfigAttribute> map = new ConcurrentHashMap<>();
        41 |                 List<UmsResource> resourceList = resourceService.listAll();
        42 |                 for (UmsResource resource : resourceList) {
        43 |                     map.put(resource.getUrl(), new org.springframework.security.access.SecurityConfig(resource.getId() + ":" + resource.getName()));
        44 |                 }
>>>     45 |                 return map;
        46 |             }
        47 |         };
        48 |     }
        49 | }
S1135 (java) on regex-examples - 1 issues removed, 1 issues added

Removed src/main/java/org/regex/examples/RegexDatabase5.java (line 1234)

      1229 |     Pattern.compile("^java", Pattern.CASE_INSENSITIVE|Pattern.MULTILINE),
      1230 |     // https://github.com/pavan0169/myplacementscodes/blob/e82974090a96948e6266d0663748687cc6340d88/Practice2/regexexample/Example1.java#L11
      1231 |     Pattern.compile("^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$"),
      1232 |     // https://github.com/wangh0911/JavaReflection/blob/bfc1b1a5c192acf7b8a1fa79878827ac4eb8c632/src/main/java/com/javaguides/reflection/arrays/ArrayCreator.java#L13
      1233 |     Pattern.compile("^\\s*(\\S+)\\s*\\w+\\[\\].*\\{\\s*([^}]+)\\s*\\}"),
>>>   1234 |     // https://github.com/self-xdsd/todo-finder-cli/blob/187f0f7599b3c77cedf8a6d73c94105c91c45152/src/main/java/com/selfxdsd/todocli/TodoParser.java#L68
      1235 |     Pattern.compile("(\\s*[*])(\\s\\s)(.*)"),
      1236 |     // https://github.com/self-xdsd/todo-finder-cli/blob/187f0f7599b3c77cedf8a6d73c94105c91c45152/src/main/java/com/selfxdsd/todocli/TodoParser.java#L94
      1237 |     Pattern.compile("#\\d+:\\d+(m|min|mins)\\b"),
      1238 |     // https://github.com/self-xdsd/todo-finder-cli/blob/187f0f7599b3c77cedf8a6d73c94105c91c45152/src/main/java/com/selfxdsd/todocli/TodoParser.java#L174
      1239 |     Pattern.compile("[A-Za-z]+"),

Added src/main/java/org/regex/examples/RegexDatabase5.java (line 1232)

      1227 |     Pattern.compile("!!"),
      1228 |     // https://github.com/Miles-Hu/tij/blob/3455f751bf6ba893904950329237b7cd0a02bd21/strings/ReFlags.java#L6
      1229 |     Pattern.compile("^java", Pattern.CASE_INSENSITIVE|Pattern.MULTILINE),
      1230 |     // https://github.com/pavan0169/myplacementscodes/blob/e82974090a96948e6266d0663748687cc6340d88/Practice2/regexexample/Example1.java#L11
      1231 |     Pattern.compile("^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$"),
>>>   1232 |     // https://github.com/wangh0911/JavaReflection/blob/bfc1b1a5c192acf7b8a1fa79878827ac4eb8c632/src/main/java/com/javaguides/reflection/arrays/ArrayCreator.java#L13
      1233 |     Pattern.compile("^\\s*(\\S+)\\s*\\w+\\[\\].*\\{\\s*([^}]+)\\s*\\}"),
      1234 |     // https://github.com/self-xdsd/todo-finder-cli/blob/187f0f7599b3c77cedf8a6d73c94105c91c45152/src/main/java/com/selfxdsd/todocli/TodoParser.java#L68
      1235 |     Pattern.compile("(\\s*[*])(\\s\\s)(.*)"),
      1236 |     // https://github.com/self-xdsd/todo-finder-cli/blob/187f0f7599b3c77cedf8a6d73c94105c91c45152/src/main/java/com/selfxdsd/todocli/TodoParser.java#L94
      1237 |     Pattern.compile("#\\d+:\\d+(m|min|mins)\\b"),
S107 (java) on sonar-server - 1 issues removed, 1 issues added

Removed src/main/java/org/sonar/server/issue/IssueQueryFactory.java (line 205)

(source file not found at this revision: src/main/java/org/sonar/server/issue/IssueQueryFactory.java)

Added src/main/java/org/sonar/server/issue/IssueQueryFactory.java (line 207)

(source file not found at this revision: src/main/java/org/sonar/server/issue/IssueQueryFactory.java)
S1120 (java) on vibebot - 1 issues removed, 1 issues added

Removed src/main/java/org/vibebot/App.java (line 10)

(source file not found at this revision: src/main/java/org/vibebot/App.java)

Added src/main/java/org/vibebot/App.java (line 9)

(source file not found at this revision: src/main/java/org/vibebot/App.java)

@romainbrenguier
romainbrenguier force-pushed the romain/test-ruling-diff-action branch from 9fbefad to 9179be1 Compare August 5, 2026 13:06
@sonarqube-next

sonarqube-next Bot commented Aug 5, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Ruling needs updating. A fix PR has been created: #5889

Please review and merge it into your branch.

@gitar-bot

gitar-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown
CI failed: Integration test failures across multiple modules (guava, jboss_ejb3_tutorial, apache_commons_beanutils, eclipse_jetty_incremental, spring_mall, regex_examples) caused by differences between expected rule outcomes and actual analysis results.

Overview

All analyzed CI job failures stem from test expectation mismatches in JavaRulingTest where actual analysis results differ from expected rule outcomes (rulings) across several test projects. These are directly related to the changes introduced in the pull request regarding test ruling diff expectations.

Failures

JavaRulingTest Mismatches (confidence: high)

  • Type: test
  • Affected jobs: 92315835310, 92315835359, 92315835273
  • Related to change: yes
  • Root cause: The pull request introduced changes to expected rulings, causing integration tests (guava, jboss_ejb3_tutorial, apache_commons_beanutils, eclipse_jetty_incremental, spring_mall, and regex_examples) to fail due to mismatches between expected and actual analysis issues.
  • Suggested fix: Review the generated diff report artifacts (diff_* html reports) to verify the analysis differences, and update the expected ruling JSON files under its/ruling/src/test/resources/ if the new rulings are correct.

Summary

  • Change-related failures: 3 job failures due to test ruling mismatches between expected JSON definitions and actual analyzer output.
  • Infrastructure/flaky failures: 0 failures.
  • Recommended action: Inspect the uploaded diff report artifacts from the CI run and update the expected test ruling files in the repository to match the new analysis output.
Code Review ✅ Approved

Updates expected ruling test JSON files and switches the workflow action reference to use the branch version for testing the diff action. No issues found.

Tip

Comment Gitar fix CI or enable auto-apply: gitar auto-apply:on

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant