SonarQube
  1. SonarQube
  2. SONAR-3093

Java: remove metric "commented out lines of code" and "comments" metric must include all comments

    Details

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

      Description

      Detection of commented-out lines is not accurate, i.e. false-positives are possible.
      Thus better to rely on violations, which can be marked as false-positives - rule was added in SONAR-2018.
      For this reasons metric "commented-out lines of code" should be removed and metric "comments" must include all comments (including commented-out lines of code).

        Issue Links

          Activity

          Hide
          Evgeny Mandrikov added a comment -

          Done in ed06cc4.
          Note that change was done not on squid side, but in sonar-squid-java-plugin, in order to not affect other plugins like sonar-c-plugin.

          Show
          Evgeny Mandrikov added a comment - Done in ed06cc4 . Note that change was done not on squid side, but in sonar-squid-java-plugin, in order to not affect other plugins like sonar-c-plugin.
          Hide
          Freddy Mallet added a comment -

          Manually tested

          Show
          Freddy Mallet added a comment - Manually tested
          Hide
          Evgeny Mandrikov added a comment -

          Integration test was updated.

          Show
          Evgeny Mandrikov added a comment - Integration test was updated.

            People

            • Assignee:
              Evgeny Mandrikov
              Reporter:
              Evgeny Mandrikov
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: