summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
authorMichael Opdenacker <michael.opdenacker@bootlin.com>2022-05-27 18:27:28 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-06-21 20:57:16 +0100
commiteb633e611d8ba7d3805b1c5c9db7b46016d6025e (patch)
treefbdbd833746702d136b83c946d9fe56de993ad51 /documentation
parent9f3ba94bfa5efa43f81b3c6c6b83da9d83f845bf (diff)
downloadpoky-eb633e611d8ba7d3805b1c5c9db7b46016d6025e.tar.gz
docs: standards.md: add more rules: line wrapping and variables
Fix Markdown syntax too (From yocto-docs rev: f836a2fbe401865d3e9af691d71de97e9c5df70a) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
-rw-r--r--documentation/standards.md43
1 files changed, 39 insertions, 4 deletions
diff --git a/documentation/standards.md b/documentation/standards.md
index 81aff5f193..abdebc82bf 100644
--- a/documentation/standards.md
+++ b/documentation/standards.md
@@ -7,6 +7,29 @@ It is currently a work in progress.
7 7
8## Text standards 8## Text standards
9 9
10### Line wrapping
11
12Source code for the documentation shouldn't have lines
13wider than 80 characters. This makes patch lines more
14readable and code easier to quote in e-mail clients.
15
16If you have to include long commands or lines in configuration
17files, provided the syntax makes this possible, split them
18into multiple lines, using the ``\`` character.
19
20Here is an example:
21
22 $ scripts/install-buildtools \
23 --without-extended-buildtools \
24 --base-url https://downloads.yoctoproject.org/releases/yocto \
25 --release yocto-4.0.1 \
26 --installer-version 4.0.1
27
28Exceptions are granted for file contents whose lines
29cannot be split without infringing syntactic rules
30or reducing readability, as well as for command output
31which should be kept unmodified.
32
10### Project names 33### Project names
11 34
12Project names should be capitalized in the same 35Project names should be capitalized in the same
@@ -23,13 +46,25 @@ in lower case:
23* When used in a cross-reference title. Such 46* When used in a cross-reference title. Such
24 titles are usually in lower case. 47 titles are usually in lower case.
25 48
26### File names 49### File, tool and command names
50
51File, tool and command names should be double tick-quoted.
52For example, ``` ``conf/local.conf`` ``` is preferred over
53`"conf/local.conf"`.
54
55### Variables
56
57Every variable should be mentioned with:
27 58
28File names should be quoted as in the below example: 59 :term:`VARIABLE`
29 60
30 ``conf/local.conf`` 61This assumes that `VARIABLE` is described either
62in the Yocto Project documentation variable index (`ref-manual/variables.rst`)
63or in the BitBake User Manual
64(`doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst`)
31 65
32Using "conf/local/conf" would be wrong. 66If it is not described yet, the variable should be added to the
67glossary before or in the same patch it is used, so that `:term:` can be used.
33 68
34## ReStructured Text Syntax standards 69## ReStructured Text Syntax standards
35 70