changelog shortlog graph tags branches changeset files revisions annotate raw help

Mercurial > org > docs / style.org

changeset 7: a6cf5a2a2f8d
parent: bb51c61e4d4b
child: 4cb5e087f588
author: ellis <ellis@rwest.io>
date: Tue, 28 Nov 2023 21:45:46 -0500
permissions: -rw-r--r--
description: pub update
1 {{{header(style,
2 Richard Westhaver,
3 ellis@rwest.io,
4 The Compiler Company Styleguide)}}}
5 
6 As an organization we maintain a styleguide[fn:1] which lists all of
7 the style guidelines we use for our code. If you are contributing to
8 one of our projects, you should review and understand the relevant
9 sections below.
10 
11 You should also review the [[file:ulang.org][ulang]] document, which may shine some light
12 on code comments and developer docs.
13 
14 [fn:1] https://google.github.io/styleguide/
15 
16 * General Programming
17 
18 - indent-offset = 2
19 - max-line-width = 80
20 - page-length ~ 32
21 - module-length ~ 512
22 - file-size ~ 1024
23 
24 - start every source-file with a header comment
25 - use outline headings to organize your program
26 - use ulang-comments as needed for referencing bugs, notes, etc.
27 - inline documentation should be declarative. your code explains your
28  comments for you.
29 
30 * Common Lisp
31 
32 - prefer symbol docs to comment docs
33 
34 ** File templates
35 * Rust
36 
37 - don't make =mod.rs= files
38  - use the =foo.rs=, =foo/*= pattern instead
39 ** File templates
40 * Emacs Lisp
41 ** File templates
42 * Org-mode
43 ** File templates
44 * Shell
45 ** File templates
46 * Python
47 ** File templates