From jonathan.gibbons at oracle.com Wed Apr 29 21:49:25 2015 From: jonathan.gibbons at oracle.com (Jonathan Gibbons) Date: Wed, 29 Apr 2015 14:49:25 -0700 Subject: Fwd: RFR(XS): 7901298: jcheck should check that every file ends with exactly one newline In-Reply-To: References: Message-ID: <554151E5.1020601@oracle.com> Any takers for this one? -- 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 To: code-tools-dev 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 From chris.hegarty at oracle.com Thu Apr 30 08:39:30 2015 From: chris.hegarty at oracle.com (Chris Hegarty) Date: Thu, 30 Apr 2015 09:39:30 +0100 Subject: RFR(XS): 7901298: jcheck should check that every file ends with exactly one newline In-Reply-To: <554151E5.1020601@oracle.com> References: <554151E5.1020601@oracle.com> Message-ID: <9A4D1A6C-9D13-4883-8C65-47060DCABD78@oracle.com> On 29 Apr 2015, at 22:49, Jonathan Gibbons 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 Is this an issue? -Chris. > -- 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 > To: code-tools-dev > > > > 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 > > > From volker.simonis at gmail.com Thu Apr 30 09:55:00 2015 From: volker.simonis at gmail.com (Volker Simonis) Date: Thu, 30 Apr 2015 11:55:00 +0200 Subject: RFR(XS): 7901298: jcheck should check that every file ends with exactly one newline In-Reply-To: <9A4D1A6C-9D13-4883-8C65-47060DCABD78@oracle.com> References: <554151E5.1020601@oracle.com> <9A4D1A6C-9D13-4883-8C65-47060DCABD78@oracle.com> Message-ID: On Thu, Apr 30, 2015 at 10:39 AM, Chris Hegarty wrote: > > > On 29 Apr 2015, at 22:49, Jonathan Gibbons 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 policy)", https://bugs.openjdk.java.net/browse/JDK-8073249). 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. Regards, Volker > > -Chris. > > > -- 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 > > To: code-tools-dev > > > > > > > > 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 > > > > > > > From iris.clark at oracle.com Thu Apr 30 16:47:48 2015 From: iris.clark at oracle.com (Iris Clark) Date: Thu, 30 Apr 2015 09:47:48 -0700 (PDT) Subject: RFR(XS): 7901298: jcheck should check that every file ends with exactly one newline In-Reply-To: <554151E5.1020601@oracle.com> References: <554151E5.1020601@oracle.com> Message-ID: Hi, Jon. I'm not an expert on jcheck. It appears that the changeset adds a requirement to the default jcheck behavior. I suspect that the expectation is that this check will be enabled for the jdk9 forest since it was motivated by a faulty changeset in the jdk9 hotspot repository [0]. Do all of the changesets (-r 0:tip) in all existing forests where jcheck is enabled pass with this change? On push to a server, the entire repository is checked for compliance to jcheck, not just the pushed changesets. Given the hotspot history, I suspect that this eliminates any jdk9 hotspot forest (including branches of jdk9 such as those for existing Projects and the future jdk9u and jdk10 forests). jcheck could also not be enabled in any repository where the faulty changeset was propagated (jdk8u?) or coincidentally contains another changeset which does not adhere to the new whitespace requirements. Minimally, the addition of this check would need to be controlled by an option. If the goal is to apply the check to the jdk9 forest, a more sophisticated solution is needed. Mark, as the original jcheck author, may have additional insight. Thanks, iris [0] http://mail.openjdk.java.net/pipermail/hotspot-dev/2015-February/017138.html -----Original Message----- From: Jonathan Gibbons Sent: Wednesday, April 29, 2015 2:49 PM To: hg-tools-dev at openjdk.java.net Subject: Fwd: RFR(XS): 7901298: jcheck should check that every file ends with exactly one newline Any takers for this one? -- 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 To: code-tools-dev 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