-
Notifications
You must be signed in to change notification settings - Fork 250
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
btrfs-progs: docs: document conventions
Signed-off-by: David Sterba <[email protected]>
- Loading branch information
Showing
2 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
C style | ||
------- | ||
|
||
The kernel CodingStyle where applicable | ||
|
||
https://www.kernel.org/doc/html/latest/process/coding-style.html | ||
|
||
Error messages | ||
-------------- | ||
|
||
* formatting: | ||
* use `error("string ...")` | ||
* no trailing newline | ||
* small letter starts the first word | ||
* no string splitting | ||
* move string to new line if it's too long, un-indent to the left if it | ||
exceeds 80 chars | ||
* contents: | ||
* be descriptive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
Manual pages structure: | ||
|
||
- add references to all external commands mentioned anywhere in the text to the | ||
'SEE ALSO' section | ||
- also add related, not explicitly mentioned | ||
- the heading levels are validated | ||
- mandatory, manual page === | ||
- mandatory, sections --- | ||
- optional, sub-sections ~~~ | ||
- command-specific examples are mostly free of restrictions but should be | ||
readable in all output formats (manual page, html) | ||
|
||
- subcommands are in alphabetical order | ||
|
||
- long command output or shell examples: verbatim output | ||
- a new paragraph, 2 spaces at the beginning of the line | ||
|
||
|
||
Quotation in subcommands: | ||
|
||
- exact syntax: monotype `usage=0` | ||
- reference to arguments etc: 'italics' | ||
- command reference: bold *btrfs fi show* | ||
- section references: italics 'EXAMPLES' | ||
|
||
- argument name in option desciption: caps in angle brackets <NAME> | ||
- reference in help text: caps NAME | ||
also possible: caps italics 'NAME' | ||
|
||
- command short description: | ||
- command name: bold *command* | ||
- optional unspecified: brackets [options] | ||
- mandatory argument: angle brackets <path> | ||
- optional parameter with argument: [-p <path>] | ||
|
||
|
||
Refrences: | ||
- full asciidoc syntax: http://asciidoc.org/userguide.html | ||
- cheatsheet: http://powerman.name/doc/asciidoc |