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 Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1
    • Component/s: Squid
    • Labels:
      None

      Issue Links

        Activity

        Hide
        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
        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
        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
        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 added a comment -

        Manually tested !

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

        Already covered by integration tests.

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

          People

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

            Dates

            • Created:
              Updated:
              Resolved: