Need reviewer on addition of whitespace normalizer script
Staffan Larsen
staffan.larsen at oracle.com
Mon Mar 5 16:42:30 UTC 2012
Thanks for explaining, John. This should work fine regardless of indentation size as long as the tab stops in your editor are 8 wide (which may or may not be global truth).
Kelly: Looks good!
/Staffan
On 3 mar 2012, at 14:55, John Rose wrote:
> Lest Kelly have all the fun, I'll jump in.
>
> On Mar 3, 2012, at 3:36 AM, David Holmes wrote:
>
>> So the question is: what does the script think a TAB represents?
>
> The same thing that /usr/bin/expand does, as noted earlier. Or read the perl code.
>
> When was the last time anybody on the hotspot team used '\t' (the source file octet, not the keyboard key) to mean anything else than /usr/bin/expand? This stuff about 2 and 4 width indents is irrelevant, except to people who accidentally use anti-social IDE settings, and they get socialized quickly.
>
> On Mar 3, 2012, at 8:39 AM, Jonathan Gibbons wrote:
>
>> Kelly,
>>
>> Is there a reason you don't use "expand"?
>>
>> For a while now I've been using the following simple script to fix the whitespace in my files before I commit a change set.
>
> The perl script does what your script does, probably to 95% compatibility. (File list generation logic and last-line behavior may perhaps vary on corner cases.) Your script uses perl plus other shell commands, while the standard script uses perl only; your script uses expand instead of an obscure couple of perl lines which do the same thing. It seems a matter of taste not greatly worth discussing. There are 10 different ways to code this operation; 9 of those ways will not get used, but (IMO) it's not very interesting to ask why not.
>
> — John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/build-dev/attachments/20120305/48c3a25b/attachment.htm>
More information about the build-dev
mailing list