Re: [PATCH v2 0/5] Documentation: some coding guideline updates
- From
Karthik Nayak <karthik.188@gmail.com>
- Date
- Jul 31, 2024, 09:12 UTC
- Message-ID
- <CAOLa=ZS1JS5YyguYhyeAeWuv7Sb2tB0ze_5=GyQgRmhmVDNWyw@mail.gmail.com>
- In-Reply-To
- <cover.1722323818.git.ps@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 31 quoted lines
> Hi,
>
> this is the second version of my patch series that aims to improve our
> coding guidelines such that we arrive at a more consistent coding style.
>
> Changes compared to v1:
>
> - Fix clang-format to use a single space to indent preprocessor
> directives instead of using tabs. Thus, this series is now built
> with kn/ci-clang-format at 1b8f306612 (ci/style-check: add
> `RemoveBracesLLVM` in CI job, 2024-07-23) merged into v2.46.0.
>
> - Adapt the coding guidelines accordingly to also only use a single
> space for indentation of nested preprocessor directives.
>
> - Adopt a proposal by Junio to more clearly spell out the relationship
> between a subsystem `S`, `struct S` and its functions `S_<verb>()`.
>
> - Document `S_clear()`-style functions. I have adopted the proposal by
> Junio hear, where `clear = release + init` with the restriction that
> `S_init()` must not allocate any resources.
>
> - Add another patch on top that makes variable initializers consistent
> in our coding guidelines. Our style is to add spaces between the
> curly brace and the initializers (`struct foo bar = { something };`).
>
> I think I captured everything that came out of the discussion, but
> please let me know in case I misinterpreted or forgot anything.
>
> Thanks!
>This series seems good. I did a read-through and have no changes to suggest! I'm really happy with these fixes which slowly improve the quality of the codebase.
Thanks!