Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-49639

Sonar Gerrit plugin not posting comments when changedLinesOnly == true

      I'm using Sonar Gerrit plugin for Jenkins and it works fine in its default mode (changedLinesOnly == false, isNew == false).

      However, when I'm enabling changedLinesOnly == true, all issues vanish, even those that were added in the Gerrit patch (e.g. unused variable).

      Is this a bug, or perhaps I'm missing something?

      Components versions:

      Jenkins: 2.95

      Gerrit: 2.13.4

      Sonar-Gerrit: 2.1

      Thanks.

      The issue was originally raised on StackOveflow: https://stackoverflow.com/questions/48829322/sonar-gerrit-plugin-not-posting-comments-when-changedlinesonly-true

          [JENKINS-49639] Sonar Gerrit plugin not posting comments when changedLinesOnly == true

          Anyone?

          Maxim Ostapenko added a comment - Anyone?

          Tatiana Didik added a comment -

          Hi Maxim. You can e-mail developers (me) directly using the e-mail provided on the plugin wiki page. To help you with troubleshooting I need 1) your pipeline code or screenshot of your plugin settings; 2) name of the file with an issue ignored; 3) lines from your sonar-report file regarding this issue.

          Tatiana Didik added a comment - Hi Maxim. You can e-mail developers (me) directly using the e-mail provided on the plugin wiki page. To help you with troubleshooting I need 1) your pipeline code or screenshot of your plugin settings; 2) name of the file with an issue ignored; 3) lines from your sonar-report file regarding this issue.

          Tatiana Didik added a comment -

          ByChangedLinesPredicate works incorrectly when specified sub-project path.
          Needs to be checked and fixed for auto-match functionality as well.

          Tatiana Didik added a comment - ByChangedLinesPredicate works incorrectly when specified sub-project path. Needs to be checked and fixed for auto-match functionality as well.

          Code changed in jenkins
          User: Tatiana Didik
          Path:
          src/main/java/org/jenkinsci/plugins/sonargerrit/config/AuthenticationConfig.java
          src/main/java/org/jenkinsci/plugins/sonargerrit/filter/predicates/ByChangedLinesPredicate.java
          src/test/java/org/jenkinsci/plugins/sonargerrit/config/NullValuesTest.java
          src/test/java/org/jenkinsci/plugins/sonargerrit/inspection/sonarqube/ChangedFilesTest.java
          src/test/java/org/jenkinsci/plugins/sonargerrit/inspection/sonarqube/CustomProjectPathAndFilePredicateMatchTest.java
          src/test/java/org/jenkinsci/plugins/sonargerrit/inspection/sonarqube/ProjectPathToGerritChangedLinesMatchTest.java
          src/test/java/org/jenkinsci/plugins/sonargerrit/inspection/sonarqube/ProjectPathToGerritFilenameMatchTest.java
          http://jenkins-ci.org/commit/sonar-gerrit-plugin/be36d7871d41dfdaea987d5218aaa662a0fb1f06
          Log:
          JENKINS-49639 No issues remain in case when specified a project path and only changed lines are expected to be commented

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Tatiana Didik Path: src/main/java/org/jenkinsci/plugins/sonargerrit/config/AuthenticationConfig.java src/main/java/org/jenkinsci/plugins/sonargerrit/filter/predicates/ByChangedLinesPredicate.java src/test/java/org/jenkinsci/plugins/sonargerrit/config/NullValuesTest.java src/test/java/org/jenkinsci/plugins/sonargerrit/inspection/sonarqube/ChangedFilesTest.java src/test/java/org/jenkinsci/plugins/sonargerrit/inspection/sonarqube/CustomProjectPathAndFilePredicateMatchTest.java src/test/java/org/jenkinsci/plugins/sonargerrit/inspection/sonarqube/ProjectPathToGerritChangedLinesMatchTest.java src/test/java/org/jenkinsci/plugins/sonargerrit/inspection/sonarqube/ProjectPathToGerritFilenameMatchTest.java http://jenkins-ci.org/commit/sonar-gerrit-plugin/be36d7871d41dfdaea987d5218aaa662a0fb1f06 Log: JENKINS-49639 No issues remain in case when specified a project path and only changed lines are expected to be commented

          Tatiana Didik added a comment -

          v. 2.3

          Tatiana Didik added a comment - v. 2.3

            aquarellian Tatiana Didik
            chefmax Maxim Ostapenko
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: