ah, the style guide that no-one has ever bothered to follow since I
originally wrote it 10 years ago.

I changed it in Jan to reflect the style that people actually check in, so
presumably prefer. The beautifier tries to mimick this style. I will change
the style guide back.

fyi - the original style is based on microsoft, eg
     http://blogs.msdn.com/b/brada/archive/2005/01/26/361363.aspx
i guess people prefer a unix-based style, eg
    https://www.kernel.org/doc/Documentation/CodingStyle


I think beautifying is a necessary 'cos we have a distributed project of
committers who use different editors and OSes. It provides some consistency.

I regularly see you commit changes where you've manually wrap long lines.
Youre welcome to change the beautifier to enforce this. However, I prefer
that the beautifier isn't changed too much otherwise the code will flip
flop for no good reason.



Hieu Hoang
Researcher
New York University, Abu Dhabi
http://www.hoang.co.uk/hieu

On 26 May 2015 at 20:30, Ulrich Germann <[email protected]> wrote:

> Hi Jeroen,
>
> on the matter of style I'd like to point out that the official style
> guidelines for Moses code require opening braces on a separate line.
>
> http://www.statmt.org/moses/?n=Moses.CodeStyle
>
> The official style has always required this since the first entry about
> this in the Wiki back in 2009. Recently (Jan 16 this year) the page was
> vandalized by an anonymous editor to claim something to the contrary, but
> the page has now been restored to what it should be. So while you're
> fiddling with the beautify scripts, please fix this as well.
>
> I'm personally no friend of automatic "beautification", because it does
> far more harm than good in my opinion, but if you insist on doing it, it
> should be done right.
>
> Best regards - Uli
>
> On Sun, May 17, 2015 at 2:13 PM, Jeroen Vermeulen <
> [email protected]> wrote:
>
>> Hi all,
>>
>> We have a replacement for the old beautify.perl script:
>> scripts/other/beautify.py.
>>
>> It does one of two things, or both:
>>  * Re-format C/C++ source code, just like the old script did.
>>  * Check for style errors and such.
>>
>> This last thing is called a "lint" check.  For this I chose Pocketlint,
>> a checker I have good experiences with, although if people want a
>> different one (or additional checks) I can change that.
>>
>> I fixed most of the lint that got reported, except in JavaScript code.
>> We may add automatic reformatting for additional languages later.  I
>> sincerely hope all of this does not cause any serious merge problems for
>> your branches.
>>
>> Ideally, everyone would get in the habit of installing Pocketlint and
>> running this script regularly whether they accidentally added any lint.
>>  To see how the script works, run:
>>
>>     ./scripts/other/beautify.py -h
>>
>> The lint check processes a few files at a time.  By default it stops
>> when it sees lint.  If you want to see a full check, use the -i option.
>>
>>
>> Jeroen
>> _______________________________________________
>> Moses-support mailing list
>> [email protected]
>> http://mailman.mit.edu/mailman/listinfo/moses-support
>>
>>
>
>
> --
> Ulrich Germann
> Senior Researcher
> School of Informatics
> University of Edinburgh
>
> _______________________________________________
> Moses-support mailing list
> [email protected]
> http://mailman.mit.edu/mailman/listinfo/moses-support
>
>
_______________________________________________
Moses-support mailing list
[email protected]
http://mailman.mit.edu/mailman/listinfo/moses-support

Reply via email to