Skip to content

Commit 93a1100

Browse files
committed
docs: move CODING_STYLE into the developer documentation
There is no particular reason to keep this on it's own in the root of the tree. Move it into the rest of the fine developer manual and fixup any links to it. The only tweak I've made is to fix the code-block annotations to mention the language C. Signed-off-by: Alex Bennée <[email protected]> Reviewed-by: Claudio Fontana <[email protected]> Message-Id: <[email protected]>
1 parent 4583cda commit 93a1100

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

README.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ When submitting patches, one common approach is to use 'git
6666
format-patch' and/or 'git send-email' to format & send the mail to the
6767
[email protected] mailing list. All patches submitted must contain
6868
a 'Signed-off-by' line from the author. Patches should follow the
69-
guidelines set out in the CODING_STYLE.rst file.
69+
guidelines set out in the `style section
70+
<https://www.qemu.org/docs/master/devel/style.html>` of
71+
the Developers Guide.
7072

7173
Additional information on submitting patches can be found online via
7274
the QEMU website

docs/devel/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Contents:
1414
:maxdepth: 2
1515

1616
build-system
17+
style
1718
kconfig
1819
testing
1920
fuzzing

CODING_STYLE.rst renamed to docs/devel/style.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -641,22 +641,22 @@ trace-events style
641641

642642
In trace-events files, use a '0x' prefix to specify hex numbers, as in:
643643

644-
.. code-block::
644+
.. code-block:: c
645645
646646
some_trace(unsigned x, uint64_t y) "x 0x%x y 0x" PRIx64
647647
648648
An exception is made for groups of numbers that are hexadecimal by
649649
convention and separated by the symbols '.', '/', ':', or ' ' (such as
650650
PCI bus id):
651651

652-
.. code-block::
652+
.. code-block:: c
653653
654654
another_trace(int cssid, int ssid, int dev_num) "bus id: %x.%x.%04x"
655655
656656
However, you can use '0x' for such groups if you want. Anyway, be sure that
657657
it is obvious that numbers are in hex, ex.:
658658

659-
.. code-block::
659+
.. code-block:: c
660660
661661
data_dump(uint8_t c1, uint8_t c2, uint8_t c3) "bytes (in hex): %02x %02x %02x"
662662

scripts/fix-multiline-comments.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22
#
3-
# Fix multiline comments to match CODING_STYLE
3+
# Fix multiline comments to match docs/devel/style.rst
44
#
55
# Copyright (C) 2018 Red Hat, Inc.
66
#

0 commit comments

Comments
 (0)