[Bf-committers] line length / code style.
montagne29 at wanadoo.fr
Sat Dec 17 10:53:34 CET 2011
I always use the second option (tab+spaces). It’s a bit frustrating to
use sometimes, but it helps so much the reading that, imho, it’s worth
Le samedi 17 décembre 2011 02:15:34, Campbell Barton a écrit :
> Suggest 2 options for line splitting and accept use of either.
> On Sat, Dec 17, 2011 at 11:38 AM, Campbell Barton<ideasman42 at gmail.com> wrote:
>> On Sat, Dec 17, 2011 at 1:17 AM, Sergey Sharybin<sergey.vfx at gmail.com> wrote:
>>> I'll agree that having code guidelines will help on keeping code more
>>> consistent. Don't think existing code should be changed to some general
>>> rule, but prefer to have newly adding code following the same style.
>>> Long lines are also better be prevented, imo. They might have sense for
>>> long URL or code from stubs.c, but in general prefer to avoid long lines
>>> too. It's easy to do.
>> For specific style guide, agree going over all files and making them
>> conform to some style guide is overkill ATM,
>> However doing this for very long lines would still be good IMHO,
>> mainly because we don't have all that many and they make side by side
>> diff's unwieldy.
>>> About code guidelines itself.. Not sure which style should be takes as
>>> base, perhaps any style might be takes as basis, after this we'll write
>>> guideline in the wiki and can discuss it a bit before declaring it as
>> Expect this would just be the style we already use in BLI/BKE/editor code.
>>> IMO, most important to define would be:
>>> - Indentation rules (when line is getting split)
>>> - Comment style
>>> - Variables naming
>>> - Variables declaration style
>>> I've got some guidelines we've been using in some projects (not Blender
>>> related, it was done before i've joined Blender community). Think i might
>>> use them as basis, check which style is using by active developers and
>>> prepare first version of blender code guideline in wiki. Think on monday
>>> we'll might start discussion of that guidelines draft.
>> Sounds fine, though I was only suggesting to set line length at first.
>> I guess once we have a style guide we agree on, we can apply parts of
>> it where it makes sense to existing code.
>>> On Fri, Dec 16, 2011 at 8:34 AM, Campbell Barton<ideasman42 at gmail.com>wrote:
>>>> This is not high priority of course but once in a while I notice
>>>> blender has some annoyingly long lines in our own source dir, eg.
>>>> Eventually it could be good to have a document like this for blender:
>>>> ... until then, I'd like to set some reasonable line limit - Suggest
>>>> 120 (80 would be is impracticable for us).
>>>> longer lines can stay where it makes sense - URL's for example.
>>>> - Campbell
>>>> Bf-committers mailing list
>>>> Bf-committers at blender.org
>>> With best regards, Sergey Sharybin
>>> Bf-committers mailing list
>>> Bf-committers at blender.org
>> - Campbell
More information about the Bf-committers