Need reviewer on addition of whitespace normalizer script
Dmitry Samersoff
Dmitry.Samersoff at oracle.com
Sat Mar 3 21:36:33 UTC 2012
John,
Wrote extendable nit hunting framework ;-) (attached)
Fill free to add/change rules.
This script doesn't change a source file but complains
about found formatting errors.
It should save a bit of time during code review.
-Dmitry
On 2012-03-03 23: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
--
Dmitry Samersoff
Java Hotspot development team, SPB04
* There will come soft rains ...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nithunter.py
Type: text/x-python
Size: 5348 bytes
Desc: not available
URL: <https://mail.openjdk.org/pipermail/build-dev/attachments/20120304/7d2eea56/nithunter.py>
More information about the build-dev
mailing list