Re: [PATCH v2 1/2] clang-format: outline the git project's coding style
- From
Stefan Beller <sbeller@google.com>
- Date
- Aug 14, 2017, 22:02 UTC
- Message-ID
- <CAGZ79kau6_XeEQqYDhFC2FmyJiqWY2+SuRzvGFrfmLdhAaQS+Q@mail.gmail.com>
- In-Reply-To
- <20170814213046.107576-2-bmwill@google.com>
On Mon, Aug 14, 2017 at 2:30 PM, Brandon Williams <bmwill@google.com> wrote:
Show 5 quoted lines
> Add a '.clang-format' file which outlines the git project's coding > style. This can be used with clang-format to auto-format .c and .h > files to conform with git's style. > > Signed-off-by: Brandon Williams <bmwill@google.com>
Applying this patch and running
clang-format -i -style file *.c *.h builtin/*.c
produces a diff, that I'd mostly agree with.
This style guide is close to our current style.As noted in patch 2/2 we'd now need an easy way to expose this for use in various situations, such as * contributor wanting to format their patch * reformatting code for readability
Thanks, Stefan