summaryrefslogtreecommitdiffstats
path: root/Documentation/contributing
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2021-02-19 18:01:50 -0800
committerJulius Werner <jwerner@chromium.org>2021-03-26 05:09:40 +0000
commit4dd857723b298512d22c6626e6bdc6d8c4b05234 (patch)
treebce17650740bf41c82277472b500c77916b29fe4 /Documentation/contributing
parent7d85d43f18d9607a7d41eb401f8d096e28d98c18 (diff)
downloadcoreboot-4dd857723b298512d22c6626e6bdc6d8c4b05234.tar.gz
coreboot-4dd857723b298512d22c6626e6bdc6d8c4b05234.tar.bz2
coreboot-4dd857723b298512d22c6626e6bdc6d8c4b05234.zip
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>
Diffstat (limited to 'Documentation/contributing')
-rw-r--r--Documentation/contributing/coding_style.md26
1 files changed, 20 insertions, 6 deletions
diff --git a/Documentation/contributing/coding_style.md b/Documentation/contributing/coding_style.md
index f6a0f540b80a..a8c7356bfebe 100644
--- a/Documentation/contributing/coding_style.md
+++ b/Documentation/contributing/coding_style.md
@@ -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.
-
-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.
-
-Anyway, here goes:
+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.
+
+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.
+
+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