← Back to team overview

openerp-community team mailing list archive

Re: XML files indent style standard

 

2013/11/7 Nicolas Bessi <nicolas.bessi@xxxxxxxxxxxxxx>

> Hello,
>
> I'm in favour of 2 spaces.
>
> A space will always be a space, tab display may vary.
>

Yes, precisely my point, the guy editing the file can choose how wide he
wants it to display.

Also, a space is NOT always the same :

  2 spaces in front
    4 spaces in front
  2 spaces in front
    4 spaces in front

Oopsie !

The argument becomes invalid when using tabs. Tabs indicate one deeper
level of indentation.
The only problem I can forsee is with continuation lines.

<field name="a_very_long_name" invisible="some_insanely_long_condition"
domain="[(are_you_sure_you_want,'=','to_use_these_long_domains')]">


<field name="a_very_long_name"
    invisible="some_insanely_long_condition"
    domain="[(are_you_sure_you_want,'=','to_use_these_long_domains')]">

How deep do you indent your next child element then ? I'm not saying tabs
are the ultimate solution but it avoids a few critical ones.

Regards,
Niels

Follow ups

References