SonarQube Java
  1. SonarQube Java
  2. SONARJAVA-17

When the last line of a source code file is a blank line, this line is not counted in the "lines" measure

    Details

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

      Issue Links

        Activity

        Hide
        Fabrice Bellingard added a comment -

        We decided that the last empty line should not be counted as a real line, as it is empty. Indeed, no tool will report a violation on an empty line (as there's no code) and we don't want a user to be able to create a manual violation on it.

        See SONAR-3003 for reference.

        Show
        Fabrice Bellingard added a comment - We decided that the last empty line should not be counted as a real line, as it is empty. Indeed, no tool will report a violation on an empty line (as there's no code) and we don't want a user to be able to create a manual violation on it. See SONAR-3003 for reference.
        Hide
        Evgeny Mandrikov added a comment -

        And now we finally decided that definition of number of lines should be consistent with what you see in IDE, i.e. number of line terminators plus 1. And same should be shown in Sonar - see SONAR-3896.

        Show
        Evgeny Mandrikov added a comment - And now we finally decided that definition of number of lines should be consistent with what you see in IDE, i.e. number of line terminators plus 1. And same should be shown in Sonar - see SONAR-3896 .
        Hide
        Freddy Mallet added a comment -

        Manually tested !

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

        Already covered by integration tests.

        Show
        Evgeny Mandrikov added a comment - Already covered by integration tests.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: