RFR(XS): 7901298: jcheck should check that every file ends with exactly one newline
volker.simonis at gmail.com
Thu Apr 30 09:55:00 UTC 2015
On Thu, Apr 30, 2015 at 10:39 AM, Chris Hegarty
<chris.hegarty at oracle.com> wrote:
> On 29 Apr 2015, at 22:49, Jonathan Gibbons <jonathan.gibbons at oracle.com> wrote:
> > Any takers for this one?
> I’ve taken this change for a test drive, and it seems to handle just fine. A nice addition ( not a capital Reviewer on the Code Tools Project ).
> But… what will happen when jcheck is run over exiting changesets that add or modify files to have no newline, or more than one newline?
> hg jcheck --rev 0:tip
Well, you will get the corresponding warnings like:
[jcheck @VERSION@ @DATE@]
> Changeset: 105:a7d0f95410bd
> Author: never
> Date: 2008-04-03 21:26
> 6646020: assert(in_bb(n),"must be in block") in -Xcomp mode
> Reviewed-by: kvn, rasbold
test/compiler/6646020/Tester.java:884: More than one newline (\n) at
the end of file
> Is this an issue?
Not sure. At least not for me. I usually don't check existing changes
with jcheck :) Is somebody doing this?
I've just run 'hg jcheck --rev 0:tip' on the hotspot repository.
Without my change it only objects one change with a missing reviewer
attribution. With my change it objects 1698 changes because of no or
too many newlines at the end of the file.
When I did this change I also opened a hotspot bug for removing the
whitespace problems ("8073249: Fix all files to contain exactly one
newline at the end of file (and enhance 'jcheck' to enforce this
I think if we would fix jcheck to enforce this policy, then everybody
who touches such a file will be warned and can fix the newlines at the
end of the file. So eventually we will get a clean repository.
> > -- Jon
> > -------- Forwarded Message --------
> > Subject: RFR(XS): 7901298: jcheck should check that every file ends with exactly one newline
> > Date: Fri, 13 Feb 2015 12:01:15 +0100
> > From: Volker Simonis <volker.simonis at gmail.com>
> > To: code-tools-dev <code-tools-dev at openjdk.java.net>
> > Hi,
> > could somebody please review and sponsor the following small change
> > which adds a test for exactly one newline at the and of a file to
> > check:
> > http://cr.openjdk.java.net/~simonis/webrevs/2015/7901298/
> > https://bugs.openjdk.java.net/browse/CODETOOLS-7901298
> > Thank you and best regards,
> > Volker
More information about the hg-tools-dev