Re: [PATCH BlueZ] doc/coding-style: Allow spaces after tabs for indenting wrapped lines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[Ping and resending in plain text]

Hi Marcel,

Could you share the reason behind the "only tab for indentation" rule
for userspace code? I find that it is hard to format the code and it'd
be good if we adopt the kernel space style indentation as well which
increases readability and ease of code formatting.


On Thu, Oct 1, 2020 at 12:16 AM Marcel Holtmann <marcel@xxxxxxxxxxxx> wrote:
>
> Hi Sonny,
>
> > The "only tabs for indentation" rule was enforced long ago to align with
> > Linux kernel net coding style. This is no longer the case today so we
> > are relaxing the coding style to allow spaces after tabs if it can
> > increase readability.
> >
> > ---
> > doc/coding-style.txt | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
> > diff --git a/doc/coding-style.txt b/doc/coding-style.txt
> > index f0bf880e3..6a7415847 100644
> > --- a/doc/coding-style.txt
> > +++ b/doc/coding-style.txt
> > @@ -104,9 +104,16 @@ void btd_adapter_register_pin_cb(struct btd_adapter *adapter,
> > void btd_adapter_register_pin_cb(struct btd_adapter *adapter,
> >                                                       btd_adapter_pin_cb_t cb)
> >
> > +5)
> > +void btd_adapter_register_pin_cb(struct btd_adapter *adapter,
> > +                              btd_adapter_pin_cb_t cb)
> > +
> > The referred style for line wrapping is to indent as far as possible to the
> > right without hitting the 80 columns limit.
> >
> > +It is acceptable to add padding with spaces after tabs to increase
> > +readability, for example to indent function arguments at the parenthesis.
> > +
>
> NAK. The userspace style is a bit different than the kernel one.
>
> Regards
>
> Marcel
>



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux