Documentation/coding_style: Issues not mentioned and cleanup patches
This patch adds a bit of a "preamble" to the coding style to provide guideance on how it should be applied and how style questions that aren't mentioned should be handled. Signed-off-by: Julius Werner <jwerner@chromium.org> Change-Id: I88efd5f1006bd1fd82cea14ea65422d9958dc197 Reviewed-on: https://review.coreboot.org/c/coreboot/+/50966 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
parent
7d85d43f18
commit
4dd857723b
|
@ -5,12 +5,26 @@ coreboot project. It is in many ways exactly the same as the Linux
|
|||
kernel coding style. In fact, most of this document has been copied from
|
||||
the [Linux kernel coding style](http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/Documentation/CodingStyle?id=HEAD)
|
||||
|
||||
Please at least consider the points made here.
|
||||
The guidelines in this file should be seen as a strong suggestion, and
|
||||
should overrule personal preference. But they may be ignored in
|
||||
individual instances when there are good practical reasons to do so, and
|
||||
reviewers are in agreement.
|
||||
|
||||
First off, I'd suggest printing out a copy of the GNU coding standards,
|
||||
and NOT read it. Burn them, it's a great symbolic gesture.
|
||||
Any style questions that are not mentioned in here should be decided
|
||||
between the author and reviewers on a case-by-case basis. When modifying
|
||||
existing files, authors should try to match the prevalent style in that
|
||||
file -- otherwise, they should try to match similar existing files in
|
||||
coreboot.
|
||||
|
||||
Anyway, here goes:
|
||||
Bulk style changes to existing code ("cleanup patches") should avoid
|
||||
changing existing style choices unless they actually violate this style
|
||||
guide, or there is broad consensus that the new version is an
|
||||
improvement. By default the style choices of the original author should
|
||||
be honored. (Note that `checkpatch.pl` is not part of this style guide,
|
||||
and neither is `clang-format`. These tools can be useful to find
|
||||
potential issues or simplify formatting in new submissions, but they
|
||||
were not designed to directly match this guide and may have false
|
||||
positives. They should not be bulk-applied to change existing code.)
|
||||
|
||||
## Indentation
|
||||
|
||||
|
|
Loading…
Reference in New Issue