Uploaded image for project: 'Java'
  1. 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
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1
    • Component/s: Squid
    • Labels:
      None

      Issue Links

        Activity

        Hide
        fabemn OLD - 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
        fabemn OLD - 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
        godin OLD - 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
        godin OLD - 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 Freddy Mallet added a comment -

        Manually tested !

        Show
        freddy.mallet Freddy Mallet added a comment - Manually tested !
        Hide
        godin OLD - Evgeny Mandrikov added a comment -

        Already covered by integration tests.

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

          People

          • Assignee:
            godin OLD - Evgeny Mandrikov
            Reporter:
            freddy.mallet Freddy Mallet
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: