Uploaded image for project: 'Skara'
  1. Skara
  2. SKARA-2265

jcheck should check that source code files ends with a newline

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • None
    • libraries
    • None

      It is common practice to end source code files with a newline. Most IDEs do this automatically, so if a file is missing a trailing newline, it will get a spurious change when it is edited elsewhere.

      Out of all the source code files in the JDK repository, there are 37 .java files missing a newline at EOF, 5 .cpp files, 7 .hpp files, 2 .c files, 2 .properties files and 1 .m file.

      This check should be made part of the whitespace check in jcheck. The existing handful of files not adhering to this rule should be fixed when enabling this new check.

      I was actually surprised to see that this was not checked by jcheck. I wonder if the old, pre-Skara jcheck did not actually do this, and that it got missed in the conversion.

            Unassigned Unassigned
            ihse Magnus Ihse Bursie
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: