diff options
author | Michael Opdenacker <michael.opdenacker@bootlin.com> | 2022-05-27 18:27:28 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-06-21 20:57:16 +0100 |
commit | eb633e611d8ba7d3805b1c5c9db7b46016d6025e (patch) | |
tree | fbdbd833746702d136b83c946d9fe56de993ad51 /documentation | |
parent | 9f3ba94bfa5efa43f81b3c6c6b83da9d83f845bf (diff) | |
download | poky-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.md | 43 |
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 | |||
12 | Source code for the documentation shouldn't have lines | ||
13 | wider than 80 characters. This makes patch lines more | ||
14 | readable and code easier to quote in e-mail clients. | ||
15 | |||
16 | If you have to include long commands or lines in configuration | ||
17 | files, provided the syntax makes this possible, split them | ||
18 | into multiple lines, using the ``\`` character. | ||
19 | |||
20 | Here 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 | |||
28 | Exceptions are granted for file contents whose lines | ||
29 | cannot be split without infringing syntactic rules | ||
30 | or reducing readability, as well as for command output | ||
31 | which should be kept unmodified. | ||
32 | |||
10 | ### Project names | 33 | ### Project names |
11 | 34 | ||
12 | Project names should be capitalized in the same | 35 | Project 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 | |||
51 | File, tool and command names should be double tick-quoted. | ||
52 | For example, ``` ``conf/local.conf`` ``` is preferred over | ||
53 | `"conf/local.conf"`. | ||
54 | |||
55 | ### Variables | ||
56 | |||
57 | Every variable should be mentioned with: | ||
27 | 58 | ||
28 | File names should be quoted as in the below example: | 59 | :term:`VARIABLE` |
29 | 60 | ||
30 | ``conf/local.conf`` | 61 | This assumes that `VARIABLE` is described either |
62 | in the Yocto Project documentation variable index (`ref-manual/variables.rst`) | ||
63 | or in the BitBake User Manual | ||
64 | (`doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst`) | ||
31 | 65 | ||
32 | Using "conf/local/conf" would be wrong. | 66 | If it is not described yet, the variable should be added to the |
67 | glossary 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 | ||