SonarQube Java
  1. SonarQube Java
  2. SONARJAVA-174

"comment_lines_data" wrongly computed for multi-line comments

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4
    • Component/s: Squid
    • Labels:
      None
    • Number of attachments :
      0

      Description

      In https://github.com/SonarSource/sonar-java/blob/master/java-squid/src/main/java/org/sonar/java/ast/visitors/FileLinesVisitor.java : for multi-line comments, only the line of the first token is counted.

      For instance:

      class foo {
        /*
         * This is a comment
         */
      }
      

      , will return "1=0,2=1,3=0,4=0,5=0".

        Issue Links

          Activity

          Hide
          Dinesh Bolkensteyn added a comment -

          Done

          Show
          Dinesh Bolkensteyn added a comment - Done
          Hide
          Fabrice Bellingard added a comment -

          Tested

          Show
          Fabrice Bellingard added a comment - Tested
          Hide
          Dinesh Bolkensteyn added a comment -

          I've added a unit test on this class

          Show
          Dinesh Bolkensteyn added a comment - I've added a unit test on this class

            People

            • Assignee:
              Dinesh Bolkensteyn
              Reporter:
              Fabrice Bellingard
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: